pgsql: Cross-check lists of built-in LWLock tranches.

2025-07-23 Thread Nathan Bossart
Cross-check lists of built-in LWLock tranches. lwlock.c, lwlock.h, and wait_event_names.txt each contain a list of built-in LWLock tranches. It is easy to miss one or the other when adding or removing tranches, and discrepancies have adverse effects (e.g., breaking JOINs between pg_stat_activity

pgsql: Use PqMsg_* macros in walsender.c

2025-07-23 Thread Nathan Bossart
Use PqMsg_* macros in walsender.c Oversights in commits f4b54e1ed9, dc21234005, and 228c370868. Author: Dave Cramer Discussion: https://postgr.es/m/CADK3HH%2BowWVdnbmWH4NHG8%3D%2BkXA_wjsyEVLoY719iJnb%3D%2BtT6A%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg

pgsql: Move enum RecoveryTargetAction to xlogrecovery.h

2025-07-23 Thread Álvaro Herrera
Move enum RecoveryTargetAction to xlogrecovery.h Commit 70e81861fadd split out xlogrecovery.c/h and moved some enums related to recovery targets to xlogrecovery.h. However, it seems that the enum RecoveryTargetAction was inadvertently left out by that commit. This commit moves it to xlogrecovery.h

Re: pgsql: Preserve conflict-relevant data during logical replication.

2025-07-23 Thread Amit Kapila
On Thu, Jul 24, 2025 at 8:27 AM Zhijie Hou (Fujitsu) wrote: > > On Thursday, July 24, 2025 9:25 AM Michael Paquier > wrote: > > > > On Wed, Jul 23, 2025 at 03:35:06AM +, Amit Kapila wrote: > > > Preserve conflict-relevant data during logical replication. > > > > > > Logical replication requi

pgsql: Fix cfbot failure caused by commit 228c370868.

2025-07-23 Thread Amit Kapila
Fix cfbot failure caused by commit 228c370868. Ensure the test waits for the apply worker to exit after disabling the subscription. This is necessary to safely enable the retain_dead_tuples option. Also added a similar wait in another part of the test to prevent unintended apply worker activity th

pgsql: doc: Add missing index entries and fix title formatting in pg_bu

2025-07-23 Thread Fujii Masao
doc: Add missing index entries and fix title formatting in pg_buffercache docs. This commit adds missing index entries for the functions pg_buffercache_numa() and pg_buffercache_usage_counts() in the pg_buffercache documentation. It also makes the function titles consistent by adding parentheses

pgsql: doc: Add missing index entries and fix title formatting in pg_bu

2025-07-23 Thread Fujii Masao
doc: Add missing index entries and fix title formatting in pg_buffercache docs. This commit adds missing index entries for the functions pg_buffercache_numa() and pg_buffercache_usage_counts() in the pg_buffercache documentation. It also makes the function titles consistent by adding parentheses

pgsql: Introduce field tracking cached plan type in PlannedStmt

2025-07-23 Thread Michael Paquier
Introduce field tracking cached plan type in PlannedStmt PlannedStmt gains a new field, called CachedPlanType, able to track if a given plan tree originates from the cache and if we are dealing with a generic or custom cached plan. This field can be used for monitoring or statistical purposes, in

pgsql: Fix build breakage on Solaris-alikes with late-model GCC.

2025-07-23 Thread Tom Lane
Fix build breakage on Solaris-alikes with late-model GCC. Solaris has never bothered to add "const" to the second argument of PAM conversation procs, as all other Unixen did decades ago. This resulted in an "incompatible pointer" compiler warning when building --with-pam, but had no more serious e

pgsql: Fix build breakage on Solaris-alikes with late-model GCC.

2025-07-23 Thread Tom Lane
Fix build breakage on Solaris-alikes with late-model GCC. Solaris has never bothered to add "const" to the second argument of PAM conversation procs, as all other Unixen did decades ago. This resulted in an "incompatible pointer" compiler warning when building --with-pam, but had no more serious e

pgsql: Fix build breakage on Solaris-alikes with late-model GCC.

2025-07-23 Thread Tom Lane
Fix build breakage on Solaris-alikes with late-model GCC. Solaris has never bothered to add "const" to the second argument of PAM conversation procs, as all other Unixen did decades ago. This resulted in an "incompatible pointer" compiler warning when building --with-pam, but had no more serious e

pgsql: Fix build breakage on Solaris-alikes with late-model GCC.

2025-07-23 Thread Tom Lane
Fix build breakage on Solaris-alikes with late-model GCC. Solaris has never bothered to add "const" to the second argument of PAM conversation procs, as all other Unixen did decades ago. This resulted in an "incompatible pointer" compiler warning when building --with-pam, but had no more serious e

pgsql: Fix build breakage on Solaris-alikes with late-model GCC.

2025-07-23 Thread Tom Lane
Fix build breakage on Solaris-alikes with late-model GCC. Solaris has never bothered to add "const" to the second argument of PAM conversation procs, as all other Unixen did decades ago. This resulted in an "incompatible pointer" compiler warning when building --with-pam, but had no more serious e

pgsql: Fix build breakage on Solaris-alikes with late-model GCC.

2025-07-23 Thread Tom Lane
Fix build breakage on Solaris-alikes with late-model GCC. Solaris has never bothered to add "const" to the second argument of PAM conversation procs, as all other Unixen did decades ago. This resulted in an "incompatible pointer" compiler warning when building --with-pam, but had no more serious e

pgsql: Fix build breakage on Solaris-alikes with late-model GCC.

2025-07-23 Thread Tom Lane
Fix build breakage on Solaris-alikes with late-model GCC. Solaris has never bothered to add "const" to the second argument of PAM conversation procs, as all other Unixen did decades ago. This resulted in an "incompatible pointer" compiler warning when building --with-pam, but had no more serious e

Re: pgsql: Preserve conflict-relevant data during logical replication.

2025-07-23 Thread Michael Paquier
On Wed, Jul 23, 2025 at 03:35:06AM +, Amit Kapila wrote: > Preserve conflict-relevant data during logical replication. > > Logical replication requires reliable conflict detection to maintain data > consistency across nodes. To achieve this, we must prevent premature > removal of tuples delete

RE: pgsql: Preserve conflict-relevant data during logical replication.

2025-07-23 Thread Zhijie Hou (Fujitsu)
On Thursday, July 24, 2025 9:25 AM Michael Paquier wrote: > > On Wed, Jul 23, 2025 at 03:35:06AM +, Amit Kapila wrote: > > Preserve conflict-relevant data during logical replication. > > > > Logical replication requires reliable conflict detection to maintain > > data consistency across nodes