Re: should we have a fast-path planning for OLTP starjoins?

2025-11-14 Thread Nico Williams
On Tue, Feb 04, 2025 at 03:00:49PM +0100, Tomas Vondra wrote: I'm late to this party. I have apps that do start queries like this a lot. These apps fall into this type: > Or maybe the fact table is "users" and the dimensions have all kinds of > info about the user (address, primary e-mail addre

Re: should we have a fast-path planning for OLTP starjoins?

2025-11-14 Thread Bruce Momjian
On Sat, Nov 15, 2025 at 01:41:04AM +0100, Tomas Vondra wrote: > > And then there is the problem of detecting when this happens. > > > > I think my big question is, when we join A->B->C->D, we do a lot of work > > in the optimizer to figure out what order to use, but when we do A->B, > > A->C, A->D

Re: tuple radix sort

2025-11-14 Thread John Naylor
On Sat, Nov 15, 2025 at 1:05 AM David Geier wrote: > I understand that you want to make progress with the use case at hand > but I feel like we're missing out on a lot of opportunity where the > introduced code would also be very beneficial. The patch is independently beneficial, but is also just

Re: should we have a fast-path planning for OLTP starjoins?

2025-11-14 Thread Tomas Vondra
On 11/14/25 22:07, Bruce Momjian wrote: > On Wed, Nov 12, 2025 at 04:39:50PM +0100, Tomas Vondra wrote: >> Hi, >> >> Here's a v5, addressing some (but not all) of the things discussed >> earlier in this thread. >> >> This does nothing about the "opposite" type of join, with many small >> tables lin

Re: Report oldest xmin source when autovacuum cannot remove tuples

2025-11-14 Thread Sami Imseih
Thanks for starting this thread! This is a very useful feature that users will find beneficial to easily narrow down the reason the xmin horizon is being held back, and take action. Adding this information to the vacuum logging is useful, but I can see this information being exposed in a view as w

Re: Remaining dependency on setlocale()

2025-11-14 Thread Jeff Davis
On Wed, 2025-11-12 at 19:59 +0100, Peter Eisentraut wrote: > I'm getting a bit confused by all these different variant function > names.  One way of looking at it is that the functions in this patch series mostly affect how identifiers are treated, whereas earlier collation- related work affects

Type assertions without GCC builtins

2025-11-14 Thread Thomas Munro
Hi, Our assertion quality is lower on Visual Studio. I assumed there was nothing stopping us from writing a pg_expr_has_type_p() macro using pure standard C and C++ these days, and the attached patch seemed to work on GCC, Clang and Visual Studio 2022 (via CI, no Windows here). Unfortunately our

Re: Performance issues with parallelism and LIMIT

2025-11-14 Thread Tomas Vondra
On 11/14/25 19:20, David Geier wrote: > Hi Tomas! > > On 13.11.2025 23:36, Tomas Vondra wrote: >> ... >> >> Unfortunately, I don't think this patch is the way to go. When I apply >> it, I get: >> >>ERROR: InstrEndLoop called on running node >>CONTEXT: parallel worker >> > > Ooops. That

Re: Uncommented GUC in postgresql.conf.sample

2025-11-14 Thread Daniel Gustafsson
> On 14 Nov 2025, at 16:20, Andrew Dunstan wrote: > OTOH, if you want to skip a lot of ok's in the regress_log file, you can do > something like: > > fail("$line missing initial # in postgresql.conf.sample") if $line =~ > /^\s*[^#\s]/; Went ahead with a change along this line to keep the test

Re: Issue with logical replication slot during switchover

2025-11-14 Thread Masahiko Sawada
On Fri, Nov 14, 2025 at 2:39 AM Amit Kapila wrote: > > On Fri, Nov 14, 2025 at 11:40 AM Masahiko Sawada > wrote: > > > > On Thu, Nov 13, 2025 at 7:16 PM shveta malik wrote: > > > > > > On Thu, Nov 13, 2025 at 6:39 PM Alexander Kukushkin > > > wrote: > > > > > > > > > > > > > > > >> But the sy

Re: Confused static assertion implementation

2025-11-14 Thread Thomas Munro
On Fri, Nov 14, 2025 at 6:18 PM Chao Li wrote: > As you added a semi-colon in the line, the one after the empty line can be > deleted, though C allows empty statement, but unnecessary, and may lead to > confusion for code readers. > You missed to replace this pgac_cv__static_assert with the new

Re: pgsql: Drop unnamed portal immediately after execution to completion

2025-11-14 Thread Michael Paquier
On Fri, Nov 14, 2025 at 03:10:32PM +, Mircea Cadariu wrote: > What's interesting about the holdable cursors scenario is that as far as I > can tell the temp files are cleaned up during PersistHoldablePortal instead > of PortalDrop. As part of the ExecutorEnd() done in this case. Right, it loo

Re: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY)

2025-11-14 Thread Boris Mironov
Hi Ashutosh, > If there is one method that is better than all others, community will > be more willing to accept implementation of that one method than > multiple implementations so as to reduce maintenance burden. Ok then. I'll leave "COPY FROM STDIN BINARY" implementation out of 3 only. Would y

Re: postgresql.conf.sample tab width

2025-11-14 Thread Nathan Bossart
On Fri, Nov 14, 2025 at 04:34:08PM -0500, Tom Lane wrote: > Works for me. Do we need any special .gitattributes for the file > at all, if we're relying on the TAP test to catch this? We'd at least need -whitespace (I think), but I figured we might as well highlight beginning-of-line tabs and trai

Re: postgresql.conf.sample tab width

2025-11-14 Thread Tom Lane
Nathan Bossart writes: > I don't see a way in .gitattributes to check for _any_ tabs in a file, just > for beginning-of-line indentation with tabs. But it's easy enough to add a > check in the TAP test. Works for me. Do we need any special .gitattributes for the file at all, if we're relying on

Re: postgresql.conf.sample tab width

2025-11-14 Thread Nathan Bossart
On Fri, Nov 14, 2025 at 03:25:15PM -0500, Tom Lane wrote: > I seem to recall a proposal that the best fix is to not use tabs > at all in postgresql.conf.sample. That seems like a good way out > to me. I think we could fix .gitattributes so that "git diff --check" > would verify no tabs, but I've

Re: ON CONFLICT DO SELECT (take 3)

2025-11-14 Thread jian he
On Fri, Nov 14, 2025 at 10:34 PM Viktor Holmberg wrote: > > Here are some updates that needed to be done after the improvements to the > RLS docs / tests in 7dc4fa & 2e8424. > hi. I see this: https://commitfest.postgresql.org/patch/6109/ already mentioned all the related discussion links. Could

Re: Update timezone to C99

2025-11-14 Thread Tom Lane
Peter Eisentraut writes: > On 12.11.25 19:02, Tom Lane wrote: >> Hm, I've had "re-sync TZ code with upstream" on my TODO list for >> several years now. I believe there's been quite a bit of churn >> upstream since tzcode2020d, some of it oriented towards this same >> issue of code modernization.

Re: should we have a fast-path planning for OLTP starjoins?

2025-11-14 Thread Bruce Momjian
On Wed, Nov 12, 2025 at 04:39:50PM +0100, Tomas Vondra wrote: > Hi, > > Here's a v5, addressing some (but not all) of the things discussed > earlier in this thread. > > This does nothing about the "opposite" type of join, with many small > tables linking to a single "central" table. I'm not convi

Re: Have BackendXidGetPid return pid_t

2025-11-14 Thread Tom Lane
Sami Imseih writes: > While looking at something nearby, I noticed that BackendXidGetPid() > uses an "int" for "pid", where it should be used "pid_t" like in other > places in the code including in procarray.c. I don't think this is an amazingly good idea, considering that the value it's returnin

Have BackendXidGetPid return pid_t

2025-11-14 Thread Sami Imseih
Hi, While looking at something nearby, I noticed that BackendXidGetPid() uses an "int" for "pid", where it should be used "pid_t" like in other places in the code including in procarray.c. Here is a small patch to fix this. Thanks, -- Sami Imseih Amazon Web Services (AWS) 0001-Change-Backend

Re: postgresql.conf.sample tab width

2025-11-14 Thread Tom Lane
Nathan Bossart writes: > I noticed that GitHub is using 4-space tabs for this file [0], presumably > due to this [1] recent change. I'm not aware of an official policy for > this file, but it seems to be written for 8-space tabs. > One way to fix this is to set our default tab width to 8 in > .g

postgresql.conf.sample tab width

2025-11-14 Thread Nathan Bossart
I noticed that GitHub is using 4-space tabs for this file [0], presumably due to this [1] recent change. I'm not aware of an official policy for this file, but it seems to be written for 8-space tabs. One way to fix this is to set our default tab width to 8 in .gitattributes/.editorconfig (see at

Re: Uncommented GUC in postgresql.conf.sample

2025-11-14 Thread Nathan Bossart
On Fri, Nov 14, 2025 at 01:01:08PM -0600, Nathan Bossart wrote: > Since it's my bug, I'll go ahead and apply the fix. Committed. -- nathan

[BUG] pg_basebackup produces wrong incremental files after relation truncation in segmented tables

2025-11-14 Thread Oleg Tkachenko
Hello PostgreSQL developers,I’ve encountered a bug in the incremental backup feature that prevents restoration of backups containing relations larger than 1 GB that were vacuum-truncated.Problem DescriptionWhen taking incremental backups of relations that span multiple segments, if the relation is

Re: Compile error on the aarch64 platform: Missing asm/hwcap.h

2025-11-14 Thread Tom Lane
I wrote: > I wonder if the "&& !defined(__aarch64__)" bit needs to be removed. No, that idea is off-track. Looking at the following code, the HWCAP2_CRC32 flag is only relevant on ARM32, so we don't need to worry about obtaining a definition for it on aarch64 (and we'd likely not find one anyway)

Re: Uncommented GUC in postgresql.conf.sample

2025-11-14 Thread Nathan Bossart
On Fri, Nov 14, 2025 at 08:57:46AM -0600, Nathan Bossart wrote: > That's my bad. +1 for fixing and back-patching. Since it's my bug, I'll go ahead and apply the fix. I'll leave the new test to you, though (unless you'd rather me take that, too). -- nathan

Re: Performance issues with parallelism and LIMIT

2025-11-14 Thread David Geier
Hi Tomas! On 13.11.2025 23:36, Tomas Vondra wrote: > Sorry for not responding to this thread earlier. No worries. Thanks for looking at it! IMHO if this requires adding another macro to a bunch of ad hoc places is rather inconvenient. It'd be much better to fix this in a localized

Re: index prefetching

2025-11-14 Thread Peter Geoghegan
On Wed, Nov 12, 2025 at 12:39 PM Tomas Vondra wrote: > I think I generally agree with what you said here about the challenges, > although it's a bit too abstract to respond to individual parts. I just > don't know how to rework the design to resolve this ... I'm trying to identify which subsets o

Re: tuple radix sort

2025-11-14 Thread David Geier
Hi John! On 13.11.2025 05:01, John Naylor wrote: > If that's the case then I suggest first seeing if dfd8e6c73ee made > things any worse. A simpler possible improvement is to use a similar > normalization step for the chars, if needed, then do the sort and > quinique with a specialization for unsi

Re: Use merge-based matching for MCVs in eqjoinsel

2025-11-14 Thread David Geier
Hi Ilia! On 13.10.2025 12:08, Ilia Evdokimov wrote: > > On 17.09.2025 12:40, Ilia Evdokimov wrote: >> Hi David, >> >> In v2 patch, when the join is reversed we pass the commutator operator >> Oid to eqjoinsel_semi(), and inside that function we immediately call >> get_opcode(). Did you mean for t

enhance wraparound warnings

2025-11-14 Thread Nathan Bossart
varsup.c has the following comment: /* * We'll start complaining loudly when we get within 40M transactions of * data loss. This is kind of arbitrary, but if you let your gas gauge * get down to 2% of full, would you be looking for the next gas station?

Re: PartitionKeyData->partattrs, refactor some 0 to InvalidAttrNumber

2025-11-14 Thread Bertrand Drouvot
Hi, On Fri, Nov 14, 2025 at 11:47:35PM +0800, jian he wrote: > hi. > > if PartitionKeyData->partattrs is 0, then it means that partition key is > expression, else it's column reference. > > we can change from > if (key->partattrs[i] == 0) > to yes, I think that makes sense to not compare an Att

Re: Optimize LISTEN/NOTIFY

2025-11-14 Thread Joel Jacobson
On Thu, Nov 13, 2025, at 08:13, Joel Jacobson wrote: > Attached, please find a new version rebased on top of the bug fix > patches that just got committed in 0bdc777, 797e9ea, 8eeb4a0, and > 1b46990. To help reviewers, here is a new write-up of the patch: PROBLEM === The current implementati

Re: Performance issues with parallelism and LIMIT

2025-11-14 Thread Tomas Vondra
On 11/13/25 23:36, Tomas Vondra wrote: > ... > > What I think we should do is much simpler - make the threshold in shm_mq > dynamic, start with a very low value and gradually ramp up (up to 1/4). > So we'd have > >if (mqh->mqh_consume_pending > threshold) > > We might start with > > thres

PartitionKeyData->partattrs, refactor some 0 to InvalidAttrNumber

2025-11-14 Thread jian he
hi. if PartitionKeyData->partattrs is 0, then it means that partition key is expression, else it's column reference. we can change from if (key->partattrs[i] == 0) to if (key->partattrs[i] == InvalidAttrNumber) the reason I can think of is to improve grepability. numeric value 0 is too common to

Re: POC: make mxidoff 64 bits

2025-11-14 Thread Maxim Orlov
On Wed, 12 Nov 2025 at 16:00, Heikki Linnakangas wrote: > > I added an > inlined fast path to SlruReadSwitchPage and SlruWriteSwitchPage to > eliminate the function call overhead of those in the common case that no > page switch is needed. With that, the 100 million mxid test case I used > went f

Re: Uncommented GUC in postgresql.conf.sample

2025-11-14 Thread Álvaro Herrera
On 2025-Nov-14, Andrew Dunstan wrote: > OTOH, if you want to skip a lot of ok's in the regress_log file, you can do > something like: > > fail("$line missing initial # in postgresql.conf.sample") if $line =~ > /^\s*[^#\s]/; Yeah, I'm pretty confident we don't want one "ok" per correct line in th

Re: Uncommented GUC in postgresql.conf.sample

2025-11-14 Thread Andrew Dunstan
On 2025-11-14 Fr 9:06 AM, Daniel Gustafsson wrote: When looking at the nearby suggestion to add deprecation comment for md5 in the .conf.sample, I happened to notice that autovacuum_worker_slots isn't commented out it the sample file. AFAIK all GUCs in the sample file should be set to their def

Re: pgsql: Drop unnamed portal immediately after execution to completion

2025-11-14 Thread Mircea Cadariu
Hi Michael, I think I found a gap in the tests we added previously for documenting the current behaviour. See attached patch for your consideration. What's interesting about the holdable cursors scenario is that as far as I can tell the temp files are cleaned up during PersistHoldablePortal

Re: [Patch] Mention md5 is deprecated in postgresql.conf.sample

2025-11-14 Thread Nathan Bossart
On Fri, Nov 14, 2025 at 01:57:28PM +0100, Daniel Gustafsson wrote: > Something like that yes. I'll wait for others to chime in but unless there > are > objections I think we should go with something like this. Seems fine to me. I'd like to start emitting WARNINGs in ~v20 when folks log in using

Re: Compile error on the aarch64 platform: Missing asm/hwcap.h

2025-11-14 Thread Tom Lane
John Naylor writes: > We already have the following, so I'm not sure what you mean (or even > what architecture you're running on): > #if defined(HAVE_ELF_AUX_INFO) || defined(HAVE_GETAUXVAL) > #include > #if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32) > #include > #en

Re: Uncommented GUC in postgresql.conf.sample

2025-11-14 Thread Nathan Bossart
On Fri, Nov 14, 2025 at 09:44:42AM -0500, Tom Lane wrote: > Daniel Gustafsson writes: >> When looking at the nearby suggestion to add deprecation comment for md5 in >> the >> .conf.sample, I happened to notice that autovacuum_worker_slots isn't >> commented >> out it the sample file. > >> AFAIK

Re: Uncommented GUC in postgresql.conf.sample

2025-11-14 Thread Bruce Momjian
On Fri, Nov 14, 2025 at 09:44:42AM -0500, Tom Lane wrote: > Daniel Gustafsson writes: > > When looking at the nearby suggestion to add deprecation comment for md5 in > > the > > .conf.sample, I happened to notice that autovacuum_worker_slots isn't > > commented > > out it the sample file. > > >

Re: Uncommented GUC in postgresql.conf.sample

2025-11-14 Thread Tom Lane
Daniel Gustafsson writes: > When looking at the nearby suggestion to add deprecation comment for md5 in > the > .conf.sample, I happened to notice that autovacuum_worker_slots isn't > commented > out it the sample file. > AFAIK all GUCs in the sample file should be set to their defaults and lef

Re: Document NULL

2025-11-14 Thread David G. Johnston
On Fri, Nov 14, 2025 at 1:52 AM Chao Li wrote: > > On Nov 11, 2025, at 23:34, Álvaro Herrera wrote: > > > > On 2025-Jun-18, David G. Johnston wrote: > > > >> Version 8. > >> > >> Marking this Ready to Commit in CF 2025-09 (CF PG19-1) > > > > I have rebased this; here's v9. I haven't reviewed it

Uncommented GUC in postgresql.conf.sample

2025-11-14 Thread Daniel Gustafsson
When looking at the nearby suggestion to add deprecation comment for md5 in the .conf.sample, I happened to notice that autovacuum_worker_slots isn't commented out it the sample file. AFAIK all GUCs in the sample file should be set to their defaults and left commented out. The attached does that

Re: backend/nodes cleanup: Move loop variables definitions into for statement

2025-11-14 Thread Chao Li
On Wed, Nov 12, 2025 at 4:00 PM Chao Li wrote: > Hi Hackers, > > While working on the other patch [1] that touched tbm_add_tuples() under > src/backend/nodes, I moved a loop variable into for statement by the way as > I knew Peter Eisentraut had done some efforts about that, see [2]. > > However,

Re: Report replica identity in pg_publication_tables

2025-11-14 Thread Ashutosh Bapat
On Fri, Jul 4, 2025 at 8:16 PM Ashutosh Bapat wrote: > > On Wed, Jul 2, 2025 at 1:46 PM Zhijie Hou (Fujitsu) > wrote: > > > > > I'm concerned about whether we can correctly display replica identity in the > > view for partitioned tables. > > > > In the case of partitioned tables, we display only

Re: Incorrect checksum in control file with pg_rewind test

2025-11-14 Thread Ivan Kovmir
I can reproduce the bug on the master branch with the following steps: 1. Apply 0001-XXX-Dirty-hack-to-clobber-control-file-for-testing.patch [1] 2. Compile PostgreSQL with `-DEXEC_BACKEND` C compiler flag option. 3. Run `initdb` 4. Run `postgres` 5. Run `pgbench -i` 6. Run `psql -c 'do $$ begin l

Re: [Patch] Mention md5 is deprecated in postgresql.conf.sample

2025-11-14 Thread Daniel Gustafsson
> On 14 Nov 2025, at 13:15, Michael Banck wrote: > On Fri, Nov 14, 2025 at 12:53:41PM +0100, Daniel Gustafsson wrote: >>> On 14 Nov 2025, at 11:47, Michael Banck wrote: >>> while looking through postgresql.conf on PG18, I noticed that >>> password_encryption mentions md5 as valid alternative to

Re: failed NUMA pages inquiry status: Operation not permitted

2025-11-14 Thread Christoph Berg
Re: Tomas Vondra > So I'm leaning to adjust pg_numa_init() to also check EPERM, per the > attached patch. It still calls numa_available(), so that we don't > silently miss future libnuma changes. > > Can you check this makes it work inside the docker container? Yes your patch works. (Sorry I mean

Re: [Patch] Mention md5 is deprecated in postgresql.conf.sample

2025-11-14 Thread Michael Banck
Hi, On Fri, Nov 14, 2025 at 12:53:41PM +0100, Daniel Gustafsson wrote: > > On 14 Nov 2025, at 11:47, Michael Banck wrote: > > while looking through postgresql.conf on PG18, I noticed that > > password_encryption mentions md5 as valid alternative to scram-sha-256. > > I think it would be useful to

Re: IPC/MultixactCreation on the Standby server

2025-11-14 Thread Andrey Borodin
Hi Ivan! Thanks for the review. > On 24 Oct 2025, at 19:33, Ivan Bykov wrote: > > I believe that we should provide more comprehensible feedback to developers > by interrupting the deadlock state with a psql timeout. 15 seconds seems safe > enough to distinguish between slow node operation and

Re: [Patch] Mention md5 is deprecated in postgresql.conf.sample

2025-11-14 Thread Daniel Gustafsson
> On 14 Nov 2025, at 11:47, Michael Banck wrote: > while looking through postgresql.conf on PG18, I noticed that > password_encryption mentions md5 as valid alternative to scram-sha-256. > I think it would be useful to mention md5 is deprecated so that people > looking at it (but have otherwise n

Re: Missing calls to UnlockBuffers() - unify error handling?

2025-11-14 Thread Rahila Syed
Hi Andres, > Widening the perspective a bit, our current approach for such > error-handling / > shutdown functions seems ... not maintainable. In particular we have a > substantial number of top-level sigsetjmp() handlers that have slightly > different recovery codepaths. When adding a new proce

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-11-14 Thread Masahiko Sawada
On Fri, Nov 14, 2025 at 3:12 AM Amit Kapila wrote: > > On Fri, Nov 14, 2025 at 4:15 PM Masahiko Sawada wrote: > > > > On Fri, Nov 14, 2025 at 1:38 AM Amit Kapila wrote: > > > > > > On Fri, Nov 14, 2025 at 5:01 AM Masahiko Sawada > > > wrote: > > > > > > I can look at the patch but this inprogr

Re: Proposal for enabling auto-vectorization for checksum calculations

2025-11-14 Thread John Naylor
On Thu, Nov 6, 2025 at 6:50 AM Andrew Kim wrote: > The v9 patch series is attached. Thanks! BTW, I've set the commitfest entry to "Needs Review". I spent some time with the v9-0001 refactoring patch, and I have one observation that's worth sharing now: --- a/src/bin/pg_checksums/pg_checksums.c

Clarification on when _PG_init() is invoked for extensions

2025-11-14 Thread Ayush Vatsa
Hello Hackers, I’m working on a PostgreSQL extension that defines GUCs and initializes hooks inside the _PG_init() function, and I wanted to confirm my understanding of when _PG_init() is called and whether the library remains loaded across sessions. Based on documentation and experimentation, I

Re: DOCS: Missing tags for some SEQUENCE fields

2025-11-14 Thread Amit Kapila
On Fri, Nov 14, 2025 at 10:43 AM Peter Smith wrote: > > On Fri, Nov 14, 2025 at 2:53 PM Amit Kapila wrote: > > > > On Thu, Nov 13, 2025 at 4:46 PM Chao Li wrote: > > > > On Nov 13, 2025, at 13:17, Peter Smith wrote: > > > > > > > > Hi, > > > > > > > > While reviewing the recent patches for SEQU

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-11-14 Thread Amit Kapila
On Fri, Nov 14, 2025 at 4:15 PM Masahiko Sawada wrote: > > On Fri, Nov 14, 2025 at 1:38 AM Amit Kapila wrote: > > > > On Fri, Nov 14, 2025 at 5:01 AM Masahiko Sawada > > wrote: > > > > I can look at the patch but this inprogress flag is another part which > > I wanted to avoid if possible again

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-14 Thread Álvaro Herrera
On 2025-Nov-13, Quan Zongliang wrote: > A more specific example. Originally, it was impossible to obtain the > definition of "testdb" by accessing pg_database: > > postgres=> SELECT * FROM pg_database WHERE datname='testdb'; > ERROR: permission denied for table pg_database Hmm. So I was th

Re: Reorganize GUC structs

2025-11-14 Thread Álvaro Herrera
On 2025-Nov-12, Peter Eisentraut wrote: > Well, that's the one, but the code actually looks like this now: > > while ((i = bms_next_member(atts, i)) >= 0) > { > attcnt++; > if (attcnt > 1) > appendStringInfoString(&attsbuf, _(", ")); > > appendStringIn

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

2025-11-14 Thread Alvaro Herrera
On 2023-Apr-13, Karl O. Pinc wrote: > Dagfinn Ilmari Mannsåker wrote: > > Another side note: I notice the links don't appear on > > elements (e.g. > > https://www.postgresql.org/docs/devel/sql-select.html#SQL-WITH), > > only . > > This we know. Working with elements is a different > dive int

[Patch] Mention md5 is deprecated in postgresql.conf.sample

2025-11-14 Thread Michael Banck
Hi, while looking through postgresql.conf on PG18, I noticed that password_encryption mentions md5 as valid alternative to scram-sha-256. I think it would be useful to mention md5 is deprecated so that people looking at it (but have otherwise not gotten the memo) will realize and hopefully act on

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-11-14 Thread Masahiko Sawada
On Fri, Nov 14, 2025 at 1:38 AM Amit Kapila wrote: > > On Fri, Nov 14, 2025 at 5:01 AM Masahiko Sawada wrote: > > > > On Thu, Nov 13, 2025 at 1:56 AM Amit Kapila wrote: > > > > > > On Wed, Nov 12, 2025 at 3:36 PM Masahiko Sawada > > > wrote: > > > > > > > > I've attached the updated version pa

Re: Issue with logical replication slot during switchover

2025-11-14 Thread Amit Kapila
On Fri, Nov 14, 2025 at 11:40 AM Masahiko Sawada wrote: > > On Thu, Nov 13, 2025 at 7:16 PM shveta malik wrote: > > > > On Thu, Nov 13, 2025 at 6:39 PM Alexander Kukushkin > > wrote: > > > > > > > > > > > >> But the system can die/crash before shutdown. > > > > > > > > > You mean it will not wr

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-11-14 Thread Masahiko Sawada
On Fri, Nov 14, 2025 at 1:25 AM shveta malik wrote: > > In an offline discussion with Kuroda-san, we realized that TRUNCATE > may hit Assert(XLogLogicalInfoActive()) in ExecuteTruncateGuts() under > our current implementation, where logical decoding is disabled lazily. > > Consider the case where

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-11-14 Thread Amit Kapila
On Fri, Nov 14, 2025 at 5:01 AM Masahiko Sawada wrote: > > On Thu, Nov 13, 2025 at 1:56 AM Amit Kapila wrote: > > > > On Wed, Nov 12, 2025 at 3:36 PM Masahiko Sawada > > wrote: > > > > > > I've attached the updated version patch. I addressed all comments I > > > got so far, and made some cosmet

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-11-14 Thread shveta malik
In an offline discussion with Kuroda-san, we realized that TRUNCATE may hit Assert(XLogLogicalInfoActive()) in ExecuteTruncateGuts() under our current implementation, where logical decoding is disabled lazily. Consider the case where there’s only one logical slot and we attempt to drop it. The bac

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-14 Thread Fujii Masao
On Fri, Nov 14, 2025 at 4:45 PM Chao Li wrote: > ``` > + else if (received_sync && res == NULL) > { > - /* > -* PGRES_PIPELINE_SYNC must be followed by another > -* PGRES_PIPELINE_SYNC or NULL; othe

Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-14 Thread Masahiko Sawada
On Wed, Nov 12, 2025 at 7:42 PM Amit Kapila wrote: > > On Thu, Nov 13, 2025 at 4:31 AM Peter Smith wrote: > > > > CURRENT > > seq_sync_error_count > > sync_error_count > > > > MY SUGGESTION > > sync_seq_error_count > > sync_table_error_count > > > > +1. Along with consistency with other column na

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-14 Thread Fujii Masao
On Fri, Nov 14, 2025 at 4:50 PM Yugo Nagata wrote: > I could not reproduce it with the latest REL_16_STABLE branch. > Perhaps, the assertion failure you mentioned above was the one > fixed by 1d3ded521? Yeah, you're right! Thanks for catching that. I've updated the commit message to explicitly m

Re: Issue with logical replication slot during switchover

2025-11-14 Thread Masahiko Sawada
On Fri, Nov 14, 2025 at 12:42 AM Alexander Kukushkin wrote: > > Hi Masahiko, > > On Fri, 14 Nov 2025 at 07:10, Masahiko Sawada wrote: > >> >> So I think that the >> reported issue doesn't happen in failover cases and we can focus on >> failover cases. > > > I think you wanted to say "focus on *sw

RE: How can end users know the cause of LR slot sync delays?

2025-11-14 Thread Hayato Kuroda (Fujitsu)
Dear Shlok, Thanks for updating the patch. Few more comments. > > > > I’m not sure if this has already been discussed; I couldn’t find any > > > > mention of it in the thread. Why don’t we persist > > > > 'slot_sync_skip_reason' (it is outside of > > > > ReplicationSlotPersistentData)? If a slot

Re: Issue with logical replication slot during switchover

2025-11-14 Thread Alexander Kukushkin
Hi Masahiko, On Fri, 14 Nov 2025 at 07:10, Masahiko Sawada wrote: > So I think that the > reported issue doesn't happen in failover cases and we can focus on > failover cases. I think you wanted to say "focus on *switchover* cases"? Regards, -- Alexander Kukushkin

Re: SQL:2011 Application Time Update & Delete

2025-11-14 Thread Chao Li
> On Nov 14, 2025, at 12:10, Chao Li wrote: > > 21 - 0008 - ri_triggers.c > ``` > + quoteOneName(attname, > + RIAttName(fk_rel, riinfo->fk_attnums[i])); > ``` > > This patch uses quoteOneName() a lot. This function simply add double quotes > without much checks which is unsafe. I think quot

Re: Update timezone to C99

2025-11-14 Thread Peter Eisentraut
On 12.11.25 19:02, Tom Lane wrote: Peter Eisentraut writes: To fix that, I re-downloaded the upstream code (same version as before), applied the fixes described in src/timezone/README, except those related to the integer types, and then put back the PostgreSQL-specific code and massaged things

Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis

2025-11-14 Thread Chao Li
> On Nov 14, 2025, at 15:47, Fujii Masao wrote: > > On Fri, Nov 14, 2025 at 10:23 AM Peter Smith wrote: >> >> A rebase was needed. Here is patch v3. > > Thanks for the patch! LGTM. > > For example, in the CREATE PUBLICATION synopsis, the part that can be > repeated is "[ ONLY ] table_name