Re: make MaxBackends available in _PG_init

2022-03-26 Thread Julien Rouhaud
Hi, On Fri, Mar 25, 2022 at 03:23:17PM -0700, Andres Freund wrote: > > I don't really understand. The issue that started this thread was bugs in > extensions due to accessing MaxBackends before it is initialized - which the > patch prevents. Well, the patch prevents accessing a 0-valued MaxBacken

Re: Remove an unused function GetWalRcvWriteRecPtr

2022-03-26 Thread Julien Rouhaud
On Sat, Mar 26, 2022 at 02:52:29PM +0900, Michael Paquier wrote: > On Sat, Mar 26, 2022 at 10:51:15AM +0530, Bharath Rupireddy wrote: > > The function GetWalRcvWriteRecPtr isn't being used anywhere, however > > pg_atomic_read_u64(&walrcv->writtenUpto); (reading writtenUpto without > > spinlock) is

Re: logical decoding and replication of sequences

2022-03-26 Thread Amit Kapila
On Fri, Mar 25, 2022 at 10:20 PM Tomas Vondra wrote: > > Hmm, so fixing this might be a bit trickier than I expected. > > Firstly, currently we only send nspname/relname in the sequence message, > not the remote OID or schema. The idea was that for sequences we don't > really need schema info, so

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-26 Thread Laetitia Avrot
Hello all, Le sam. 26 mars 2022 à 01:13, Michael Paquier a écrit : > On Fri, Mar 25, 2022 at 10:09:33PM +0100, Daniel Gustafsson wrote: > > Agreed. In this case it seems that adding --exclude-extension would > make sense > > to keep conistency. I took a quick stab at doing so with the attached

Re: logical decoding and replication of sequences

2022-03-26 Thread Tomas Vondra
On 3/26/22 08:28, Amit Kapila wrote: > On Fri, Mar 25, 2022 at 10:20 PM Tomas Vondra > wrote: >> >> Hmm, so fixing this might be a bit trickier than I expected. >> >> Firstly, currently we only send nspname/relname in the sequence message, >> not the remote OID or schema. The idea was that for

Re: Column Filtering in Logical Replication

2022-03-26 Thread Tomas Vondra
On 3/26/22 05:09, Shinoda, Noriyoshi (PN Japan FSIP) wrote: > Hello, > > The 'prattrs' column has been added to the pg_publication_rel catalog, > but the current commit to catalog.sgml seems to have added it to > pg_publication_namespace. > The attached patch fixes this. > Thanks, I'll get t

Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)

2022-03-26 Thread Michael Paquier
On Wed, Mar 23, 2022 at 03:17:35PM +0900, Michael Paquier wrote: > FWIW, per my review the bit of the patch set that I found the most > relevant is the addition of a note in the docs of pg_stat_file() about > the case where "filename" is a link, because the code internally uses > stat(). The func

Re: SQL/JSON: JSON_TABLE

2022-03-26 Thread Erik Rijkers
Op 25-03-2022 om 21:30 schreef Andrew Dunstan: On 3/22/22 10:55, Daniel Gustafsson wrote: On 22 Mar 2022, at 16:31, Andrew Dunstan wrote: I'm planning on pushing the functions patch set this week and json-table next week. My comments from 30827b3c-edf6-4d41-bbf1-298181874...@yesql.se are yet

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-26 Thread Dilip Kumar
On Fri, Mar 25, 2022 at 8:16 PM Dilip Kumar wrote: > > > On a quick look, I'm guessing that XLOG_DBASE_CREATE_WAL_LOG will need > > to mirror some of the logic that was added to the replay code for the > > existing strategy, but I haven't figured out the details. > > > > Yeah, I think I got it, fo

Re: SQL/JSON: JSON_TABLE

2022-03-26 Thread Andrew Dunstan
On 3/26/22 07:29, Erik Rijkers wrote: > Op 25-03-2022 om 21:30 schreef Andrew Dunstan: >> >> On 3/22/22 10:55, Daniel Gustafsson wrote: On 22 Mar 2022, at 16:31, Andrew Dunstan wrote: I'm planning on pushing the functions patch set this week and json-table next week. >>> My c

Re: Skipping schema changes in publication

2022-03-26 Thread vignesh C
On Tue, Mar 22, 2022 at 12:38 PM vignesh C wrote: > > Hi, > > This feature adds an option to skip changes of all tables in specified > schema while creating publication. > This feature is helpful for use cases where the user wants to > subscribe to all the changes except for the changes present in

Re: Remove an unused function GetWalRcvWriteRecPtr

2022-03-26 Thread Bharath Rupireddy
On Sat, Mar 26, 2022 at 12:55 PM Julien Rouhaud wrote: > > On Sat, Mar 26, 2022 at 02:52:29PM +0900, Michael Paquier wrote: > > On Sat, Mar 26, 2022 at 10:51:15AM +0530, Bharath Rupireddy wrote: > > > The function GetWalRcvWriteRecPtr isn't being used anywhere, however > > > pg_atomic_read_u64(&wa

Re: pg_relation_size on partitioned table

2022-03-26 Thread Bharath Rupireddy
On Sat, Mar 26, 2022 at 11:35 AM Michael Paquier wrote: > > On Fri, Mar 25, 2022 at 08:52:40PM +0800, Japin Li wrote: > > Could we provide a function to get the total size of the partition table > > though the partitioned table name? Maybe we can extend > > the pg_relation_size() to get the total

Re: Identify missing publications from publisher while create/alter subscription.

2022-03-26 Thread vignesh C
On Tue, Mar 22, 2022 at 3:23 PM vignesh C wrote: > > On Tue, Mar 22, 2022 at 5:29 AM Andres Freund wrote: > > > > On 2022-02-13 19:34:05 +0530, vignesh C wrote: > > > Thanks for the comments, the attached v14 patch has the changes for the > > > same. > > > > The patch needs a rebase, it currentl

Re: Remove an unused function GetWalRcvWriteRecPtr

2022-03-26 Thread Tom Lane
Julien Rouhaud writes: > On Sat, Mar 26, 2022 at 02:52:29PM +0900, Michael Paquier wrote: >> This could be used by some external module, no? > Maybe, but WalRcv is exposed so if an external module needs it it could still > maintain its own version of GetWalRcvWriteRecPtr. We'd need to mark WalRc

PostgreSQL 15 Release Management Team (RMT) + Feature Freeze

2022-03-26 Thread Jonathan S. Katz
Hi, We are pleased to announce the Release Management Team (RMT) (cc'd) for the PostgreSQL 15 release: - John Naylor - Jonathan Katz - Michael Paquier You can find information about the responsibilities of the RMT here: https://wiki.postgresql.org/wiki/Release_Management_Team Additi

Re: psql - add SHOW_ALL_RESULTS option

2022-03-26 Thread Fabien COELHO
Hello Peter, As Tom said earlier, wasn't this fixed by 618c16707? If not, is there any other discussion on the specifics of this issue? I'm not aware of one. This answer is that I had kept psql's calls to PQerrorMessage which reports errors from the connection, whereas it needed to change

Invalid comment in ParallelQueryMain

2022-03-26 Thread Julien Rouhaud
Hi, While reading code around I just noticed that I failed to adapt a comment a couple of lines above a removed line in 0f61727b75b9. Patch attached. >From 5ba34dd1129cd1e2038ac70992a6b5e77df6121e Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Sat, 26 Mar 2022 23:55:59 +0800 Subject: [PATCH

Pointer subtraction with a null pointer

2022-03-26 Thread Tom Lane
Several of Andres' buildfarm animals have recently started to whine that "performing pointer subtraction with a null pointer has undefined behavior" for assorted places in freepage.c. >From a mathematical standpoint, this astonishes me: "x - 0 = x" is a tautology. So I'm a bit inclined to say "yo

Re: Invalid comment in ParallelQueryMain

2022-03-26 Thread Matthias van de Meent
On Sat, 26 Mar 2022 at 17:01, Julien Rouhaud wrote: > > Hi, > > While reading code around I just noticed that I failed to adapt a comment a > couple of lines above a removed line in 0f61727b75b9. Patch attached. +1, seems OK to me.

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Tom Lane
I wrote: > Several of Andres' buildfarm animals have recently started to whine > that "performing pointer subtraction with a null pointer has undefined > behavior" for assorted places in freepage.c. Ah, sorry, I meant to include a link: https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?n

Re: Add LZ4 compression in pg_dump

2022-03-26 Thread Justin Pryzby
LZ4F_HEADER_SIZE_MAX isn't defined in old LZ4. I ran into that on an ubuntu LTS, so I don't think it's so old that it shouldn't be handled more gracefully. LZ4 should either have an explicit version check, or else shouldn't depend on that feature (or should define a safe fallback version if the l

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 12:04:54 -0400, Tom Lane wrote: > Several of Andres' buildfarm animals have recently started to whine > that "performing pointer subtraction with a null pointer has undefined > behavior" for assorted places in freepage.c. > > From a mathematical standpoint, this astonishes me: "x

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Isaac Morland
On Sat, 26 Mar 2022 at 12:24, Andres Freund wrote: > NULL can never be part of the same "array object" or one past past the last > element as the pointer it is subtracted from. Hence the undefined beaviour. > Even more fundamentally, NULL is not 0 in any ordinary mathematical sense, even though

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 12:13:12 -0400, Tom Lane wrote: > This code is old, but mylodon wasn't doing that a week ago, so > Andres must've updated the compiler and/or changed its options. Yep, updated it to clang 13. It's a warning present in 13, but not in 12. I'll update it to 14 soon, now that that'

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2022-03-26 Thread Tom Lane
Tatsuo Ishii writes: > Thanks. Patch pushed. This patch has caused the PDF documentation to fail to build cleanly: [WARN] FOUserAgent - The contents of fo:block line 1 exceed the available area in the inline-progression direction by more than 50 points. (See position 125066:375) It's complain

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Tom Lane
Andres Freund writes: > On 2022-03-26 12:13:12 -0400, Tom Lane wrote: >> This code is old, but mylodon wasn't doing that a week ago, so >> Andres must've updated the compiler and/or changed its options. > Yep, updated it to clang 13. It's a warning present in 13, but not in 12. OK, that answers

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-26 Thread David G. Johnston
On Sat, Mar 26, 2022 at 1:53 AM Laetitia Avrot wrote: > Hello all, > > Le sam. 26 mars 2022 à 01:13, Michael Paquier a > écrit : > >> On Fri, Mar 25, 2022 at 10:09:33PM +0100, Daniel Gustafsson wrote: >> > Agreed. In this case it seems that adding --exclude-extension would >> make sense >> > to

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 15:18:59 +0900, Michael Paquier wrote: > On Thu, Mar 24, 2022 at 05:44:06PM +, Jacob Champion wrote: > > On Wed, 2022-03-23 at 16:54 -0700, Andres Freund wrote: > >> Another option would be to make it a GUC. With a bit of care it could be > >> automatically synced by the exis

Re: make MaxBackends available in _PG_init

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 15:22:03 +0800, Julien Rouhaud wrote: > On Fri, Mar 25, 2022 at 03:23:17PM -0700, Andres Freund wrote: > > > > I don't really understand. The issue that started this thread was bugs in > > extensions due to accessing MaxBackends before it is initialized - which the > > patch prev

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Tom Lane
I wrote: > Andres Freund writes: >> On 2022-03-26 12:13:12 -0400, Tom Lane wrote: >>> This code is old, but mylodon wasn't doing that a week ago, so >>> Andres must've updated the compiler and/or changed its options. >> Yep, updated it to clang 13. It's a warning present in 13, but not in 12. >

Re: Remove an unused function GetWalRcvWriteRecPtr

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 10:51:15 +0530, Bharath Rupireddy wrote: > The function GetWalRcvWriteRecPtr isn't being used anywhere, however > pg_atomic_read_u64(&walrcv->writtenUpto); (reading writtenUpto without > spinlock) is being used directly in pg_stat_get_wal_receiver > walreceiver.c. We either make

Re: Remove an unused function GetWalRcvWriteRecPtr

2022-03-26 Thread Bharath Rupireddy
On Sat, Mar 26, 2022 at 10:57 PM Andres Freund wrote: > > Hi, > > On 2022-03-26 10:51:15 +0530, Bharath Rupireddy wrote: > > The function GetWalRcvWriteRecPtr isn't being used anywhere, however > > pg_atomic_read_u64(&walrcv->writtenUpto); (reading writtenUpto without > > spinlock) is being used d

Re: pg_stat_statements and "IN" conditions

2022-03-26 Thread Dmitry Dolgov
> On Mon, Mar 14, 2022 at 04:51:50PM +0100, Dmitry Dolgov wrote: > > On Mon, Mar 14, 2022 at 11:38:23AM -0400, Tom Lane wrote: > > Dmitry Dolgov <9erthali...@gmail.com> writes: > > > On Mon, Mar 14, 2022 at 11:23:17AM -0400, Tom Lane wrote: > > >> I do find it odd that the proposed patch doesn't ca

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 13:23:34 -0400, Tom Lane wrote: > I wrote: > > Andres Freund writes: > >> On 2022-03-26 12:13:12 -0400, Tom Lane wrote: > >>> This code is old, but mylodon wasn't doing that a week ago, so > >>> Andres must've updated the compiler and/or changed its options. > > >> Yep, updated

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Tom Lane
I wrote: > clang is complaining about the subtraction despite it being inside > a conditional arm that cannot be reached when val is null. It's hard > to see how that isn't a flat-out compiler bug. > However, granting that it isn't going to get fixed right away, > we could replace these call sites

Re: Remove an unused function GetWalRcvWriteRecPtr

2022-03-26 Thread Tom Lane
Bharath Rupireddy writes: > On Sat, Mar 26, 2022 at 10:57 PM Andres Freund wrote: >> -1. I think it's a perfectly reasonable function to have, it doesn't cause >> architectural / maintenance issues to have it and there's several plausible >> future uses for it (moving fsyncing of received WAL to

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-03-26 Thread Tom Lane
Andres Freund writes: > On 2022-03-26 15:18:59 +0900, Michael Paquier wrote: >> On Thu, Mar 24, 2022 at 05:44:06PM +, Jacob Champion wrote: >>> On Wed, 2022-03-23 at 16:54 -0700, Andres Freund wrote: Another option would be to make it a GUC. With a bit of care it could be automatical

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 10:49:53 -0700, Andres Freund wrote: > > It's hard to see how that isn't a flat-out compiler bug. > > It only happens if the NULL is directly passed as an argument to the macro, > not if there's an intermediary variable. Argh. > > > #include > > #define relptr_store(base, rp

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Tom Lane
Andres Freund writes: > Wonder if we should try to get rid of the problem by also fixing the double > evaluation of val? I think something like Good idea. The attached also silences the warning, and getting rid of the double-eval hazard seems like a net win. > Might also be worth adding an asse

Re: Column Filtering in Logical Replication

2022-03-26 Thread Tomas Vondra
On 3/26/22 10:58, Tomas Vondra wrote: > On 3/26/22 05:09, Shinoda, Noriyoshi (PN Japan FSIP) wrote: >> Hello, >> >> The 'prattrs' column has been added to the pg_publication_rel catalog, >> but the current commit to catalog.sgml seems to have added it to >> pg_publication_namespace. >> The atta

Re: Document atthasmissing default optimization avoids verification table scan

2022-03-26 Thread Robert Haas
On Fri, Mar 25, 2022 at 5:00 PM Tom Lane wrote: > I see what James is on about here, but I agree that these specific changes > don't help much. What would actually be desirable IMO is a separate > section somewhere explaining the performance characteristics of ALTER > TABLE. Sure. If someone wan

Re: Add LZ4 compression in pg_dump

2022-03-26 Thread Justin Pryzby
On Sat, Mar 26, 2022 at 11:21:56AM -0500, Justin Pryzby wrote: > You're passing both the compression method *and* level. I think there should > be a structure which includes both. In the future, that can also handle > additional options. I'm not sure if there's anything worth saving, but I did t

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 13:57:39 -0400, Tom Lane wrote: > Seems like making it a GUC does nothing to fix the complaint you had about > passing data to workers whether it's needed or not. I don't think that was my complaint. Maybe Robert's? > Sure, we don't then need to write any new code for it, but

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-26 Thread Robert Haas
On Fri, Mar 25, 2022 at 4:09 PM Andrew Dunstan wrote: > Duplication of TAP test names has long been something that's annoyed me. Well, I think that's unwarranted. Many years ago, people discovered that it was annoying if you had to distinguish files solely based on name, and so they invented dire

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 14:13:56 -0400, Tom Lane wrote: > The attached also silences the warning, and getting rid of the double-eval > hazard seems like a net win. Looks good wrt relptr_store. Maybe we should fix the double-eval hazard in relptr_access too, think that'd be only one left over... > > M

Why is lorikeet so unstable in v14 branch only?

2022-03-26 Thread Tom Lane
I chanced to notice that buildfarm member lorikeet has been failing an awful lot lately in the v14 branch, but hardly at all in other branches. Here's a log extract from its latest run [1]: 2022-03-26 06:31:47.245 EDT [623eeb93.d202:131] pg_regress/inherit LOG: statement: create table mlparted_

Re: Pointer subtraction with a null pointer

2022-03-26 Thread Tom Lane
Andres Freund writes: > Looks good wrt relptr_store. Maybe we should fix the double-eval hazard in > relptr_access too, think that'd be only one left over... Hm. Probably not worth the trouble, because it's hard to envision a situation where rp is not a plain lvalue. reg

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 14:40:06 -0400, Robert Haas wrote: > Well, I think that's unwarranted. Many years ago, people discovered > that it was annoying if you had to distinguish files solely based on > name, and so they invented directories and pathnames. That was a good > call. Yea. I have no problem

Re: Why is lorikeet so unstable in v14 branch only?

2022-03-26 Thread Andres Freund
On 2022-03-26 14:47:07 -0400, Tom Lane wrote: > I chanced to notice that buildfarm member lorikeet has been > failing an awful lot lately in the v14 branch, but hardly > at all in other branches. Here's a log extract from its > latest run [1]: One interesting bit in the config is:

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-26 Thread Robert Haas
On Sat, Mar 26, 2022 at 3:35 PM Andres Freund wrote: > === tap tests in src/bin/pg_resetwal === > t/001_basic.pl .. ok > t/002_corrupted.pl .. ok > All tests successful. > Files=2, Tests=18, 3 wallclock secs ( 0.01 usr 0.01 sys + 2.39 cusr 0.31 > csys = 2.72 CPU) > Result: PASS > === tap

Re: Doc patch: replace 'salesmen' with 'salespeople'

2022-03-26 Thread Daniel Gustafsson
> On 25 Mar 2022, at 13:59, Dagfinn Ilmari Mannsåker wrote: > > Daniel Gustafsson writes: > >>> On 24 Mar 2022, at 19:34, Dagfinn Ilmari Mannsåker >>> wrote: >> >>> I just spotted an unnecessarily gendered example involving a 'salesmen' >>> table in the UPDATE docs. Here's a patch that chang

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-26 Thread Daniel Gustafsson
> On 26 Mar 2022, at 21:03, Robert Haas wrote: > > On Sat, Mar 26, 2022 at 3:35 PM Andres Freund wrote: >> === tap tests in src/bin/pg_resetwal === >> t/001_basic.pl .. ok >> t/002_corrupted.pl .. ok >> All tests successful. >> Files=2, Tests=18, 3 wallclock secs ( 0.01 usr 0.01 sys + 2.3

More weird compiler warnings

2022-03-26 Thread Tom Lane
serinus' experimental gcc whines about a few places in network.c: ../../../../../pgsql/src/backend/utils/adt/network.c: In function 'inetnot': ../../../../../pgsql/src/backend/utils/adt/network.c:1893:34: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 1893 |

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-26 Thread Tom Lane
Robert Haas writes: > On Sat, Mar 26, 2022 at 3:35 PM Andres Freund wrote: >> === tap tests in src/bin/pg_resetwal === >> t/001_basic.pl .. ok >> t/002_corrupted.pl .. ok >> All tests successful. > Yeah, this certainly seems like an improvement to me. +1, but will it help for CI or buildfar

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 16:24:32 -0400, Tom Lane wrote: > Robert Haas writes: > > On Sat, Mar 26, 2022 at 3:35 PM Andres Freund wrote: > >> === tap tests in src/bin/pg_resetwal === > >> t/001_basic.pl .. ok > >> t/002_corrupted.pl .. ok > >> All tests successful. > > > Yeah, this certainly seems l

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-26 Thread Daniel Gustafsson
> On 26 Mar 2022, at 21:24, Tom Lane wrote: > +1, but will it help for CI or buildfarm cases? Isn't it both, but mostly for CI since the buildfarm already prints the path when dumping the logfile. Below is a random example snippet from the buildfarm where it's fairly easy to see 001_basic.pl be

Re: More weird compiler warnings

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 16:23:26 -0400, Tom Lane wrote: > serinus' experimental gcc whines about a few places in network.c: > > ../../../../../pgsql/src/backend/utils/adt/network.c: In function 'inetnot': > ../../../../../pgsql/src/backend/utils/adt/network.c:1893:34: warning: > writing 1 byte into a r

Re: Why is lorikeet so unstable in v14 branch only?

2022-03-26 Thread Andrew Dunstan
On 3/26/22 15:49, Andres Freund wrote: > On 2022-03-26 14:47:07 -0400, Tom Lane wrote: >> I chanced to notice that buildfarm member lorikeet has been >> failing an awful lot lately in the v14 branch, but hardly >> at all in other branches. Here's a log extract from its >> latest run [1]: > One i

Re: More weird compiler warnings

2022-03-26 Thread Tom Lane
Andres Freund writes: > On 2022-03-26 16:23:26 -0400, Tom Lane wrote: >> serinus' experimental gcc whines about a few places in network.c: > I reported this to the gcc folks, that's clearly a bug. I suspect that it > might not just cause spurious warnings, but also code generation issues - but >

Re: Refactoring SSL tests

2022-03-26 Thread Daniel Gustafsson
> On 9 Feb 2022, at 14:28, Andrew Dunstan wrote: > On 2/9/22 08:11, Daniel Gustafsson wrote: >> Good point, done in the attached. > > LGTM Now that the recent changes to TAP and SSL tests have settled, I took another pass at this. After rebasing and fixing and polishing and taking it for multi

Re: Why is lorikeet so unstable in v14 branch only?

2022-03-26 Thread Tom Lane
Andrew Dunstan writes: > On 3/26/22 15:49, Andres Freund wrote: >> One interesting bit in the config is: >> [ lack of ] >> 'update_process_title = off' > I'd forgotten about that. Let me do that for REL_14_STABLE and see where > we get to. Hm. But if that does mitigate it, it still seems like a

pg_stat_get_replication_slot() marked not strict, crashes

2022-03-26 Thread Andres Freund
Hi, I'm working to increase the test coverage of pgstat related stuff higher (for the shared memory stats patch, of course). "Accidentally" noticed that SELECT * FROM pg_stat_get_replication_slot(NULL); crashes. This is present in HEAD and 14. I guess we'll have to add a code-level check in 1

Re: More weird compiler warnings

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 17:04:16 -0400, Tom Lane wrote: > Hmm, looks like the gcc folk aren't too sure either ;-). Heh, yea ;) > Okay, so we can change this code, or just do nothing and wait for > a repaired gcc. Since that's an unreleased version there's no > concern about any possible bug in-the-wi

Re: Column Filtering in Logical Replication

2022-03-26 Thread Tom Lane
Tomas Vondra writes: > I went over the patch again, polished the commit message a bit, and > pushed. May the buildfarm be merciful! Initial results aren't that great. komodoensis[1], petalura[2], and snapper[3] have all shown variants of # Failed test 'partitions with different replica identi

Re: pg_stat_get_replication_slot() marked not strict, crashes

2022-03-26 Thread Tom Lane
Andres Freund writes: > I wonder if we ought to make PG_GETARG_DATUM(n) assert that !PG_ARGISNULL(n)? > That'd perhaps make it easier to catch some of these... Don't see the point; such cases will crash just fine without any assert. The problem is lack of test coverage ... > It'd be nice to hav

Re: Why is lorikeet so unstable in v14 branch only?

2022-03-26 Thread Andrew Dunstan
On 3/26/22 17:19, Tom Lane wrote: > Andrew Dunstan writes: >> On 3/26/22 15:49, Andres Freund wrote: >>> One interesting bit in the config is: >>> [ lack of ] >>> 'update_process_title = off' >> I'd forgotten about that. Let me do that for REL_14_STABLE and see where >> we get to. > Hm. But if

Re: pg_stat_get_replication_slot() marked not strict, crashes

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 17:41:53 -0400, Tom Lane wrote: > Andres Freund writes: > > I wonder if we ought to make PG_GETARG_DATUM(n) assert that > > !PG_ARGISNULL(n)? > > That'd perhaps make it easier to catch some of these... > > Don't see the point; such cases will crash just fine without any > asse

Re: Column Filtering in Logical Replication

2022-03-26 Thread Tomas Vondra
On 3/26/22 22:37, Tom Lane wrote: > Tomas Vondra writes: >> I went over the patch again, polished the commit message a bit, and >> pushed. May the buildfarm be merciful! > > Initial results aren't that great. komodoensis[1], petalura[2], > and snapper[3] have all shown variants of > > # Faile

Re: Column Filtering in Logical Replication

2022-03-26 Thread Tom Lane
Tomas Vondra writes: > On 3/26/22 22:37, Tom Lane wrote: >> This smells like an uninitialized-variable problem, but I've had >> no luck finding any problem under valgrind. Not sure how to progress >> from here. > I think I see the problem - there's a CREATE SUBSCRIPTION but the test > is not wai

Re: Column Filtering in Logical Replication

2022-03-26 Thread Tomas Vondra
On 3/26/22 22:55, Tom Lane wrote: > Tomas Vondra writes: >> On 3/26/22 22:37, Tom Lane wrote: >>> This smells like an uninitialized-variable problem, but I've had >>> no luck finding any problem under valgrind. Not sure how to progress >>> from here. > >> I think I see the problem - there's a CR

Re: Why is lorikeet so unstable in v14 branch only?

2022-03-26 Thread Tom Lane
Andrew Dunstan writes: > Yes it seems like a bug, but hard to diagnose. It seemed like a bug back > in May:  see > Ah, right, but that link is busted. Here's the correct link: https://www.postgresql.org/message-id/flat/e6f1

Re: Document atthasmissing default optimization avoids verification table scan

2022-03-26 Thread James Coleman
On Fri, Mar 25, 2022 at 4:40 PM Robert Haas wrote: > > On Tue, Jan 25, 2022 at 8:49 AM James Coleman wrote: > > Here's a version that looks like that. I'm not convinced it's an > > improvement over the previous version: again, I expect more advanced > > users to already understand this concept, a

Re: Document atthasmissing default optimization avoids verification table scan

2022-03-26 Thread James Coleman
On Fri, Mar 25, 2022 at 5:00 PM Tom Lane wrote: > > Robert Haas writes: > > I vote for rejecting both of these patches. > > I see what James is on about here, but I agree that these specific changes > don't help much. What would actually be desirable IMO is a separate > section somewhere explain

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-26 Thread Thomas Munro
On Sat, Mar 26, 2022 at 4:14 PM Justin Pryzby wrote: > I see it here (and in cfbot), although I'm not sure how you created a new > patch for the active CF, and not for the next CF. Anyone who has ever been a CF manager has this power, it seems. I did it myself once, by accident, and got told off

Re: Document atthasmissing default optimization avoids verification table scan

2022-03-26 Thread David G. Johnston
On Sat, Mar 26, 2022 at 3:25 PM James Coleman wrote: > On Fri, Mar 25, 2022 at 4:40 PM Robert Haas wrote: > > > > On Tue, Jan 25, 2022 at 8:49 AM James Coleman wrote: > > > Here's a version that looks like that. I'm not convinced it's an > > > improvement over the previous version: again, I exp

Re: Small TAP tests cleanup for Windows and unused modules

2022-03-26 Thread Daniel Gustafsson
> On 25 Mar 2022, at 13:42, Dagfinn Ilmari Mannsåker wrote: > A quick git grep¹ revealed a few more extraneous `use Config;` > statements (and manual inspection a few more unused modules in one > file). Thanks for digging these up, they look correct to me. > src/bin/pg_ctl/t/001_start_stop.pl |

Re: Document atthasmissing default optimization avoids verification table scan

2022-03-26 Thread David G. Johnston
On Sat, Mar 26, 2022 at 4:14 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > > I would suggest rewriting 0001 to target ALTER COLUMN instead of in the > generic notes section (in the paragraph beginning "Adding a column with a > volatile DEFAULT") for the desired clarification. > > Or,

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-26 Thread Tom Lane
Thomas Munro writes: > On Sat, Mar 26, 2022 at 4:14 PM Justin Pryzby wrote: >> I see it here (and in cfbot), although I'm not sure how you created a new >> patch for the active CF, and not for the next CF. > Anyone who has ever been a CF manager has this power, it seems. I did > it myself once,

Re: Document atthasmissing default optimization avoids verification table scan

2022-03-26 Thread Tom Lane
"David G. Johnston" writes: > Or, we can leave it where things are and make sure the reader understands > there are two paths to having a NOT NULL constraint on the newly added > column. Something like: > "If you plan on having a NOT NULL constraint on the newly added column you > should add it

Re: Add LZ4 compression in pg_dump

2022-03-26 Thread Daniel Gustafsson
> On 26 Mar 2022, at 17:21, Justin Pryzby wrote: > I suggested off-list to add an 0099 patch to change LZ4 to the default, to > exercise it more on CI. No need to change the defaults in autoconf for that. The CFBot uses the cirrus file in the tree so changing what the job includes can be easily

Re: Column Filtering in Logical Replication

2022-03-26 Thread Tomas Vondra
On 3/26/22 22:58, Tomas Vondra wrote: > On 3/26/22 22:55, Tom Lane wrote: >> Tomas Vondra writes: >>> On 3/26/22 22:37, Tom Lane wrote: This smells like an uninitialized-variable problem, but I've had no luck finding any problem under valgrind. Not sure how to progress from here. >

Re: Add LZ4 compression in pg_dump

2022-03-26 Thread Justin Pryzby
On Sun, Mar 27, 2022 at 12:37:27AM +0100, Daniel Gustafsson wrote: > > On 26 Mar 2022, at 17:21, Justin Pryzby wrote: > > > I suggested off-list to add an 0099 patch to change LZ4 to the default, to > > exercise it more on CI. > > No need to change the defaults in autoconf for that. The CFBot u

Re: Document atthasmissing default optimization avoids verification table scan

2022-03-26 Thread David G. Johnston
On Sat, Mar 26, 2022 at 4:36 PM Tom Lane wrote: > "David G. Johnston" writes: > > Or, we can leave it where things are and make sure the reader understands > > there are two paths to having a NOT NULL constraint on the newly added > > column. Something like: > > > "If you plan on having a NOT N

Re: pg_relation_size on partitioned table

2022-03-26 Thread Japin Li
On Sat, 26 Mar 2022 at 22:16, Bharath Rupireddy wrote: > On Sat, Mar 26, 2022 at 11:35 AM Michael Paquier wrote: >> >> On Fri, Mar 25, 2022 at 08:52:40PM +0800, Japin Li wrote: >> > Could we provide a function to get the total size of the partition table >> > though the partitioned table name?

Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?

2022-03-26 Thread Bharath Rupireddy
On Fri, Mar 25, 2022 at 10:20 AM Greg Stark wrote: > > This doesn't seem to be getting any further attention. It sounds like > Julien didn't agree with the scope of the text. Bharath do you think > Julien's comments make sense? Will you have a chance to look at this? Thanks Greg. I was busy with

Re: make MaxBackends available in _PG_init

2022-03-26 Thread Julien Rouhaud
On Sat, Mar 26, 2022 at 10:23:16AM -0700, Andres Freund wrote: > > On 2022-03-26 15:22:03 +0800, Julien Rouhaud wrote: > > On Fri, Mar 25, 2022 at 03:23:17PM -0700, Andres Freund wrote: > > > > > > I don't really understand. The issue that started this thread was bugs in > > > extensions due to acc

Add a pg_get_query_def function (was Re: Deparsing rewritten query)

2022-03-26 Thread Julien Rouhaud
On Fri, Mar 25, 2022 at 05:49:04PM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > I'm attaching the correct patch this time, sorry about that. > > While I'm okay with this in principle, as it stands it fails > headerscheck/cpluspluscheck: > > $ src/tools/pginclude/headerscheck > In file in

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2022-03-26 Thread Tatsuo Ishii
> This patch has caused the PDF documentation to fail to build cleanly: > > [WARN] FOUserAgent - The contents of fo:block line 1 exceed the available > area in the inline-progression direction by more than 50 points. (See > position 125066:375) > > It's complaining about this: > > > interval_

Re: pg_stat_get_replication_slot() marked not strict, crashes

2022-03-26 Thread vignesh C
On Sun, Mar 27, 2022 at 2:54 AM Andres Freund wrote: > > Hi, > > I'm working to increase the test coverage of pgstat related stuff higher (for > the shared memory stats patch, of course). > > "Accidentally" noticed that > SELECT * FROM pg_stat_get_replication_slot(NULL); > crashes. This is pres