pgsql: Update oid for pg_wal_replay_wait() procedure

2024-09-26 Thread Alexander Korotkov
Update oid for pg_wal_replay_wait() procedure Use an oid from 8000- range, as required by 98eab30b93d5. Reported-by: Michael Paquier Discussion: https://postgr.es/m/ZvUY6bfTwB0GsyzP%40paquier.xyz Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e658038772f59588c

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-09-26 Thread Michael Paquier
Hi Alexander, On Fri, Aug 02, 2024 at 06:22:21PM +, Alexander Korotkov wrote: > Implement pg_wal_replay_wait() stored procedure > > pg_wal_replay_wait() is to be used on standby and specifies waiting for > the specific WAL location to be replayed. This option is useful when > the user makes

pgsql: Doc: Add a note in the upgrade of logical replication clusters.

2024-09-26 Thread Amit Kapila
Doc: Add a note in the upgrade of logical replication clusters. The steps used to upgrade the cluster first upgraded the publisher node but ideally, any node could be upgraded first. Author: Vignesh C Discussion: https://postgr.es/m/[email protected].

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-09-26 Thread Alexander Korotkov
On Thu, Sep 26, 2024 at 11:19 AM Michael Paquier wrote: > On Fri, Aug 02, 2024 at 06:22:21PM +, Alexander Korotkov wrote: > > Implement pg_wal_replay_wait() stored procedure > > > > pg_wal_replay_wait() is to be used on standby and specifies waiting for > > the specific WAL location to be repl

pgsql: Modernize to_char's Roman-numeral code, fixing overflow problems

2024-09-26 Thread Tom Lane
Modernize to_char's Roman-numeral code, fixing overflow problems. int_to_roman() only accepts plain "int" input, which is fine since we're going to produce '###' for any value above 3999 anyway. However, the numeric and int8 variants of to_char() would throw an error if the given inpu

pgsql: Doc: InitPlans aren't parallel-restricted any more.

2024-09-26 Thread Tom Lane
Doc: InitPlans aren't parallel-restricted any more. Commit e08d74ca1 removed that restriction, but missed updating the documentation about it. Noted by Egor Rogov. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://

pgsql: Doc: InitPlans aren't parallel-restricted any more.

2024-09-26 Thread Tom Lane
Doc: InitPlans aren't parallel-restricted any more. Commit e08d74ca1 removed that restriction, but missed updating the documentation about it. Noted by Egor Rogov. Discussion: https://postgr.es/m/[email protected] Branch -- REL_17_STABLE Details --- h

pgsql: Improve style of pg_upgrade task callback functions.

2024-09-26 Thread Nathan Bossart
Improve style of pg_upgrade task callback functions. I wanted to avoid adjusting this code too much when converting these tasks to use the new parallelization framework (see commit 40e2e5e92b), which is why this is being done as a follow-up commit. These stylistic adjustments result in fewer lines

pgsql: Ensure we have a snapshot when updating pg_index entries.

2024-09-26 Thread Nathan Bossart
Ensure we have a snapshot when updating pg_index entries. Creating, reindexing, and dropping an index concurrently could entail accessing pg_index's TOAST table, which was recently added in commit b52c4fc3c0. These code paths start and commit their own transactions, but they do not always set an

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-09-26 Thread Michael Paquier
On Thu, Sep 26, 2024 at 06:41:18PM +0300, Alexander Korotkov wrote: > On Thu, Sep 26, 2024 at 11:19 AM Michael Paquier wrote: >> Please use something in the 8000- range, as required by >> 98eab30b93d5. > > Fixed, sorry for messing this up. Thanks for taking care of that. > I would appreciat

pgsql: Fix typo in pg_walsummary/nls.mk.

2024-09-26 Thread Fujii Masao
Fix typo in pg_walsummary/nls.mk. Author: Koki Nakamura Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8410f738ad2fd94fc068ce0189e1ae04ef3c12e3 Modified Files -- src/bin/p

pgsql: Fix catalog data of new LO privilege functions

2024-09-26 Thread Michael Paquier
Fix catalog data of new LO privilege functions This commit improves the catalog data in pg_proc for the three functions for has_largeobject_privilege(), introduced in 4eada203a5a8: - Fix their descriptions (typos and consistency). - Reallocate OIDs to be within the 8000- range as required by a

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-09-26 Thread Michael Paquier
On Fri, Sep 20, 2024 at 03:00:20PM +0300, Alexander Korotkov wrote: > Please, check the attached patchset for implementation of proposed approach. 0001 looks like it requires an indentation in its .h diffs. +typedef enum +{ + WaitLSNResultSuccess, /* Target LSN is reached */ + WaitLSN

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-09-26 Thread Michael Paquier
On Fri, Sep 27, 2024 at 01:35:23PM +0900, Michael Paquier wrote: > I would suggest to keep things simple and have one single function > rather than introduce two more pg_proc entries with slight differences > in their error reporting, making the original function return a text > about the reason of

pgsql: Fix incorrect memory access in VACUUM FULL with invalid toast in

2024-09-26 Thread Michael Paquier
Fix incorrect memory access in VACUUM FULL with invalid toast indexes An invalid toast index is skipped in reindex_relation(). These would be remnants of a failed REINDEX CONCURRENTLY and they should never been rebuilt as there can only be one valid toast index at a time. REINDEX_REL_SUPPRESS_IN

pgsql: Fix incorrect memory access in VACUUM FULL with invalid toast in

2024-09-26 Thread Michael Paquier
Fix incorrect memory access in VACUUM FULL with invalid toast indexes An invalid toast index is skipped in reindex_relation(). These would be remnants of a failed REINDEX CONCURRENTLY and they should never been rebuilt as there can only be one valid toast index at a time. REINDEX_REL_SUPPRESS_IN

pgsql: Fix incorrect memory access in VACUUM FULL with invalid toast in

2024-09-26 Thread Michael Paquier
Fix incorrect memory access in VACUUM FULL with invalid toast indexes An invalid toast index is skipped in reindex_relation(). These would be remnants of a failed REINDEX CONCURRENTLY and they should never been rebuilt as there can only be one valid toast index at a time. REINDEX_REL_SUPPRESS_IN

pgsql: Fix incorrect memory access in VACUUM FULL with invalid toast in

2024-09-26 Thread Michael Paquier
Fix incorrect memory access in VACUUM FULL with invalid toast indexes An invalid toast index is skipped in reindex_relation(). These would be remnants of a failed REINDEX CONCURRENTLY and they should never been rebuilt as there can only be one valid toast index at a time. REINDEX_REL_SUPPRESS_IN

pgsql: Fix incorrect memory access in VACUUM FULL with invalid toast in

2024-09-26 Thread Michael Paquier
Fix incorrect memory access in VACUUM FULL with invalid toast indexes An invalid toast index is skipped in reindex_relation(). These would be remnants of a failed REINDEX CONCURRENTLY and they should never been rebuilt as there can only be one valid toast index at a time. REINDEX_REL_SUPPRESS_IN

pgsql: Fix incorrect memory access in VACUUM FULL with invalid toast in

2024-09-26 Thread Michael Paquier
Fix incorrect memory access in VACUUM FULL with invalid toast indexes An invalid toast index is skipped in reindex_relation(). These would be remnants of a failed REINDEX CONCURRENTLY and they should never been rebuilt as there can only be one valid toast index at a time. REINDEX_REL_SUPPRESS_IN

pgsql: Fix incorrect memory access in VACUUM FULL with invalid toast in

2024-09-26 Thread Michael Paquier
Fix incorrect memory access in VACUUM FULL with invalid toast indexes An invalid toast index is skipped in reindex_relation(). These would be remnants of a failed REINDEX CONCURRENTLY and they should never been rebuilt as there can only be one valid toast index at a time. REINDEX_REL_SUPPRESS_IN