Re: MAX_BACKENDS size (comment accuracy)

2025-01-25 Thread Jacob Brazeal
While we are on the topic of comments from lwlock.c, there is one other one that confused me, in LWLockWaitListLock: * /* and then spin without atomic operations until lock is released */ { SpinDelayStatus delayStatus; init_local_spin_delay(&delayStatus); while (old_state & LW_FLAG

Re: MAX_BACKENDS size (comment accuracy)

2025-01-25 Thread Jacob Brazeal
Thinking a bit further about this, the purpose of the LW_SHARED_MASK section of the state is to count the number of lock-sharers. Thus, we only care about the actual number of backends (up to 2^18-1) here and not the size of the ProcNumber data type. So I do think the comment should read 2^18-1 and

MAX_BACKENDS size (comment accuracy)

2025-01-25 Thread Jacob Brazeal
Hello all, In lwlocks.c, we have the following comment, related to LWLock state: */* Must be greater than MAX_BACKENDS - which is 2^23-1, so we're fine. */#define LW_SHARED_MASK ((uint32) ((1 << 24)-1))* However, MAX_BACKENDS is set to 2^18-1. Here is the comment in postmaster.h: */*

Re: [PATCH] Hex-coding optimizations using SVE on ARM.

2025-01-25 Thread Nathan Bossart
On Wed, Jan 22, 2025 at 10:58:09AM +, chiranmoy.bhattacha...@fujitsu.com wrote: >> The functions that test the length before potentially calling a function >> pointer should probably be inlined (see pg_popcount() in pg_bitutils.h). >> I wouldn't be surprised if some compilers are inlining this

Re: [PATCH] Hex-coding optimizations using SVE on ARM.

2025-01-25 Thread Nathan Bossart
On Wed, Jan 22, 2025 at 11:10:10AM +, chiranmoy.bhattacha...@fujitsu.com wrote: > I realized I didn't attach the patch. Thanks. Would you mind creating a commitfest entry for this one? -- nathan

Re: Convert sepgsql tests to TAP

2025-01-25 Thread Tom Lane
Peter Eisentraut writes: > This has been committed. And I understand there is a buildfarm client > update available for the affected buildfarm members. BTW, shouldn't the CF entry for this get closed now? regards, tom lane

Re: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty?

2025-01-25 Thread Tom Lane
Srinath Reddy Sadipiralla writes: >> On Thu, 05 Dec 2024 21:11:42 +0530 Andres Freund >> wrote --- >> The gain by not dealing with local buffers in these functions is fairly >> small >> too, so there's not really any reason for a change like yours. > hmm got

Re: System views for versions reporting

2025-01-25 Thread Dmitry Dolgov
> On Thu, Jan 02, 2025 at 10:36:48AM GMT, jian he wrote: > hi. > https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F5318 > shows lots of failures, but it doesn't seem to tell you about doc build > failure. Thanks for checking this out. Here is the updated version with applied changes.

Re: doc: explain pgstatindex fragmentation

2025-01-25 Thread Laurenz Albe
On Fri, 2025-01-24 at 15:41 +0100, Frédéric Yhuel wrote: > v4 attached Looks good to me. I have one question left: the explanation for the performance penalty of a high leaf fragmentation sounds like it would only be relevant for disks where sequential reads are faster. If that is correct, perha

Re: Set AUTOCOMMIT to on in script output by pg_dump

2025-01-25 Thread Tom Lane
Robert Treat writes: > On Wed, Jan 22, 2025 at 8:02 AM Shinya Kato > wrote: >> I agree to it and fixed the patch. > LGTM LGTM too. Pushed with a couple of very minor tweaks. regards, tom lane

Re: why -Fdance archive format option works with ./pg_restore but not with ./pg_dump?

2025-01-25 Thread Srinath Reddy
Thanks Tom and Andrew. Regards, Srinath Reddy Sadipiralla, EDB: http://www.enterprisedb.com On Sat, Jan 25, 2025 at 9:55 PM Tom Lane wrote: > Srinath Reddy writes: > > wouldn't it be nice if we get the error message as same as when we didn't > > gave format option and pg_restore finds the form

Re: Reorder shutdown sequence, to flush pgstats later

2025-01-25 Thread Andres Freund
Hi, On 2025-01-24 15:06:17 -0500, Andres Freund wrote: > Unless somebody argues against, I'm planning to push all but the last later > today, wait for the buildfarm to settle, and then push the last. This is a > dependency of multiple other things, so it'd be good to get it in soon. I did push a

Re: why -Fdance archive format option works with ./pg_restore but not with ./pg_dump?

2025-01-25 Thread Tom Lane
Srinath Reddy writes: > wouldn't it be nice if we get the error message as same as when we didn't > gave format option and pg_restore finds the format > using _discoverArchiveFormat there it suggests to try psql ,instead of > saying "p/plain text" format is a invalid format,as we are doing current

Re: why -Fdance archive format option works with ./pg_restore but not with ./pg_dump?

2025-01-25 Thread Andrew Dunstan
On 2025-01-25 Sa 8:12 AM, Srinath Reddy wrote: ./pg_dump postgres -Fp -f textdump ./pg_restore -Fp -d postgres textdump pg_restore: error: unrecognized archive format "p"; please specify "c", "d", or "t" ./pg_restore -d postgres textdump pg_restore: error: input file appears to be a text fo

Re: XMLDocument (SQL/XML X030)

2025-01-25 Thread Pavel Stehule
so 25. 1. 2025 v 15:10 odesílatel Chapman Flack napsal: > On 01/25/25 02:16, Pavel Stehule wrote: > > because the function does nothing, then it is useless to convert input to > > XML and force detosting > > > > Maybe the body of the function should be just > > ... > > PG_RETURN_DATUM(PG_GETARG

Re: XMLDocument (SQL/XML X030)

2025-01-25 Thread Chapman Flack
On 01/25/25 02:16, Pavel Stehule wrote: > because the function does nothing, then it is useless to convert input to > XML and force detosting > > Maybe the body of the function should be just > ... > PG_RETURN_DATUM(PG_GETARG_DATUM(0)); That sort of motivated my question upthread about whether

Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.

2025-01-25 Thread Shlok Kyal
On Wed, 22 Jan 2025 at 16:23, Shubham Khanna wrote: > > Hi, > > Following the recent comments on Patch v13-0001, the patch was not > applied to the HEAD. I have addressed the feedback and prepared a > rebased version to incorporate the necessary adjustments. > Please find the updated patch. > > Th

Re: XMLDocument (SQL/XML X030)

2025-01-25 Thread Pavel Stehule
so 25. 1. 2025 v 12:45 odesílatel Jim Jones napsal: > > On 25.01.25 11:50, Pavel Stehule wrote: > > you still forces detoasting (inside PG_GETARG_XML_P) > > > Ah, ok .. I overlooked it. You meant _DATUM instead of _XML_P > > Fixed in v8. > now it is ok. I'll mark this patch as ready for committ

Re: why -Fdance archive format option works with ./pg_restore but not with ./pg_dump?

2025-01-25 Thread Srinath Reddy
./pg_dump postgres -Fp -f textdump ./pg_restore -Fp -d postgres textdump pg_restore: error: unrecognized archive format "p"; please specify "c", "d", or "t" ./pg_restore -d postgres textdump pg_restore: error: input file appears to be a text format dump. Please use psql. wouldn't it be nice if w

Re: why -Fdance archive format option works with ./pg_restore but not with ./pg_dump?

2025-01-25 Thread Srinath Reddy
On Fri, Jan 24, 2025 at 8:54 PM Tom Lane wrote: > Andrew Dunstan writes: > > I don't think we need a new file for this. pg_backup_utils.c is already > > there for routines common to pg_restore and pg_dump. > > I'm not even on board with having a new function, because I doubt > we should try to s

Re: XMLDocument (SQL/XML X030)

2025-01-25 Thread Jim Jones
On 25.01.25 11:50, Pavel Stehule wrote: > you still forces detoasting (inside PG_GETARG_XML_P) Ah, ok .. I overlooked it. You meant _DATUM instead of _XML_P Fixed in v8. Thanks! Best, Jim From 43cb30a6348a2e7b9911f8bb82e1ec8359b668f0 Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Fri, 24 Jan

Re: Convert sepgsql tests to TAP

2025-01-25 Thread Robins Tharakan
On Sat, 25 Jan 2025 at 11:57, Andrew Dunstan wrote: > On 2025-01-24 Fr 7:50 PM, Andrew Dunstan wrote: > > Here's the hot fix (which passed my test with a directory with pgsql > > in its path): > > > > https://github.com/PGBuildFarm/client-code/commit/f6c6dd52d2959814452454890fb9838429c5c3e8 > >

Re: XMLDocument (SQL/XML X030)

2025-01-25 Thread Pavel Stehule
so 25. 1. 2025 v 9:10 odesílatel Jim Jones napsal: > > On 25.01.25 08:16, Pavel Stehule wrote: > > because the function does nothing, then it is useless to convert input > > to XML and force detosting > > Right. Fixed in v7 attached. > I don't see +Datum +xmldocument(PG_FUNCTION_ARGS) +{ +#ifde

Re: Allow NOT VALID foreign key constraints on partitioned tables.

2025-01-25 Thread Álvaro Herrera
On Sat, Jan 25, 2025, at 6:00 AM, Alexander Lakhin wrote: > Hello Álvaro, > > Please look at the script that produces an error starting from b663b9436: Ah yes, this is my bug: I moved a CCI where it became conditional. Will fix, thanks for the test case.

Re: Add CASEFOLD() function.

2025-01-25 Thread Jeff Davis
On Sat, 2025-01-25 at 00:00 -0500, Tom Lane wrote: > Found characters that cannot be output in the PDF document;  see > README.non-ASCII Thank you, fixed. > Not sure about a good workaround for this.  Are there any characters > within LATIN-1 that have interesting case-folding behavior? I just r

Re: XMLDocument (SQL/XML X030)

2025-01-25 Thread Jim Jones
On 25.01.25 08:16, Pavel Stehule wrote: > because the function does nothing, then it is useless to convert input > to XML and force detosting Right. Fixed in v7 attached. Thanks Best, Jim From f4dc90994fc42879c7ab522bd9a03032be9a936c Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Fri, 24 Jan 2