Re: Orphaned records in pg_replication_origin_status after subscription drop

2025-12-19 Thread Michael Paquier
On Fri, Dec 19, 2025 at 01:56:38PM -0800, Masahiko Sawada wrote: > It would work too. Or I think we can do a similar thing in > replorigin_reset() for tablesync workers who are in > SUBREL_STATE_DATASYNC state. Both ways require exposing > replorigin_state_clear(), though. Exposing replorigin_stat

Re: Orphaned records in pg_replication_origin_status after subscription drop

2025-12-19 Thread Masahiko Sawada
On Fri, Dec 19, 2025 at 2:18 AM Amit Kapila wrote: > > On Fri, Dec 19, 2025 at 10:42 AM Michael Paquier wrote: > > > > Some colleagues have reported that it is possible to finish with > > orphaned records in pg_replication_origin_status, as an effect of > > table synchronization workers that miss

Re: Refactor query normalization into core query jumbling

2025-12-19 Thread Sami Imseih
> While this is technically correct so the compiler does not complain (because > clocations is a non const pointer in JumbleState and the added const does not > apply to what clocations points to), I think that adding const here is > misleading. Yes, I am not happy with this. I initially thought

Re: A few patches to clarify snapshot management, part 2

2025-12-19 Thread Kirill Reshke
On Fri, 19 Dec 2025 at 16:51, Heikki Linnakangas wrote: > > On 19/12/2025 07:15, Chao Li wrote: > >> On Dec 19, 2025, at 07:30, Heikki Linnakangas wrote: > >> > >> Patch 0002: Split SnapshotData into separate structs for each kind of > >> snapshot > >> >> This implements the long-standing TODO a

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-12-19 Thread Bruce Momjian
On Fri, Dec 12, 2025 at 11:17:01AM -0500, Tom Lane wrote: > =?utf-8?Q?=C3=81lvaro?= Herrera writes: > > It's strange to see this thread go on about messing with the Perl script > > because we're too afraid of pg_bsd_indent. Maybe we should take > > ownership of that code -- improve its own indent

Re: Get rid of "Section.N.N.N" on DOCs

2025-12-19 Thread David G. Johnston
On Fri, Dec 19, 2025 at 11:56 AM Marcos Pegoraro wrote: > Em seg., 15 de dez. de 2025 às 09:19, Laurenz Albe < > [email protected]> escreveu: > >> Apart from the effort of the change, there is also the increased effort of >> backpatching documentation changes, and those efforts have to be

Re: Get rid of "Section.N.N.N" on DOCs

2025-12-19 Thread Marcos Pegoraro
Em seg., 15 de dez. de 2025 às 09:19, Laurenz Albe escreveu: > Apart from the effort of the change, there is also the increased effort of > backpatching documentation changes, and those efforts have to be > outbalanced > by the benefits. > Are you sure we need to backpatch all these changes ? I'

Re: Fixing the btree_gist inet mess

2025-12-19 Thread Tom Lane
Here's a v2 patchset that tries to address all the discussion so far. The principal change from v1 is that I made a rolled-up btree_gist--1.9.sql script in which the problem opclasses are not marked DEFAULT. So that version can be installed without any hack in DefineOpClass. This answer is much

Re: [PATCH] Documentation

2025-12-19 Thread David G. Johnston
On Thu, Dec 18, 2025 at 12:31 AM Mikael Gustavsson < [email protected]> wrote: > This is my first ever patch to postgresql so please guide me if i'm doing > something wrong. > > The subject line of an email should fairly precisely say what is being changed in the proposed patch. The docum

Re: [PATCH] Documentation

2025-12-19 Thread Heikki Linnakangas
On 19/12/2025 17:14, Fujii Masao wrote: On Fri, Dec 19, 2025 at 5:53 PM John Naylor wrote: On Thu, Dec 18, 2025 at 2:31 PM Mikael Gustavsson wrote: This patch updates some examples in documentation client-auth.sgml from md5 to scram-sha-256 Reference: https://www.postgresql.org/message-id/

Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect

2025-12-19 Thread Kirill Reshke
On Fri, 19 Dec 2025 at 19:42, Fujii Masao wrote: > > On Fri, Dec 19, 2025 at 9:30 PM Kirill Reshke wrote: > > I checked the new TAP test 0002 changes. I am wondering, why are > > connection options validated so late in this test? I mean, we do > > ALTER PUBLICATION, then we restart publisher, wa

Re: ditaa --svg option is missing when building doc/src/sgml/images

2025-12-19 Thread Paul A Jungwirth
On Fri, Dec 19, 2025 at 5:52 AM Nazir Bilal Yavuz wrote: > > I am working on writing a meson.build file for doc/src/sgml/images, > but I ran into an issue when Meson tries to invoke `ditaa`: > > ... > > This issue also happens on autoconf builds: > > ... > > It appears that the --svg option was in

RE: AIX support

2025-12-19 Thread Srirama Kucherlapati
Hi Peter/Heikki/Tristan Please find the attached changes for the below comments. Along with comments from Tristan. Please let me know if these meson specific changes are fine. 0001-Support-for-AIX-meson-updates.pg19.patch - has the changes for the below comments only. 0001-Support-for-AIX-all-m

Re: A few patches to clarify snapshot management, part 2

2025-12-19 Thread Andres Freund
Hi, On 2025-12-19 01:30:05 +0200, Heikki Linnakangas wrote: > Patch 0002: Split SnapshotData into separate structs for each kind of > snapshot > > This implements the long-standing TODO and splits SnapshotData up into > multiple structs. This makes it more clear which fields are used with which >

Re: [PATCH] Documentation

2025-12-19 Thread Fujii Masao
On Fri, Dec 19, 2025 at 5:53 PM John Naylor wrote: > > On Thu, Dec 18, 2025 at 2:31 PM Mikael Gustavsson > wrote: > > This patch updates some examples in documentation client-auth.sgml from md5 > > to scram-sha-256 > > Reference: > > https://www.postgresql.org/message-id/176595607507.978865.115

Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect

2025-12-19 Thread Fujii Masao
On Fri, Dec 19, 2025 at 9:30 PM Kirill Reshke wrote: > I checked the new TAP test 0002 changes. I am wondering, why are > connection options validated so late in this test? I mean, we do > ALTER PUBLICATION, then we restart publisher, wait for catchup, check > alter publication, and etc, and only

File locks for data directory lockfile in the context of Linux namespaces

2025-12-19 Thread Dmitry Dolgov
Hi, TL;DR This is a proposal to use file locking with a data directory lockfile at startup, which helps to avoid potential Linux PID namespace visibility issues. Recently I've stumbled upon a quite annoying problem, which will require a bit of explanation. Currently at startup if the data directo

Re: RFC: adding pytest as a supported test framework

2025-12-19 Thread Xuneng Zhou
Hi Jelte, Thanks for working on this. I’ve done an initial review of patch 4 and here are some comments below. 1) Test infra: tmp_check() fixture looks wrong / unused variable def tmp_check(tmp_path_factory): d = os.getenv("TESTDATADIR") if d: d = pathlib.Path(d) else:

ditaa --svg option is missing when building doc/src/sgml/images

2025-12-19 Thread Nazir Bilal Yavuz
Hi, I am working on writing a meson.build file for doc/src/sgml/images, but I ran into an issue when Meson tries to invoke `ditaa`: /usr/bin/ditaa -E -S --svg ../../postgres/doc/src/sgml/images/temporal-references.txt doc/src/sgml/images/temporal-references.txt.svg.tmp Unrecognized option: --svg

Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect

2025-12-19 Thread Kirill Reshke
On Fri, 19 Dec 2025 at 16:05, Fujii Masao wrote: > > On Fri, Dec 19, 2025 at 7:07 PM Japin Li wrote: > > Thanks for the patch — that was my oversight. > > > > LGTM with one small suggestion: > > Thanks for the review! > > > The comment says: "If the option is not found in connInfo, return NULL >

Re: Logical Replication of sequences

2025-12-19 Thread vignesh C
On Fri, 19 Dec 2025 at 10:05, Peter Smith wrote: > > Hi Vignesh. > > I had a quick look at this patch. > > == > > - * Instead, we invalidate only the relsyncache. > + * Instead, invalidate the relation sync cache for publications that > + * include tables. Invalidation is not required for sequ

Re: A few patches to clarify snapshot management, part 2

2025-12-19 Thread Heikki Linnakangas
On 19/12/2025 07:15, Chao Li wrote: On Dec 19, 2025, at 07:30, Heikki Linnakangas wrote: Patch 0002: Split SnapshotData into separate structs for each kind of snapshot >> This implements the long-standing TODO and splits SnapshotData up into multiple structs. This makes it more clear which fiel

Re: A few patches to clarify snapshot management, part 2

2025-12-19 Thread Heikki Linnakangas
On 19/12/2025 07:15, Chao Li wrote: On Dec 19, 2025, at 07:30, Heikki Linnakangas wrote: Patch 0001: Use a proper type for RestoreTransactionSnapshot's PGPROC arg Minor cleanup, independent of the rest of the patches Looks like this cleanup should have done earlier. The old comments says that

Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect

2025-12-19 Thread Fujii Masao
On Fri, Dec 19, 2025 at 7:07 PM Japin Li wrote: > Thanks for the patch — that was my oversight. > > LGTM with one small suggestion: Thanks for the review! > The comment says: "If the option is not found in connInfo, return NULL value." > > Since the parameter is named `keyword`, I'd suggest: "If

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-19 Thread Bertrand Drouvot
Hi, On Fri, Dec 19, 2025 at 05:36:51PM +0800, Japin Li wrote: > On Fri, 19 Dec 2025 at 08:23, Bertrand Drouvot > wrote: > > Yeah that would not hurt. What about before the relation_open() calls? > > > > " > > Use relation_open() and not index_open() to avoid the > > validate_relation_kind() > >

Re: Orphaned records in pg_replication_origin_status after subscription drop

2025-12-19 Thread Amit Kapila
On Fri, Dec 19, 2025 at 10:42 AM Michael Paquier wrote: > > Some colleagues have reported that it is possible to finish with > orphaned records in pg_replication_origin_status, as an effect of > table synchronization workers that miss some cleanup actions around > replorigin_drop_by_name() when a

Re: Fix typo 586/686 in atomics/arch-x86.h

2025-12-19 Thread Zsolt Parragi
> It does, but will this affect that? Does gcc change the CPU arch to 32bit era > hardware when using -m32? I did some quick testing with this, normally only __i386__ gets defined for 32 bit builds (-march=native -m32 for example, but also the default -march=x86-64 -m32). __i586__ and __i686__ ar

Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect

2025-12-19 Thread Japin Li
On Fri, 19 Dec 2025 at 16:55, Fujii Masao wrote: > On Wed, Dec 3, 2025 at 2:45 PM Amit Kapila wrote: >> >> On Tue, Dec 2, 2025 at 8:30 PM Fujii Masao wrote: >> > >> > On Tue, Dec 2, 2025 at 9:08 PM Amit Kapila wrote: >> > > Is it possible that we append the predefined options to the options >>

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-19 Thread Japin Li
On Fri, 19 Dec 2025 at 08:23, Bertrand Drouvot wrote: > Hi, > > On Fri, Dec 19, 2025 at 02:21:40PM +0800, Japin Li wrote: >> On Fri, 19 Dec 2025 at 04:29, Bertrand Drouvot >> wrote: >> > Yeah, and removing IS_INDEX() and adding a check for partitioned indexes >> > would >> > still mean 2 code

Re: Fix typo 586/686 in atomics/arch-x86.h

2025-12-19 Thread Daniel Gustafsson
> On 19 Dec 2025, at 08:23, John Naylor wrote: > > On Fri, Nov 28, 2025 at 4:00 PM Daniel Gustafsson wrote: >> >>> On 28 Nov 2025, at 09:44, Jakub Wartak >>> wrote: >>> >>> That's a typo in src/include/port/atomics/arch-x86.h, isn't it ?: >>> if defined(__i568__) || defined(__i668__) || /*

Re: [PATCH] Documentation

2025-12-19 Thread John Naylor
On Thu, Dec 18, 2025 at 2:31 PM Mikael Gustavsson wrote: > This patch updates some examples in documentation client-auth.sgml from md5 > to scram-sha-256 > Reference: > https://www.postgresql.org/message-id/176595607507.978865.11597773194269211255%40wrigleys.postgresql.org Pushed and backpatche

Re: Report bytes and transactions actually sent downtream

2025-12-19 Thread Ashutosh Bapat
On Fri, Dec 19, 2025 at 7:24 AM Chao Li wrote: > > > > > On Dec 18, 2025, at 20:52, Ashutosh Bapat > > wrote: > > > > On Thu, Dec 18, 2025 at 7:56 AM Chao Li wrote: > >> > >> > >> > >>> On Dec 17, 2025, at 13:55, Ashutosh Bapat > >>> wrote: > >>> > >>> Thanks for pointing this out. I have fix

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

2025-12-19 Thread Masahiko Sawada
On Thu, Dec 18, 2025 at 7:53 PM shveta malik wrote: > > On Fri, Dec 19, 2025 at 6:13 AM Masahiko Sawada wrote: > > > > > > > > > I've rebased the patch and addressed the review comments. > > > > Regards, > > > > Thanks for the patch. > > 1) > + * There could be some transactions that might have s

Re: Proposal: Conflict log history table for Logical Replication

2025-12-19 Thread Masahiko Sawada
On Thu, Dec 18, 2025 at 10:24 PM Dilip Kumar wrote: > > On Fri, Dec 19, 2025 at 10:40 AM shveta malik wrote: > > > > 1. What should be the name of the option 'conflict_log_destination' vs > > > 'conflict_log_format' > > > > I prefer conflcit_log_destination. > > > > > 2. Do we want to support mul

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-19 Thread Bertrand Drouvot
Hi, On Fri, Dec 19, 2025 at 02:21:40PM +0800, Japin Li wrote: > On Fri, 19 Dec 2025 at 04:29, Bertrand Drouvot > wrote: > > Yeah, and removing IS_INDEX() and adding a check for partitioned indexes > > would > > still mean 2 code paths. So, v2 changes the close calls (and that's > > consistent

Re: Improve logical replication usability when tables lack primary keys

2025-12-19 Thread Chao Li
> On Dec 18, 2025, at 22:49, Euler Taveira wrote: > > On Wed, Dec 17, 2025, at 6:43 PM, GRANT ZHOU wrote: >> On Wed, Dec 17, 2025 at 12:50 PM Euler Taveira wrote: >>> Each table needs to say what's its row identifier. The user created a table >>> without primary key. Well, create a primary ke