Some compiling warnings

2023-01-03 Thread Richard Guo
When trying Valgrind I came across some compiling warnings with USE_VALGRIND defined and --enable-cassert not configured. This is mainly because in this case we have MEMORY_CONTEXT_CHECKING defined while USE_ASSERT_CHECKING not defined. aset.c: In function ‘AllocSetFree’: aset.c:1027:10:

Re: Add SHELL_EXIT_CODE to psql

2023-01-03 Thread Corey Huinker
On Tue, Jan 3, 2023 at 5:36 AM vignesh C wrote: > On Wed, 21 Dec 2022 at 11:04, Corey Huinker > wrote: > > > > I've rebased and updated the patch to include documentation. > > > > Regression tests have been moved to a separate patchfile because error > messages will vary by OS and

Re: [DOCS] Stats views and functions not in order?

2023-01-03 Thread vignesh C
On Mon, 2 Jan 2023 at 13:47, Peter Eisentraut wrote: > > On 08.12.22 03:30, Peter Smith wrote: > > PSA patches for v9* > > > > v9-0001 - Now the table rows are ordered per PeterE's suggestions [1] > > committed > > > v9-0002 - All the review comments from DavidJ [2] are addressed > > I'm not sure

Ignore dropped columns when checking the column list in logical replication

2023-01-03 Thread shiy.f...@fujitsu.com
Hi hackers, I saw a problem related to column list. There's a restriction that different column lists for same table can't be used in the publications of single subscription. But we will get unexpected errors in some cases because the dropped columns are not ignored. For example: -- publisher

Re: pgsql: Delay commit status checks until freezing executes.

2023-01-03 Thread Peter Geoghegan
On Tue, Jan 3, 2023 at 10:47 PM Andres Freund wrote: > IMO the comment at the top mentioning why the TransactionIdIsInProgress() > calls are crucial / need to be done first would be considerably more likely to > be found in transam.c than heapam_visibility.c. Yeah, but they're duplicated anyway.

Re: pgsql: Delay commit status checks until freezing executes.

2023-01-03 Thread Andres Freund
Hi, On 2023-01-03 22:41:35 -0800, Peter Geoghegan wrote: > On Tue, Jan 3, 2023 at 10:33 PM Andres Freund wrote: > > I'd say a comment above TransactionIdDidAbort() referencing an overview > > comment at the top of the file? I think it might be worth moving the comment > > from

Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.

2023-01-03 Thread Masahiko Sawada
Hi, I realized that pg_locks view shows the transaction id of a speculative token lock in the database field: postgres(1:509389)=# select * from pg_locks where locktype = 'spectoken'; locktype | database | relation | page | tuple | virtualxid | transactionid | classid | objid | objsubid |

Re: pgsql: Delay commit status checks until freezing executes.

2023-01-03 Thread Peter Geoghegan
On Tue, Jan 3, 2023 at 10:33 PM Andres Freund wrote: > I'd say a comment above TransactionIdDidAbort() referencing an overview > comment at the top of the file? I think it might be worth moving the comment > from heapam_visibility.c to transam.c? What comments in heapam_visibility.c should we be

Re: Perform streaming logical transactions by background workers and parallel apply

2023-01-03 Thread Masahiko Sawada
On Wed, Jan 4, 2023 at 2:31 PM Masahiko Sawada wrote: > > On Tue, Jan 3, 2023 at 2:40 PM wangw.f...@fujitsu.com > wrote: > > > > On Mon, Jan 2, 2023 at 18:54 PM Amit Kapila wrote: > > > On Fri, Dec 30, 2022 at 3:55 PM wangw.f...@fujitsu.com > > > wrote: > > > > > > > > I've checked it and it

Re: pgsql: Delay commit status checks until freezing executes.

2023-01-03 Thread Andres Freund
Hi, On 2023-01-03 20:29:53 -0800, Peter Geoghegan wrote: > On Tue, Jan 3, 2023 at 7:56 PM Andres Freund wrote: > > I don't know - I think there's a explicit comment somewhere, but I couldn't > > find it immediately. There's a bunch of indirect references to in in > > heapam_visibility.c, with

Re: Question regarding "Make archiver process an auxiliary process. commit"

2023-01-03 Thread Sravan Kumar
I have added the thread to the commitfest: https://commitfest.postgresql.org/42/ Did you get a chance to review the patch? Please let me know if you need anything from my end. Thanks & Regards, Sravan Velagandula EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Wed,

Re: [PATCH] Improve ability to display optimizer analysis using OPTIMIZER_DEBUG

2023-01-03 Thread Tom Lane
David Rowley writes: > The thing I had in mind was some mode that would record additional > details during planning that could be tagged onto the final plan in > createplan.c so that EXPLAIN could display them. I just think that > EXPLAIN is the place where people go to learn about _what_ the

Re: pgsql: Delay commit status checks until freezing executes.

2023-01-03 Thread Peter Geoghegan
On Tue, Jan 3, 2023 at 8:29 PM Peter Geoghegan wrote: > I find this astonishing. Why isn't there a prominent comment that > advertises that TransactionIdDidAbort() just doesn't work reliably? I pushed a fix for this now. We should add a comment about this issue to TransactionIdDidAbort() header

Re: Perform streaming logical transactions by background workers and parallel apply

2023-01-03 Thread Masahiko Sawada
On Tue, Jan 3, 2023 at 2:40 PM wangw.f...@fujitsu.com wrote: > > On Mon, Jan 2, 2023 at 18:54 PM Amit Kapila wrote: > > On Fri, Dec 30, 2022 at 3:55 PM wangw.f...@fujitsu.com > > wrote: > > > > > > I've checked it and it looks good to me. > > > Rebased the other patches and ran the pgident for

Re: wake up logical workers after ALTER SUBSCRIPTION

2023-01-03 Thread Amit Kapila
On Tue, Jan 3, 2023 at 11:40 PM Nathan Bossart wrote: > > On Tue, Jan 03, 2023 at 11:03:32AM +0530, Amit Kapila wrote: > > On Thu, Dec 15, 2022 at 4:47 AM Nathan Bossart > > wrote: > >> On Wed, Dec 14, 2022 at 02:02:58PM -0500, Tom Lane wrote: > >> > Maybe we could have workers that are exiting

Re: [PATCH] Improve ability to display optimizer analysis using OPTIMIZER_DEBUG

2023-01-03 Thread David Rowley
On Wed, 4 Jan 2023 at 17:39, Vladimir Churyukin wrote: > > On Tue, Jan 3, 2023 at 7:41 PM David Rowley wrote: >> From what I can see here, the motivation to make this a useful feature >> is backwards from what is normal. I think if you're keen to see a >> feature that allows you better

Re: [PATCH] CF app: add "Returned: Needs more interest"

2023-01-03 Thread vignesh C
On Tue, 3 Jan 2023 at 22:01, Jacob Champion wrote: > > On Tue, Jan 3, 2023 at 4:14 AM vignesh C wrote: > > The patch does not apply on top of HEAD as in [1], please post a rebased > > patch: > > Hi Vignesh -- this is a patch for the CF app, not the Postgres repo, > so cfbot won't be able to

Re: [PATCH] Improve ability to display optimizer analysis using OPTIMIZER_DEBUG

2023-01-03 Thread Vladimir Churyukin
On Tue, Jan 3, 2023 at 7:41 PM David Rowley wrote: > On Wed, 4 Jan 2023 at 16:15, Vladimir Churyukin > wrote: > > As an end user that spends a lot of time optimizing pretty complicated > queries, I'd say that something like this could be useful. > > I think we really need to at least see that

Re: pgsql: Delay commit status checks until freezing executes.

2023-01-03 Thread Peter Geoghegan
On Tue, Jan 3, 2023 at 7:56 PM Andres Freund wrote: > I still think these moderation rules are deeply unhelpful... Yes, it is rather annoying. > I don't know - I think there's a explicit comment somewhere, but I couldn't > find it immediately. There's a bunch of indirect references to in in >

Re: wake up logical workers after ALTER SUBSCRIPTION

2023-01-03 Thread Amit Kapila
On Tue, Jan 3, 2023 at 11:51 PM Nathan Bossart wrote: > > On Tue, Jan 03, 2023 at 11:43:59AM +0530, Amit Kapila wrote: > > On Wed, Dec 7, 2022 at 11:42 PM Nathan Bossart > > wrote: > >> After sleeping on this, I think we can do better. IIUC we can simply check > >> for AllTablesyncsReady() at

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-03 Thread David Rowley
On Wed, 4 Jan 2023 at 03:11, Ankit Kumar Pandey wrote: > #2. If order by clause in the Window function is superset of order by in query > > explain analyze select a,row_number() over (order by a,b,c),count(*) over > (order by a,b) from abcd order by a; > >

Re: pgsql: Delay commit status checks until freezing executes.

2023-01-03 Thread Andres Freund
Hi, On 2023-01-03 17:54:37 -0800, Peter Geoghegan wrote: > (Pruning -committers from the list, since cross-posting to -hackers > resulted in this being held up for moderation.) I still think these moderation rules are deeply unhelpful... > On Tue, Jan 3, 2023 at 5:15 PM Peter Geoghegan wrote:

Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler?

2023-01-03 Thread Thomas Munro
On Mon, Jan 2, 2023 at 8:38 AM Thomas Munro wrote: > On Sat, Dec 31, 2022 at 6:36 PM Noah Misch wrote: > > On Sat, Dec 31, 2022 at 10:06:53AM +1300, Thomas Munro wrote: > > > Idea #8 is a realisation that twisting oneself into a pretzel to avoid > > > having to change the regexp code or its

Re: [PATCH] Improve ability to display optimizer analysis using OPTIMIZER_DEBUG

2023-01-03 Thread David Rowley
On Wed, 4 Jan 2023 at 16:15, Vladimir Churyukin wrote: > As an end user that spends a lot of time optimizing pretty complicated > queries, I'd say that something like this could be useful. I think we really need to at least see that it *is* useful, not that it *could be* useful. For example,

Re: [PATCH] Improve ability to display optimizer analysis using OPTIMIZER_DEBUG

2023-01-03 Thread Vladimir Churyukin
As an end user that spends a lot of time optimizing pretty complicated queries, I'd say that something like this could be useful. Right now the optimizer is mostly a black box. Why it chooses one plan or the other, it's a mystery. I have some general ideas about that, and I can even read and

Re: pgsql: Delay commit status checks until freezing executes.

2023-01-03 Thread Peter Geoghegan
(Pruning -committers from the list, since cross-posting to -hackers resulted in this being held up for moderation.) On Tue, Jan 3, 2023 at 5:15 PM Peter Geoghegan wrote: > > On Tue, Jan 3, 2023 at 4:54 PM Andres Freund wrote: > > There's some changes from TransactionIdDidCommit() to > >

Re: [PATCH] Improve ability to display optimizer analysis using OPTIMIZER_DEBUG

2023-01-03 Thread David Rowley
On Tue, 3 Jan 2023 at 19:59, Ankit Kumar Pandey wrote: > > > On 03/01/23 08:38, David Rowley wrote: > > Do you actually have a need for this or are you just trying to tick > > off some TODO items? > > > I would say Iatter but reason I picked it up was more on side of > learning optimizer better.

Re: Common function for percent placeholder replacement

2023-01-03 Thread Nathan Bossart
In general, +1. On Tue, Dec 20, 2022 at 06:30:40AM +0100, Peter Eisentraut wrote: > (Still need to think about Robert's comment about lack of error context.) Would adding the name of the GUC be sufficient? ereport(ERROR, (errmsg("could not build %s", guc_name),

Re: moving extraUpdatedCols out of RangeTblEntry (into ModifyTable)

2023-01-03 Thread Tom Lane
I wrote: > I think what we have to do basically is repeat what fill_extraUpdatedCols > does independently for each target table. That's not really horrible: > given the premise that we're moving this calculation into the planner, > we can have expand_single_inheritance_child run the code while we

Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX

2023-01-03 Thread Nathan Bossart
On Sun, Dec 18, 2022 at 03:30:18PM -0800, Nathan Bossart wrote: > Here is a new version of the patch. Besides some cleanup, I added an index > on reltoastrelid for the toast-to-main-relation lookup. Before I bother > adjusting the tests and documentation, I'm curious to hear thoughts on >

Re: [PATCH] pg_dump: lock tables in batches

2023-01-03 Thread Tom Lane
Gilles Darold writes: > As it seems to have a consensus to apply this patch I will change the > commitfest status to ready for committers. Yeah. I still have a nagging worry about why I didn't do this already, but without evidence I can't fairly block the patch. Hence, pushed. I did cut the

Re: doc: add missing "id" attributes to extension packaging page

2023-01-03 Thread Karl O. Pinc
On Tue, 3 Jan 2023 21:35:09 +0100 Brar Piening wrote: > On 02.01.2023 at 21:53, Karl O. Pinc wrote: > > If the author will look over my version of the patch I believe it > > can be approved and sent on to the committers. > > LGTM. Approved for committer! Regards, Karl Free Software: "You

Re: allowing for control over SET ROLE

2023-01-03 Thread Noah Misch
On Tue, Jan 03, 2023 at 02:43:10PM -0500, Robert Haas wrote: > On Sat, Dec 31, 2022 at 1:16 AM Noah Misch wrote: > > On Thu, Nov 17, 2022 at 04:24:24PM -0800, Jeff Davis wrote: > > > On Thu, 2022-11-17 at 16:52 -0500, Robert Haas wrote: > > > > But I think the bigger reason is that, in my

Re: typos

2023-01-03 Thread Justin Pryzby
On Tue, Jan 03, 2023 at 04:28:29PM +0900, Michael Paquier wrote: > On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote: > > # Use larger ccache cache, as this task compiles with multiple compilers > / > # flag combinations > -CCACHE_MAXSIZE: "1GB" > +CCACHE_MAXSIZE:

Re: RADIUS tests and improvements

2023-01-03 Thread Andreas Karlsson
On 1/3/23 22:16, Thomas Munro wrote: On Wed, Jan 4, 2023 at 10:07 AM Andreas Karlsson wrote: Another thing: shouldn't we set some wait event to indicate that we are waiting the RADIUS server or is that pointless during authentication since there are no queries running anyway? I initially

Re: RADIUS tests and improvements

2023-01-03 Thread Thomas Munro
On Wed, Jan 4, 2023 at 10:03 AM Andreas Karlsson wrote: > On 1/3/23 04:11, Thomas Munro wrote: > > [...] While adding > > the GUC I couldn't help wondering why RADIUS even needs a timeout > > separate from authentication_timeout; another way to go here would be > > to remove it completely, but

Re: RADIUS tests and improvements

2023-01-03 Thread Thomas Munro
On Wed, Jan 4, 2023 at 10:07 AM Andreas Karlsson wrote: > Another thing: shouldn't we set some wait event to indicate that we are > waiting the RADIUS server or is that pointless during authentication > since there are no queries running anyway? I initially added a wait_event value, but I

Re: RADIUS tests and improvements

2023-01-03 Thread Andreas Karlsson
On 1/3/23 22:03, Andreas Karlsson wrote: On 1/3/23 04:11, Thomas Munro wrote: Here's a draft patch to tackle a couple of TODOs in the RADIUS code in auth.c. Nice to see someone working on this!. Another thing: shouldn't we set some wait event to indicate that we are waiting the RADIUS

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-01-03 Thread Jacob Champion
On Thu, Dec 8, 2022 at 3:10 PM Jacob Champion wrote: > For now, it's worked around in v4. This should finally get the cfbot > fully green. Cirrus's switch to M1 Macs changed the Homebrew installation path, so v5 adjusts the workaround accordingly. --Jacob 1: b01812f604 ! 1: 7618037c86 libpq:

Re: RADIUS tests and improvements

2023-01-03 Thread Andreas Karlsson
On 1/3/23 04:11, Thomas Munro wrote: Here's a draft patch to tackle a couple of TODOs in the RADIUS code in auth.c. Nice to see someone working on this! I know of one company which could have used the configurable timeout for radius because the 3 second timeout is too short for 2FA. I think

Re: heapgettup refactoring

2023-01-03 Thread Melanie Plageman
On Mon, Jan 2, 2023 at 5:23 AM Peter Eisentraut wrote: > > On 30.11.22 23:34, Melanie Plageman wrote: > > I have attached a patchset with only the code changes contained in the > > previous patch 0003. I have broken the refactoring down into many > > smaller pieces for ease of review. > > To keep

Re: doc: add missing "id" attributes to extension packaging page

2023-01-03 Thread Brar Piening
On 02.01.2023 at 21:53, Karl O. Pinc wrote: If the author will look over my version of the patch I believe it can be approved and sent on to the committers. LGTM. Thanks! Brar

Re: enable_timeout_every() and fin_time

2023-01-03 Thread Robert Haas
On Tue, Jan 3, 2023 at 3:14 PM Andres Freund wrote: > Doesn't that discrepancy already exist as the code stands, because > startup_progress_phase_start_time is also set in > has_startup_progress_timeout_expired()? I don't think it is, actually. > I realize that was an example, but the > issue

Why are we using blocking libpq in the backend?

2023-01-03 Thread Andres Freund
Hi, As noted in [1], and also commented on by other previously, we use libpq in blocking mode in libpqwalreceiver, postgres_fdw, etc. This is done knowingly, see e.g. comments like: /* * Submit the query. Since we don't use non-blocking mode, this could * theoretically

Re: postgres_fdw uninterruptible during connection establishment / ProcSignalBarrier

2023-01-03 Thread Robert Haas
On Sun, Sep 25, 2022 at 7:22 PM Andres Freund wrote: > Maybe I am missing something, but I don't think it's OK for > connect_pg_server() to connect in a blocking manner, without accepting > interrupts? I remember noticing various problems in this area years ago. I'm not sure whether I noticed

Re: enable_timeout_every() and fin_time

2023-01-03 Thread Andres Freund
Hi, On 2023-01-03 13:33:34 -0500, Robert Haas wrote: > On Sun, Jan 1, 2023 at 7:36 PM Andres Freund wrote: > > What is the use case for an absolute start time plus a relative > > interval? > > The code snippet that you indicate has the important side effect of > changing the global variable

Re: fixing CREATEROLE

2023-01-03 Thread Robert Haas
On Fri, Dec 23, 2022 at 4:55 PM Robert Haas wrote: > On Thu, Dec 22, 2022 at 9:14 AM Alvaro Herrera > wrote: > > The contents looks good to me other than that problem, and I agree to > > backpatch it. > > Cool. Thanks for the review. > > > Why did you choose to use two dots for ellipses in some

Re: postgres_fdw uninterruptible during connection establishment / ProcSignalBarrier

2023-01-03 Thread Andres Freund
Hi, On 2022-12-30 14:14:55 +1300, Thomas Munro wrote: > Oh, I was imagining something slightly different. Not something under > src/include/libpq, but conceptually a separate header-only library > that is above both the backend and libpq. Maybe something like >

Re: [PATCH] pg_dump: lock tables in batches

2023-01-03 Thread Gilles Darold
Le 08/12/2022 à 01:03, Tom Lane a écrit : Andres Freund writes: On 2022-12-07 17:53:05 -0500, Tom Lane wrote: Is "-s" mode actually a relevant criterion here? With per-table COPY commands added into the mix you could not possibly get better than 2x improvement, and likely a good deal less.

Re: allowing for control over SET ROLE

2023-01-03 Thread Robert Haas
On Sat, Dec 31, 2022 at 1:16 AM Noah Misch wrote: > On Thu, Nov 17, 2022 at 04:24:24PM -0800, Jeff Davis wrote: > > On Thu, 2022-11-17 at 16:52 -0500, Robert Haas wrote: > > > But I think the bigger reason is that, in my opinion, this proposal is > > > more generally useful, because it takes no

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-01-03 Thread Tom Lane
Vik Fearing writes: > I have not posted my paper to the committee yet, but I plan to do so > before the working group's meeting early February. Just like with > posting patches here, I cannot guarantee that it will get accepted but I > will be arguing for it. > I don't think we should add

Re: moving extraUpdatedCols out of RangeTblEntry (into ModifyTable)

2023-01-03 Thread Tom Lane
Amit Langote writes: > Updated to replace a list_nth() with list_nth_node() and rewrote the > commit message. So I was working through this with intent to commit, when I realized that the existing code it's revising is flat out broken. You can't simply translate a parent rel's set of dependent

Re: recovery modules

2023-01-03 Thread Nathan Bossart
On Tue, Jan 03, 2023 at 09:59:17AM -0800, Nathan Bossart wrote: > Here is a rebased patch set for cfbot. I noticed that cfbot's Windows tests are failing because the backslashes in the archive directory path are causing escaping problems. Here is an attempt to fix that by converting all

Re: [PATCH] Expand character set for ltree labels

2023-01-03 Thread Garen Torikian
Sure. Rebased onto HEAD. On Tue, Jan 3, 2023 at 7:27 AM vignesh C wrote: > On Thu, 6 Oct 2022 at 03:35, Garen Torikian wrote: > > > > After digging into it, you are completely correct. I had to do a bit > more reading to understand the relationships between UTF-8 and wchar, but > ultimately

Re: enable_timeout_every() and fin_time

2023-01-03 Thread Robert Haas
On Sun, Jan 1, 2023 at 7:36 PM Andres Freund wrote: > What is the use case for an absolute start time plus a relative > interval? The code snippet that you indicate has the important side effect of changing the global variable startup_progress_phase_start_time, which is used by

Re: Simplify standby state machine a bit in WaitForWALToBecomeAvailable()

2023-01-03 Thread Nathan Bossart
On Tue, Jan 03, 2023 at 02:53:10PM +0530, Bharath Rupireddy wrote: > In summary: > the flow when the standby is in crash recovery is pg_wal -> [archive > -> pg_wal -> stream] -> [archive -> pg_wal -> stream] -> [] -> [] ... > the flow when the standby is in archive recovery is [archive -> pg_wal >

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-01-03 Thread Vik Fearing
On 1/3/23 19:14, Tom Lane wrote: Corey Huinker writes: On Mon, Jan 2, 2023 at 10:57 AM Tom Lane wrote: While I approve of trying to get some functionality in this area, I'm not sure that extending CAST is a great idea, because I'm afraid that the SQL committee will do something that

Re: wake up logical workers after ALTER SUBSCRIPTION

2023-01-03 Thread Nathan Bossart
On Tue, Jan 03, 2023 at 11:43:59AM +0530, Amit Kapila wrote: > On Wed, Dec 7, 2022 at 11:42 PM Nathan Bossart > wrote: >> After sleeping on this, I think we can do better. IIUC we can simply check >> for AllTablesyncsReady() at the end of process_syncing_tables_for_apply() >> and wake up the

Re: Error-safe user functions

2023-01-03 Thread Robert Haas
On Sun, Dec 25, 2022 at 12:13 PM Tom Lane wrote: > Here's a proposed patch for converting regprocin and friends > to soft error reporting. I'll say at the outset that it's an > engineering compromise, and it may be worth going further in > future. But I doubt it's worth doing more than this for

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-01-03 Thread Tom Lane
Corey Huinker writes: > On Mon, Jan 2, 2023 at 10:57 AM Tom Lane wrote: >> While I approve of trying to get some functionality in this area, >> I'm not sure that extending CAST is a great idea, because I'm afraid >> that the SQL committee will do something that conflicts with it. > I'm going

Re: wake up logical workers after ALTER SUBSCRIPTION

2023-01-03 Thread Nathan Bossart
On Tue, Jan 03, 2023 at 11:03:32AM +0530, Amit Kapila wrote: > On Thu, Dec 15, 2022 at 4:47 AM Nathan Bossart > wrote: >> On Wed, Dec 14, 2022 at 02:02:58PM -0500, Tom Lane wrote: >> > Maybe we could have workers that are exiting for that reason set a >> > flag saying "please restart me without

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-01-03 Thread Corey Huinker
On Mon, Jan 2, 2023 at 10:57 AM Tom Lane wrote: > Corey Huinker writes: > > The proposed changes are as follows: > > CAST(expr AS typename) > > continues to behave as before. > > CAST(expr AS typename ERROR ON ERROR) > > has the identical behavior as the unadorned CAST() above. > >

Re: recovery modules

2023-01-03 Thread Nathan Bossart
Here is a rebased patch set for cfbot. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 7fecc9c9dc8a0ebbfbb1828a8410dac1be1ce7f5 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Fri, 23 Dec 2022 16:35:25 -0800 Subject: [PATCH v3 1/3] Move the code to restore files via the

Re: Stack overflow issue

2023-01-03 Thread Sascha Kuhl
Great work. Max Stack depth is memory dependent? Processor dependent? Егор Чиндяскин schrieb am Mi., 24. Aug. 2022, 11:51: > Hello, I recently got a server crash (bug #17583 [1]) caused by a stack > overflow. > > Tom Lane and Richard Guo, in a discussion of this bug, suggested that > there

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-01-03 Thread Andrew Dunstan
On 2023-01-02 Mo 10:57, Tom Lane wrote: > Corey Huinker writes: >> The proposed changes are as follows: >> CAST(expr AS typename) >> continues to behave as before. >> CAST(expr AS typename ERROR ON ERROR) >> has the identical behavior as the unadorned CAST() above. >> CAST(expr AS

Re: Add index scan progress to pg_stat_progress_vacuum

2023-01-03 Thread Imseih (AWS), Sami
> cirrus-ci.com/task/4557389261701120 I earlier compiled without building with --enable-cassert, which is why the compilation errors did not produce on my buid. Fixed in v19. Thanks -- Sami Imseih Amazon Web Services: https://aws.amazon.com

Re: [PATCH] random_normal function

2023-01-03 Thread Tom Lane
I wrote: > Michael Paquier writes: >> FYI, here is the failure: >> [21:23:10.814] In file included from pg_prng.c:27: >> [21:23:10.814] ../../src/include/utils/float.h:46:16: error: ‘struct >> Node’ declared inside parameter list will not be visible outside of >> this definition or declaration

Re: [PATCH] CF app: add "Returned: Needs more interest"

2023-01-03 Thread Jacob Champion
On Tue, Jan 3, 2023 at 4:14 AM vignesh C wrote: > The patch does not apply on top of HEAD as in [1], please post a rebased > patch: Hi Vignesh -- this is a patch for the CF app, not the Postgres repo, so cfbot won't be able to apply it. Let me know if there's a better place for me to put it.

Re: 128-bit integers can range only up to (2 ^ 63 -1)

2023-01-03 Thread Tom Lane
jian he writes: > On Tue, Jan 3, 2023 at 8:50 PM Tom Lane wrote: >> What's your grounds for claiming that? > I did something like int128 a1 = 9223372036854775807 + > 1; Well, that's going to do the arithmetic in (probably) long int. regards, tom

Re: typos

2023-01-03 Thread Peter Eisentraut
On 03.01.23 09:41, Michael Paquier wrote: On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote: One minor comment: -spoken in Belgium (BE), with a UTF-8 character set +spoken in Belgium (BE), with a UTF-8 character set Shouldn't this be UTF8 as we are using in func.sgml? Yeah,

Re: 128-bit integers can range only up to (2 ^ 63 -1)

2023-01-03 Thread jian he
On Tue, Jan 3, 2023 at 8:50 PM Tom Lane wrote: > jian he writes: > > I am slightly confused by the int128 type. I thought the 128 bit integer > > means range type will be upto 2 ^ 127 - 1. > > Now just copy the above code and test the int128 range. > > int128 can only up to 9223372036854775807

Re: Is OpenSSL AES-NI not available in pgcrypto?

2023-01-03 Thread aghart...@gmail.com
Hi, I see, I was hoping that wasn't the case. Thanks a lot for your support. My best regards, Agharta Il 03/01/23 16:54, Peter Eisentraut ha scritto: On 02.01.23 17:57, aghart...@gmail.com wrote: select pgp_sym_encrypt(data::text, 'pwd') --default to aes128 from

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2023-01-03 Thread Tom Lane
I wrote: > It occurs to me that we should now be able to drop configure's > probe for -Wno-compound-token-split-by-macro, since that was only > needed to suppress warnings in the Perl headers. ... or not. A bit of experimentation says that they still come out, apparently because the warnings are

Re: Is OpenSSL AES-NI not available in pgcrypto?

2023-01-03 Thread Peter Eisentraut
On 02.01.23 17:57, aghart...@gmail.com wrote: select pgp_sym_encrypt(data::text, 'pwd') --default to aes128 from generate_series('2022-01-01'::timestamp, '2022-12-31'::timestamp, '1 hour'::interval) data vs select pgp_sym_encrypt(data::text, 'pwd','cipher-algo=bf') -- blowfish from

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2023-01-03 Thread Tom Lane
Andres Freund writes: > On 2023-01-02 15:46:36 -0800, Andres Freund wrote: >> I haven't seen any problems in HEAD, so I'm working on backpatching. > And done. It occurs to me that we should now be able to drop configure's probe for -Wno-compound-token-split-by-macro, since that was only needed

Re: Stack overflow issue

2023-01-03 Thread Егор Чиндяскин
>Среда, 26 октября 2022, 21:47 +07:00 от Egor Chindyaskin : >  >24.08.2022 20:58, Tom Lane writes: >> Nice work! I wonder if you can make the regex crashes reachable by >> reducing the value of max_stack_depth enough that it's hit before >> reaching the "regular expression is too complex" limit.

Re: Data loss on logical replication, 12.12 to 14.5, ALTER SUBSCRIPTION

2023-01-03 Thread Michail Nikolaev
> Does that by any chance mean you are using a non-community version of > Postgres which has some other changes? It is a managed Postgres service in the general cloud. Usually, such providers apply some custom minor patches. The only one I know about - about forbidding of canceling queries while

Re: 128-bit integers can range only up to (2 ^ 63 -1)

2023-01-03 Thread Tom Lane
jian he writes: > I am slightly confused by the int128 type. I thought the 128 bit integer > means range type will be upto 2 ^ 127 - 1. > Now just copy the above code and test the int128 range. > int128 can only up to 9223372036854775807 (2 ^ 63 -1). What's your grounds for claiming that?

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-01-03 Thread Melih Mutlu
Hi hackers, Sending an updated version of this patch to get rid of compiler warnings. I would highly appreciate any feedback. Thanks, -- Melih Mutlu Microsoft v2-0001-Add-replication-protocol-cmd-to-create-a-snapshot.patch Description: Binary data

Re: Allow placeholders in ALTER ROLE w/o superuser

2023-01-03 Thread Pavel Borisov
On Tue, 3 Jan 2023 at 17:28, Justin Pryzby wrote: > > On Tue, Jan 03, 2023 at 02:20:38PM +0300, Pavel Borisov wrote: > > Hi, Alexander! > > > > On Tue, 3 Jan 2023 at 13:48, Alexander Korotkov > > wrote: > > > > > > On Tue, Jan 3, 2023 at 11:51 AM Pavel Borisov > > > wrote: > > > > On Tue, 3

Re: Allow placeholders in ALTER ROLE w/o superuser

2023-01-03 Thread Alexander Korotkov
On Tue, Jan 3, 2023 at 5:28 PM Justin Pryzby wrote: > On Tue, Jan 03, 2023 at 09:29:00AM +0300, Alexander Korotkov wrote: > > On Mon, Jan 2, 2023 at 6:42 PM Justin Pryzby wrote: > > > I also suggest that meson.build should not copy regress_args. > > > > Good point, thanks. > > I should've

Re: Allow placeholders in ALTER ROLE w/o superuser

2023-01-03 Thread Justin Pryzby
On Tue, Jan 03, 2023 at 02:20:38PM +0300, Pavel Borisov wrote: > Hi, Alexander! > > On Tue, 3 Jan 2023 at 13:48, Alexander Korotkov wrote: > > > > On Tue, Jan 3, 2023 at 11:51 AM Pavel Borisov > > wrote: > > > On Tue, 3 Jan 2023 at 09:29, Alexander Korotkov > > > wrote: > > > > > > > > On

Re: Cygwin cleanup

2023-01-03 Thread Justin Pryzby
On Tue, Jan 03, 2023 at 05:54:56PM +0530, vignesh C wrote: > > On Thu, Oct 20, 2022 at 10:40:40PM -0500, Justin Pryzby wrote: > > > On Thu, Aug 04, 2022 at 04:16:06PM +1200, Thomas Munro wrote: > > > > On Thu, Aug 4, 2022 at 3:38 PM Justin Pryzby > > > > wrote: > > > > > [train wreck] > > > > >

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-03 Thread Ankit Kumar Pandey
Hi, On 03/01/23 08:21, David Rowley wrote: I do think you'll likely want to put any WindowClauses which have pathkeys which are a true subset or true superset of the ORDER BY / DISTINCT pathkeys last. If they're a superset then we won't need to perform any additional ordering for the DISTINCT

Re: WIN32 pg_import_system_collations

2023-01-03 Thread Peter Eisentraut
On 09.12.22 13:48, Juan José Santamaría Flecha wrote: On Thu, Dec 1, 2022 at 8:46 AM Peter Eisentraut > wrote: What is the status of this now?  I think the other issue has been addressed? Yes, that's addressed for MSVC builds. I think there

Re: Optimizing Node Files Support

2023-01-03 Thread vignesh C
On Fri, 2 Dec 2022 at 19:06, Ranier Vilela wrote: > > Hi, thanks for reviewing this. > > Em sex., 2 de dez. de 2022 às 09:24, John Naylor > escreveu: >> >> >> On Thu, Dec 1, 2022 at 8:02 PM Ranier Vilela wrote: >> > >> > Hi, >> > >> > I believe that has room for improving generation node

Re: [PATCH] New [relation] option engine

2023-01-03 Thread vignesh C
On Sun, 20 Nov 2022 at 11:42, Nikolay Shaplov wrote: > > В письме от воскресенье, 6 ноября 2022 г. 19:22:09 MSK пользователь Nikolay > Shaplov написал: > > > > > > cfbot reports the patch no longer applies. As CommitFest 2022-11 is > > > > > currently underway, this would be an excellent time to

Re: moving extraUpdatedCols out of RangeTblEntry (into ModifyTable)

2023-01-03 Thread vignesh C
On Thu, 8 Dec 2022 at 08:17, Amit Langote wrote: > > On Wed, Dec 7, 2022 at 8:54 PM Amit Langote wrote: > > Per Alvaro's advice, forking this from [1]. > > > > In that thread, Tom had asked if it wouldn't be better to find a new > > place to put extraUpdatedCols [2] instead of RangeTblEntry,

Re: SLRUs in the main buffer pool - Page Header definitions

2023-01-03 Thread vignesh C
On Fri, 16 Dec 2022 at 04:47, Bagga, Rishu wrote: > Rebased and updated a new patch addressing the critical section issue in > RecordNewMultliXact.In GetNewMultiXactId, we now make our ReadBuffer > calls before starting the critical section, but while holding the > MultiXactGenLock, so we always

Re: MultiXact\SLRU buffers configuration

2023-01-03 Thread vignesh C
On Fri, 19 Aug 2022 at 21:18, wrote: > > Andrey Borodin wrote 2022-08-18 06:35: > > > > I like the idea of one knob instead of one per each SLRU. Maybe we > > even could deduce sane value from NBuffers? That would effectively > > lead to 0 knobs :) > > > > Your patch have a prefix "v22-0006",

Re: [PATCH]Feature improvement for MERGE tab completion

2023-01-03 Thread vignesh C
On Wed, 21 Sept 2022 at 10:55, Fujii Masao wrote: > > > > On 2022/09/21 0:51, Alvaro Herrera wrote: > > The rules starting at line 4111 make me a bit nervous, since nowhere > > we're restricting them to operating only on MERGE lines. I don't think > > it's a real problem since USING is not

Re: [PATCH] Expand character set for ltree labels

2023-01-03 Thread vignesh C
On Thu, 6 Oct 2022 at 03:35, Garen Torikian wrote: > > After digging into it, you are completely correct. I had to do a bit more > reading to understand the relationships between UTF-8 and wchar, but > ultimately the existing locale support works for my use case. > > Therefore I have updated

Re: Cygwin cleanup

2023-01-03 Thread vignesh C
On Wed, 9 Nov 2022 at 06:34, Justin Pryzby wrote: > > On Thu, Oct 20, 2022 at 10:40:40PM -0500, Justin Pryzby wrote: > > On Thu, Aug 04, 2022 at 04:16:06PM +1200, Thomas Munro wrote: > > > On Thu, Aug 4, 2022 at 3:38 PM Justin Pryzby wrote: > > > > [train wreck] > > > > > > Oh my, so I'm getting

Re: CI and test improvements

2023-01-03 Thread vignesh C
On Fri, 30 Dec 2022 at 09:29, Thomas Munro wrote: > > On Wed, Nov 23, 2022 at 11:57 AM Justin Pryzby wrote: > > [PATCH 02/10] cirrus/macos: switch to "macos_instance" / M1.. > > Duelling patches. > > Bilal's patch[1] uses the matrix feature to run the tests on both > Intel and ARM, which made

Re: [PATCH] CF app: add "Returned: Needs more interest"

2023-01-03 Thread vignesh C
On Wed, 26 Oct 2022 at 04:25, Jacob Champion wrote: > > On Mon, Aug 8, 2022 at 8:45 AM Andres Freund wrote: > > On 2022-08-08 08:37:41 -0700, Jacob Champion wrote: > > > Agreed. This probably bleeds over into the other documentation thread > > > a bit -- how do we want to communicate the subtle

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-01-03 Thread vignesh C
On Tue, 20 Dec 2022 at 04:27, Corey Huinker wrote: > > > Attached is my work in progress to implement the changes to the CAST() > function as proposed by Vik Fearing. > > This work builds upon the Error-safe User Functions work currently ongoing. > > The proposed changes are as follows: > >

Re: Data loss on logical replication, 12.12 to 14.5, ALTER SUBSCRIPTION

2023-01-03 Thread Amit Kapila
On Tue, Jan 3, 2023 at 2:14 PM Michail Nikolaev wrote: > > > The point which is not completely clear from your description is the > > timing of missing records. In one of your previous emails, you seem to > > have indicated that the data missed from Table B is from the time when > > the initial

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-01-03 Thread shveta malik
> > On Tue, 27 Dec 2022 at 14:59, Hayato Kuroda (Fujitsu) > wrote: > > Note that more than half of the modifications are done by Osumi-san. > Please find a few minor comments. 1. + diffms = TimestampDifferenceMilliseconds(GetCurrentTimestamp(), + TimestampTzPlusMilliseconds(ts,

Re: Allow placeholders in ALTER ROLE w/o superuser

2023-01-03 Thread Pavel Borisov
Hi, Alexander! On Tue, 3 Jan 2023 at 13:48, Alexander Korotkov wrote: > > On Tue, Jan 3, 2023 at 11:51 AM Pavel Borisov wrote: > > On Tue, 3 Jan 2023 at 09:29, Alexander Korotkov > > wrote: > > > > > > On Mon, Jan 2, 2023 at 6:42 PM Justin Pryzby wrote: > > > > On Mon, Jan 02, 2023 at

Re: Question about initial logical decoding snapshot

2023-01-03 Thread Amit Kapila
On Tue, Jan 3, 2023 at 4:44 PM Amit Kapila wrote: > > On Fri, Dec 30, 2022 at 11:57 PM Chong Wang wrote: > > > > I'm studying the source code about creation of initial logical decoding > > snapshot. What confused me is that why must we process 3 xl_running_xacts > > before we get to the

  1   2   >