Re: Skipping schema changes in publication

2022-05-03 Thread Amit Kapila
On Tue, May 3, 2022 at 2:24 PM Peter Smith wrote: > > On Thu, Apr 28, 2022 at 9:32 PM Amit Kapila wrote: > > > ... > > Another idea that occurred to me today for tables this is as follows: > > 1. Allow to mention except during create publication ... For All Tables. > > CREATE PUBLICATION pub1

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

2022-05-03 Thread Amit Kapila
On Tue, May 3, 2022 at 9:45 AM Amit Kapila wrote: > > On Mon, May 2, 2022 at 5:06 PM Masahiko Sawada wrote: > > > > On Mon, May 2, 2022 at 6:09 PM Amit Kapila wrote: > > > > > > On Mon, May 2, 2022 at 11:47 AM Masahiko Sawada > > > wrote: > > > > > > > > > > > > Are you planning to support

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-05-03 Thread Thomas Munro
On Wed, May 4, 2022 at 8:53 AM Thomas Munro wrote: > Got some off-list clues: that's just distracting Perl cleanup noise > after something else went wrong (thanks Robert), and now I'm testing a > theory from Andres that we're missing a barrier on the redo side when > replaying

Re: SQL/JSON: FOR ORDINALITY bug

2022-05-03 Thread David G. Johnston
On Tue, May 3, 2022 at 5:27 PM Andrew Dunstan wrote: > > On 2022-05-03 Tu 11:19, Erik Rijkers wrote: > > Hi > > > > I've copied some statements from the .pdf called: > > "TECHNICAL REPORT ISO/IEC TR 19075-6 First edition 2017-03 > > Part SQL Notation support 6: (JSON) for JavaScript Object" >

Re: testclient.exe installed under MSVC

2022-05-03 Thread Andrew Dunstan
On 2022-05-01 Su 09:23, Michael Paquier wrote: > On Sun, May 01, 2022 at 01:07:06AM -0700, Noah Misch wrote: >> My annual audit for executables missing Windows icons turned up these: >> >> pginstall/bin/testclient.exe >> pginstall/bin/uri-regress.exe >> >> I was going to add the

Re: SQL/JSON: FOR ORDINALITY bug

2022-05-03 Thread Andrew Dunstan
On 2022-05-03 Tu 11:19, Erik Rijkers wrote: > Hi > > I've copied some statements from the .pdf called: > "TECHNICAL REPORT ISO/IEC TR 19075-6   First edition 2017-03 > Part SQL Notation support 6: (JSON) for JavaScript Object" > (not available anymore although there should be a similar

Re: strange slow query - lost lot of time somewhere

2022-05-03 Thread David Rowley
On Tue, 3 May 2022 at 17:02, Pavel Stehule wrote: > út 3. 5. 2022 v 6:57 odesílatel Tom Lane napsal: >> You sure there's not something taking an exclusive lock on one of these >> tables every so often? > > I am almost sure, I can see this issue only every time when I set a higher > work mem. I

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

2022-05-03 Thread Peter Smith
On Tue, May 3, 2022 at 5:16 PM Peter Smith wrote: > ... > Avoiding unexpected differences like this is why I suggested the > option should have to be explicitly enabled instead of being on by > default as it is in the current patch. See my review comment #14 [1]. > It means the user won't have

Re: [PATCH] Log details for client certificate failures

2022-05-03 Thread Jacob Champion
On Tue, 2022-05-03 at 21:06 +0200, Peter Eisentraut wrote: > The information in pg_stat_ssl is limited to NAMEDATALEN (see struct > PgBackendSSLStatus). > > It might make sense to align what your patch prints to identify > certificates with what is shown in that view. Sure, a max length should

Re: pg_walcleaner - new tool to detect, archive and delete the unneeded wal files (was Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary)

2022-05-03 Thread David Steele
On 5/3/22 17:17, Stephen Frost wrote: * Bharath Rupireddy (bharath.rupireddyforpostg...@gmail.com) wrote: The pg_walcleaner tool isn't intrusive in the sense that it doesn't delete the WAL files that are required for the server to come up (as it checks for the checkpoint redo WAL file), apart

Re: Support logical replication of DDLs

2022-05-03 Thread Zheng Li
> > >Another somewhat unrelated problem I see with this work is how to save > > >recursion of the same command between nodes (when the involved nodes > > >replicate DDLs). For DMLs, we can avoid that via replication origins > > >as is being done in the patch proposed [1] but not sure how will we >

Re: pg_walcleaner - new tool to detect, archive and delete the unneeded wal files (was Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary)

2022-05-03 Thread Stephen Frost
Greetings, * Bharath Rupireddy (bharath.rupireddyforpostg...@gmail.com) wrote: > On Tue, Apr 26, 2022 at 12:09 AM Stephen Frost wrote: > > I was thinking more specifically along the lines of "if there's > X GB > > of WAL that hasn't been archived, give up on archiving anything new" > > (which is

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-05-03 Thread Thomas Munro
On Wed, May 4, 2022 at 7:44 AM Thomas Munro wrote: > It passes sometimes and fails sometimes. Here's the weird failure I > need to debug: > > https://api.cirrus-ci.com/v1/artifact/task/6033765456674816/log/src/test/recovery/tmp_check/log/regress_log_032_relfilenode_reuse > > Right at the end, it

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-05-03 Thread Thomas Munro
On Wed, May 4, 2022 at 6:36 AM Robert Haas wrote: > On Fri, Apr 22, 2022 at 3:38 AM Thomas Munro wrote: > > So, to summarise the new patch that I'm attaching to this email as 0001: > > This all makes sense to me, and I didn't see anything obviously wrong > looking through the patch, either.

Re: bogus: logical replication rows/cols combinations

2022-05-03 Thread Tomas Vondra
On 5/2/22 22:34, Peter Eisentraut wrote: > On 01.05.22 23:42, Tomas Vondra wrote: >> Imagine have a table with customers from different regions, and you want >> to replicate the data somewhere else, but for some reason you can only >> replicate details for one particular region, and subset of

Re: failures in t/031_recovery_conflict.pl on CI

2022-05-03 Thread Andres Freund
Hi, On 2022-05-03 14:23:23 -0400, Tom Lane wrote: > Andres Freund writes: > >> So it's almost surely a timing issue, and your theory here seems plausible. > > > Unfortunately I don't think my theory holds, because I actually had added a > > defense against this into the test that I forgot about

Re: [PATCH] Log details for client certificate failures

2022-05-03 Thread Peter Eisentraut
On 03.05.22 19:04, Jacob Champion wrote: One question/concern -- the Subject that's printed to the logs could be pretty big (OpenSSL limits the incoming certificate chain to 100K, by default), which introduces an avenue for intentional log spamming. Is there an existing convention for limiting

Re: fix cost subqueryscan wrong parallel cost

2022-05-03 Thread Robert Haas
On Tue, May 3, 2022 at 2:13 PM Tom Lane wrote: > In any case, fundamental redesign of what EXPLAIN prints is a job > for v16 or later. Are you okay with the proposed patch as a v15 fix? Yes. I can't really vouch for it, but I don't object to it. -- Robert Haas EDB: http://www.enterprisedb.com

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-05-03 Thread Robert Haas
On Fri, Apr 22, 2022 at 3:38 AM Thomas Munro wrote: > So, to summarise the new patch that I'm attaching to this email as 0001: This all makes sense to me, and I didn't see anything obviously wrong looking through the patch, either. > However it seems that I have something wrong, because CI is

Re: failures in t/031_recovery_conflict.pl on CI

2022-05-03 Thread Tom Lane
Andres Freund writes: > On 2022-05-03 01:16:46 -0400, Tom Lane wrote: >> Irritatingly, it doesn't reproduce (at least not easily) in a manual >> build on the same box. > Odd, given how readily it seem to reproduce on the bf. I assume you built with >> Uses -fsanitize=alignment

Re: failures in t/031_recovery_conflict.pl on CI

2022-05-03 Thread Andres Freund
Hi, On 2022-05-03 01:16:46 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-05-02 23:44:32 -0400, Tom Lane wrote: > >> I can poke into that tomorrow, but are you sure that that isn't an > >> expectable result? > > > It's not expected. But I think I might see what the problem is: > >

Re: fix cost subqueryscan wrong parallel cost

2022-05-03 Thread Tom Lane
Robert Haas writes: > That I don't like at all. I'm still of the opinion that it's a huge > mistake for EXPLAIN to print int(rowcount/loops) instead of just > rowcount. The division is never what I want and in my experience is > also not what other people want and often causes confusion. Both the

Re: Configuration Parameter/GUC value validation hook

2022-05-03 Thread Robert Haas
On Tue, May 3, 2022 at 11:45 AM Tom Lane wrote: > Robert Haas writes: > > I have some desire here to see us solve this problem not just for > > service providers, but for users in general. You don't have to be a > > service provider to want to disallow SET work_mem = '1TB' -- you just > > need

[PATCH] Log details for client certificate failures

2022-05-03 Thread Jacob Champion
Hello, (I'm cleaning up some old git branches and found this. It was helpful when I was trying to debug failures between an NSS client and an OpenSSL server, and it seems general enough to help for more complicated OpenSSL-only setups as well.) Currently, debugging client cert verification

Re: Configuration Parameter/GUC value validation hook

2022-05-03 Thread Tom Lane
Robert Haas writes: > I have some desire here to see us solve this problem not just for > service providers, but for users in general. You don't have to be a > service provider to want to disallow SET work_mem = '1TB' -- you just > need to be a DBA on a system where such a setting will cause bad

SQL/JSON: FOR ORDINALITY bug

2022-05-03 Thread Erik Rijkers
Hi I've copied some statements from the .pdf called: "TECHNICAL REPORT ISO/IEC TR 19075-6 First edition 2017-03 Part SQL Notation support 6: (JSON) for JavaScript Object" (not available anymore although there should be a similar replacement file) In that pdf I found the data and statement

Re: Configuration Parameter/GUC value validation hook

2022-05-03 Thread Robert Haas
On Mon, May 2, 2022 at 10:54 AM Tom Lane wrote: > Bharath Rupireddy writes: > > I propose to add a simple new hook in set_config_option (void > > set_config_option_hook(struct config_generic *record);) and the > > vendors can implement their own platform-dependent extensions to > > accept or

Re: testclient.exe installed under MSVC

2022-05-03 Thread Daniel Gustafsson
> On 3 May 2022, at 15:58, Alvaro Herrera wrote: > > On 2022-May-03, Noah Misch wrote: > >> Michael Paquier recommended s/-/_/ for uri-regress, and I agree with that. >> What do you think? > > libpq_uri-regress is horrible, so +1 for that. Agreed, I'll do that before pushing. -- Daniel

Re: Proposal for internal Numeric to Uint64 conversion function.

2022-05-03 Thread Peter Eisentraut
On 03.05.22 08:50, Amul Sul wrote: Do you have any data that supports removing DirectionFunctionCall() invocations? I suppose some performance benefit could be expected, or what do you have in mind? Not really, the suggestion to avoid DirectionFunctionCall() is from Tom. For a trial, I have

Re: testclient.exe installed under MSVC

2022-05-03 Thread Alvaro Herrera
On 2022-May-03, Noah Misch wrote: > Michael Paquier recommended s/-/_/ for uri-regress, and I agree with that. > What do you think? libpq_uri-regress is horrible, so +1 for that. I would personally rename more thoroughly (say pq_uri_test), but I doubt it's worth the bikeshedding effort. --

pg_stat_statements

2022-05-03 Thread Godfrin, Philippe E
Hi, On Mon, May 02, 2022 at 12:45:28PM +, Godfrin, Philippe E wrote: >> Greetings, >> >> I want to limit the query text that gets captured in pg_stat_statements. We >> have sql statements with thousands of values clauses (upwards of 10,000) that >> run at a 1 second interval. When just a

Re: testclient.exe installed under MSVC

2022-05-03 Thread Noah Misch
On Tue, May 03, 2022 at 03:04:26PM +0200, Daniel Gustafsson wrote: > > On 3 May 2022, at 04:02, Noah Misch wrote: > > On Mon, May 02, 2022 at 03:14:50PM +0200, Daniel Gustafsson wrote: > > >> Renaming is probably the best option given how MSVC works. Using a pg_ > >> prefix > >> makes them

Re: fix cost subqueryscan wrong parallel cost

2022-05-03 Thread Robert Haas
On Mon, May 2, 2022 at 5:24 PM Tom Lane wrote: > I did look at the rest of costsize.c for similar instances, and didn't > find any. In any case, I think we have two options: > > 1. Apply this fix, and in future fix any other places that we identify > later. > > 2. Invent some entirely new scheme

Re: testclient.exe installed under MSVC

2022-05-03 Thread Daniel Gustafsson
> On 3 May 2022, at 04:02, Noah Misch wrote: > On Mon, May 02, 2022 at 03:14:50PM +0200, Daniel Gustafsson wrote: >> Renaming is probably the best option given how MSVC works. Using a pg_ prefix >> makes them sound like actual useful tools though with (albeit small) risk for >> confusion? Noah's

Re: Skipping schema changes in publication

2022-05-03 Thread Peter Smith
On Thu, Apr 28, 2022 at 9:32 PM Amit Kapila wrote: > ... > Another idea that occurred to me today for tables this is as follows: > 1. Allow to mention except during create publication ... For All Tables. > CREATE PUBLICATION pub1 FOR ALL TABLES EXCEPT TABLE t1,t2; > 2. Allow to Reset it. This new

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-05-03 Thread Alvaro Herrera
On 2022-Apr-27, Michael Paquier wrote: > On Tue, Apr 26, 2022 at 01:15:05PM -0500, David Christensen wrote: > > True. :-) This does seem like a tool geared towards "expert mode", so > > maybe we just assume if you need it you know what you're doing? > > This is definitely an expert mode toy. I

Re: failures in t/031_recovery_conflict.pl on CI

2022-05-03 Thread Alvaro Herrera
On 2022-May-02, Andres Freund wrote: > > > pgindent uses some crazy formatting nearby: > > > SendRecoveryConflictWithBufferPin( > > > > > > PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK); > > > > I do not believe that that line break is pgindent's

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

2022-05-03 Thread Peter Smith
On Tue, May 3, 2022 at 2:15 PM Amit Kapila wrote: > > On Mon, May 2, 2022 at 5:06 PM Masahiko Sawada wrote: > > > > On Mon, May 2, 2022 at 6:09 PM Amit Kapila wrote: > > > > > > On Mon, May 2, 2022 at 11:47 AM Masahiko Sawada > > > wrote: > > > > > > > > > > > > Are you planning to support

Re: Proposal for internal Numeric to Uint64 conversion function.

2022-05-03 Thread Amul Sul
On Mon, May 2, 2022 at 8:23 PM Peter Eisentraut wrote: > > On 22.04.22 14:26, Amul Sul wrote: > > Yes, I think we can do cleanup to some extent. Attaching the > > following patches that first intend to remove DirectFunctionCall as > > much as possible: > > Do you have any data that supports