Re: Export log_line_prefix(); useful for emit_log_hook.

2022-07-03 Thread Michael Paquier
On Wed, Jun 29, 2022 at 03:09:42PM +0200, Alvaro Herrera wrote: > Hmm, maybe your hypothetical book would prefer to use a different > setting for log line prefix than Log_line_prefix, so it would make sense > to pass the format string as a parameter to the function instead of > relying on the GUC g

Re: Prevent writes on large objects in read-only transactions

2022-07-03 Thread Michael Paquier
On Wed, Jun 29, 2022 at 05:29:50PM +0900, Yugo NAGATA wrote: > Thank you for reviewing the patch. I attached the updated patch. Thanks for the new version. I have looked at that again, and the set of changes seem fine (including the change for the alternate output). So, applied. -- Michael sign

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

2022-07-03 Thread Peter Smith
Below are some review comments for patch v14-0004: v14-0004 4.0 General. This comment is an after-thought but as I write this mail I am wondering if most of this 0004 patch is even necessary at all? Instead of introducing a new column and all the baggage that goes with it, can'

Re: Lazy JIT IR code generation to increase JIT speed with partitions

2022-07-03 Thread Luc Vlaming Hummel
Hi Alvaro, hi David, Thanks for reviewing this and the interesting examples! Wanted to give a bit of extra insight as to why I'd love to have a system that can lazily emit JIT code and hence creates roughly a module per function: In the end I'm hoping that we can migrate to a system where we onl

Re: Probable memory leak with ECPG and AIX

2022-07-03 Thread Noah Misch
On Sat, Jul 02, 2022 at 11:59:58PM -0400, Tom Lane wrote: > Confirmed that either initializing ecpg_clocale or adding -fno-common > allows the ecpglib build to succeed. (Testing it beyond that would > require another hour or so to build the rest of the system, so I won't.) > > As I said, I was al

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-07-03 Thread Masahiko Sawada
On Tue, Jun 28, 2022 at 10:10 PM John Naylor wrote: > > On Tue, Jun 28, 2022 at 1:24 PM Masahiko Sawada wrote: > > > > > I > > > suspect other optimizations would be worth a lot more than using AVX2: > > > - collapsing inner nodes > > > - taking care when constructing the key (more on this when w

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

2022-07-03 Thread Peter Smith
Below are some review comments for patch v14-0003: v14-0003 3.1 Commit message If any of the following checks are violated, an error will be reported. 1. The unique columns between publisher and subscriber are difference. 2. There is any non-immutable function present in expres

Re: Handle infinite recursion in logical replication setup

2022-07-03 Thread Amit Kapila
On Mon, Jul 4, 2022 at 3:59 AM Peter Smith wrote: > > On Mon, Jul 4, 2022 at 12:59 AM vignesh C wrote: > ... > > > 2. > > > /* ALTER SUBSCRIPTION SET ( */ > > > else if (HeadMatches("ALTER", "SUBSCRIPTION", MatchAny) && > > > TailMatches("SET", "(")) > > > - COMPLETE_WITH("binary", "slot_name"

Re: "ERROR: latch already owned" on gharial

2022-07-03 Thread Thomas Munro
On Wed, Jun 1, 2022 at 12:55 AM Robert Haas wrote: > OK, I have access to the box now. I guess I might as well leave the > crontab jobs enabled until the next time this happens, since Thomas > just took steps to improve the logging, but I do think these BF > members are overdue to be killed off, a

Re: Too-long socket paths are breaking several buildfarm members

2022-07-03 Thread Michael Paquier
On Sun, Jul 03, 2022 at 09:40:23PM -0400, Tom Lane wrote: > Yeah, I just came to the same conclusion and pushed an equivalent > patch. Sorry for the duplicated effort. No problem. Thanks for the quick fix. -- Michael signature.asc Description: PGP signature

Re: pgsql: dshash: Add sequential scan support.

2022-07-03 Thread Thomas Munro
[Re-directing to -hackers] On Fri, Mar 11, 2022 at 2:27 PM Andres Freund wrote: > On 2022-03-10 20:09:56 -0500, Tom Lane wrote: > > Andres Freund writes: > > > dshash: Add sequential scan support. > > > Add ability to scan all entries sequentially to dshash. The interface is > > > similar but a

Re: Issue with pg_stat_subscription_stats

2022-07-03 Thread Masahiko Sawada
On Sat, Jul 2, 2022 at 9:52 AM Masahiko Sawada wrote: > > > > On Sat, Jul 2, 2022 at 2:53 Andres Freund wrote: >> >> Hi, >> >> On 2022-07-01 16:08:48 +0900, Masahiko Sawada wrote: >> > Yes, my point is that it may be misleading that the subscription stats >> > are created when a subscription is c

Re: Too-long socket paths are breaking several buildfarm members

2022-07-03 Thread Tom Lane
Michael Paquier writes: > There is PostgreSQL::Test::Utils::tempdir_short for that, which is > what all the nodes created in Cluster.pm use for > unix_socket_directories. One way to address the issue would be to > pass that to pg_upgrade with --socketdir, as of the attached. Yeah, I just came to

Re: Too-long socket paths are breaking several buildfarm members

2022-07-03 Thread Michael Paquier
On Sun, Jul 03, 2022 at 07:22:11PM -0400, Tom Lane wrote: > That path name is 3 bytes over the platform limit. Evidently, > "REL_15_STABLE" is just enough longer than "HEAD" to make this fail, > whereas we didn't see the problem as long as the test case only > ran in HEAD. That tells enough about

Re: AIX support - alignment issues

2022-07-03 Thread Tom Lane
Andres Freund writes: > On 2022-07-03 20:08:19 -0400, Tom Lane wrote: >> I do still feel that HPPA is of interest, to keep us honest >> about spinlock support > I.e. forgetting to initialize them? Or the weird alignment stuff it has? The nonzero initialization mainly, and to a lesser extent the

Re: AIX support - alignment issues

2022-07-03 Thread Andres Freund
Hi, On 2022-07-03 20:08:19 -0400, Tom Lane wrote: > I would have preferred to keep pademelon, with its pre-C99 compiler, going > until v11 is EOL, but that ain't happening. I'm not too worried about that - clang with -std=c89 -Wc99-extensions -Werror=c99-extensions as it's running on mylodon fo

Re: AIX support - alignment issues

2022-07-03 Thread Andres Freund
Hi, On 2022-07-04 10:33:37 +1200, Thomas Munro wrote: > I don't have a dog in this race, but AIX is clearly not in the same > category as HP-UX (and maybe Solaris is somewhere in between). The reason to consider whether it's worth supporting AIX is that it's library model is very different from o

Re: AIX support - alignment issues

2022-07-03 Thread Tom Lane
Thomas Munro writes: > On Sun, Jul 3, 2022 at 8:34 AM Tom Lane wrote: >> I am a little concerned though that we don't have access to the latest >> version of AIX --- that seems like a non-maintainable situation. > The release history doesn't look t bad on that front: the live > versions are

Too-long socket paths are breaking several buildfarm members

2022-07-03 Thread Tom Lane
Buildfarm member thorntail has yet to pass the pg_upgrade test in the REL_15_STABLE branch. It looks like the problem reduces to an overlength pathname: 2022-07-04 00:27:03.404 MSK [2212393:2] LOG: Unix-domain socket path "/home/nm/farm/sparc64_deb10_gcc_64_ubsan/REL_15_STABLE/pgsql.build/src/b

Re: AIX support - alignment issues

2022-07-03 Thread Thomas Munro
On Sun, Jul 3, 2022 at 8:34 AM Tom Lane wrote: > I am a little concerned though that we don't have access to the latest > version of AIX --- that seems like a non-maintainable situation. The release history doesn't look t bad on that front: the live versions are 7.1 (2010-2023), 7.2 (2015-TBA

Re: generate_series for timestamptz and time zone problem

2022-07-03 Thread Tom Lane
=?UTF-8?Q?Przemys=c5=82aw_Sztoch?= writes: > I have problem with this: > -- Considering only built-in procs (prolang = 12), look for multiple uses > -- of the same internal function (ie, matching prosrc fields).  It's OK to > -- have several entries with different pronames for the same internal >

Re: Handle infinite recursion in logical replication setup

2022-07-03 Thread Peter Smith
On Mon, Jul 4, 2022 at 12:59 AM vignesh C wrote: ... > > 2. > > /* ALTER SUBSCRIPTION SET ( */ > > else if (HeadMatches("ALTER", "SUBSCRIPTION", MatchAny) && > > TailMatches("SET", "(")) > > - COMPLETE_WITH("binary", "slot_name", "streaming", > > "synchronous_commit", "disable_on_error"); > > +

Re: Allowing REINDEX to have an optional name

2022-07-03 Thread Tom Lane
Simon Riggs writes: > Thanks for the review, new version attached. This is marked as Ready for Committer, but that seems unduly optimistic. The cfbot shows that it's failing on all platforms --- and not in the same way on each, suggesting there are multiple problems. reg

Re: JSON/SQL: jsonpath: incomprehensible error message

2022-07-03 Thread Andrew Dunstan
On 2022-06-30 Th 04:19, Amit Kapila wrote: > On Wed, Jun 29, 2022 at 6:58 PM Erik Rijkers wrote: >> Op 29-06-2022 om 15:00 schreef Amit Kapila: >>> On Mon, Jun 27, 2022 at 8:46 PM Andrew Dunstan wrote: On 2022-06-26 Su 11:44, Erik Rijkers wrote: > JSON/SQL jsonpath > > For exam

Re: [PoC] Reducing planning time when tables have many partitions

2022-07-03 Thread Tom Lane
Yuya Watari writes: > On Thu, Mar 24, 2022 at 11:03 AM David Rowley wrote: >> I think a better way to solve this would be just to have a single hash >> table over all EquivalenceClasses that allows fast lookups of >> EquivalenceMember->em_expr. > If the predicate were "em->em_expr == something",

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-07-03 Thread Przemysław Sztoch
Michael Paquier wrote on 6/28/2022 7:14 AM: On Thu, Jun 23, 2022 at 02:10:42PM +0200, Przemysław Sztoch wrote: The only division that is probably possible is the one attached. Well, the addition of cyrillic does not make necessary the removal of SOUND RECORDING COPYRIGHT or the DEGREEs, that im

Re: Allow makeaclitem() to accept multiple privileges

2022-07-03 Thread Tom Lane
"Tharakan, Robins" writes: > Presently, makeaclitem() allows only a single privilege in a single call. > This > patch allows it to additionally accept multiple comma-separated privileges. Seems reasonable. Pushed with minor cosmetic adjustments (mostly docs changes). reg

Re: Fix proposal for comparaison bugs in PostgreSQL::Version

2022-07-03 Thread Jehan-Guillaume de Rorthais
On Sun, 3 Jul 2022 10:40:21 -0400 Andrew Dunstan wrote: > On 2022-06-29 We 05:09, Jehan-Guillaume de Rorthais wrote: > > On Tue, 28 Jun 2022 18:17:40 -0400 > > Andrew Dunstan wrote: > > > >> On 2022-06-28 Tu 16:53, Jehan-Guillaume de Rorthais wrote: > >>> ... > >>> A better fix would be to s

Re: 15beta1 tab completion of extension versions

2022-07-03 Thread Tom Lane
Noah Misch writes: > On Sun, Jul 03, 2022 at 02:00:59PM -0400, Tom Lane wrote: >> This will require one extra when what you want is to update to >> a specific version, but I doubt that that's going to bother anyone >> very much. I don't want to try to resurrect the v14 behavior exactly >> becaus

Re: automatically generating node support functions

2022-07-03 Thread Tom Lane
Peter Eisentraut writes: > Here is a patch that reformats the relevant (and a few more) comments > that way. This has been run through pgindent, so the formatting should > be stable. Now that that's been pushed, the main patch is of course quite broken. Are you working on a rebase? I looked t

Re: 15beta1 tab completion of extension versions

2022-07-03 Thread Noah Misch
On Sun, Jul 03, 2022 at 02:00:59PM -0400, Tom Lane wrote: > I wrote: > > Noah Misch writes: > >> "ALTER EXTENSION hstore UPDATE;" is a valid command (updates to the > >> control file default version). Hence, I think the v14 behavior was better. > > > Hmm ... good point, let me think about that.

Re: 15beta1 tab completion of extension versions

2022-07-03 Thread Tom Lane
I wrote: > Noah Misch writes: >> "ALTER EXTENSION hstore UPDATE;" is a valid command (updates to the >> control file default version). Hence, I think the v14 behavior was better. > Hmm ... good point, let me think about that. After consideration, my preferred solution is just this: diff --git

Re: O(n) tasks cause lengthy startups and checkpoints

2022-07-03 Thread Andres Freund
Hi, On 2022-07-03 10:07:54 -0700, Nathan Bossart wrote: > Thanks for the prompt review. > > On Sat, Jul 02, 2022 at 03:54:56PM -0700, Andres Freund wrote: > > On 2022-07-02 15:05:54 -0700, Nathan Bossart wrote: > >> + /* Obtain requested tasks */ > >> + SpinLockAcquire(&Custodia

Re: replacing role-level NOINHERIT with a grant-level option

2022-07-03 Thread Nathan Bossart
On Sat, Jul 02, 2022 at 11:04:28PM -0400, Robert Haas wrote: > On Sat, Jul 2, 2022 at 6:16 PM Nathan Bossart > wrote: >> I was thinking that when DEFAULT was removed, pg_dump would just need to >> generate WITH INHERIT TRUE/FALSE based on the value of rolinherit for older >> versions. Using the

Re: PSA: Autoconf has risen from the dead

2022-07-03 Thread Andres Freund
Hi, On 2022-07-03 10:50:49 -0400, Tom Lane wrote: > Robert Haas writes: > > Hmm, I also don't know how annoying it's going to be to get the new > > ninja/meson stuff working on macOS ... I really hope someone puts a > > good set of directions on the wiki or in the documentation or > > someplace.

Re: SQL/JSON functions vs. ECPG vs. STRING as a reserved word

2022-07-03 Thread Tom Lane
Noah Misch writes: > On Mon, May 30, 2022 at 05:20:15PM -0400, Tom Lane wrote: >> [allow EXEC SQL TYPE unreserved_keyword IS ...] > I didn't locate any problems beyond the test and doc gaps that you mentioned, > so I've marked this Ready for Committer. Thanks! Here's a fleshed-out version with

Re: O(n) tasks cause lengthy startups and checkpoints

2022-07-03 Thread Nathan Bossart
Hi Andres, Thanks for the prompt review. On Sat, Jul 02, 2022 at 03:54:56PM -0700, Andres Freund wrote: > On 2022-07-02 15:05:54 -0700, Nathan Bossart wrote: >> +/* Obtain requested tasks */ >> +SpinLockAcquire(&CustodianShmem->cust_lck); >> +flags = CustodianS

Re: PSA: Autoconf has risen from the dead

2022-07-03 Thread Tom Lane
Robert Haas writes: > Hmm, I also don't know how annoying it's going to be to get the new > ninja/meson stuff working on macOS ... I really hope someone puts a > good set of directions on the wiki or in the documentation or > someplace. If you use MacPorts it's just "install those packages", and

Re: PSA: Autoconf has risen from the dead

2022-07-03 Thread Robert Haas
On Sat, Jul 2, 2022 at 1:42 PM Tom Lane wrote: > On the whole, I'm questioning the value of messing with our autoconf > infrastructure at this stage. We did agree at PGCon that we'd keep > it going for a couple years more, but it's not real clear to me why > we can't limp along with 2.69 until we

Re: Fix proposal for comparaison bugs in PostgreSQL::Version

2022-07-03 Thread Andrew Dunstan
On 2022-06-29 We 05:09, Jehan-Guillaume de Rorthais wrote: > On Tue, 28 Jun 2022 18:17:40 -0400 > Andrew Dunstan wrote: > >> On 2022-06-28 Tu 16:53, Jehan-Guillaume de Rorthais wrote: >>> ... >>> A better fix would be to store the version internally as version_num that >>> are trivial to compute

Re: making relfilenodes 56 bits

2022-07-03 Thread Robert Haas
On Sat, Jul 2, 2022 at 3:29 PM Andres Freund wrote: > Why did you choose a quite small value for VAR_RFN_PREFETCH? VAR_OID_PREFETCH > is 8192, but you chose 64 for VAR_RFN_PREFETCH? As Dilip mentioned, I suggested a lower value. If that's too low, we can go higher, but I think there is value in n

Re: 15beta1 tab completion of extension versions

2022-07-03 Thread Tom Lane
Noah Misch writes: > I think it makes sense to send UPDATE TO as a single completion in places > where no valid command can have the UPDATE without the TO. CREATE RULE foo AS > ON UPDATE TO is a candidate, though CREATE RULE completion doesn't do that > today. "ALTER EXTENSION hstore UPDATE;" is

Re: making relfilenodes 56 bits

2022-07-03 Thread Dilip Kumar
On Sun, Jul 3, 2022 at 12:59 AM Andres Freund wrote: > Hm. Now that I think about it, isn't the XlogFlush() in > XLogPutNextRelFileNumber() problematic performance wise? Yes, we'll spread the > cost across a number of GetNewRelFileNumber() calls, but still, an additional > f[data]sync for every 6

Re: Slow standby snapshot

2022-07-03 Thread Andrey Borodin
> On 1 Apr 2022, at 04:18, Michail Nikolaev wrote: > > Hello. > > Just an updated commit message. I've looked into v5. IMO the purpose of KnownAssignedXidsNext would be slightly more obvious if it was named KnownAssignedXidsNextOffset. Also please consider some editorialisation: s/high val

Re: 15beta1 tab completion of extension versions

2022-07-03 Thread Noah Misch
On Sun, Jun 19, 2022 at 12:56:13AM -0400, Tom Lane wrote: > Actually ... after further thought it seems like maybe we should > make this more like other cases rather than less so. ISTM that much > of the issue here is somebody's decision that "TO version" should be > offered as a completion of "UP

Re: SQL/JSON functions vs. ECPG vs. STRING as a reserved word

2022-07-03 Thread Noah Misch
On Mon, May 30, 2022 at 05:20:15PM -0400, Tom Lane wrote: [allow EXEC SQL TYPE unreserved_keyword IS ...] > 1. In pgc.l, if an identifier is a typedef name, ignore any possible > keyword meaning and return it as an IDENT. (I'd originally supposed > that we'd want to return some new TYPEDEF token