pgsql: Fix DROP ROLE when specifying duplicated roles

2024-01-28 Thread Michael Paquier
Fix DROP ROLE when specifying duplicated roles This commit fixes failures with "tuple already updated by self" when listing twice the same role and in a DROP ROLE query. This is an oversight in 6566133c5f52, that has introduced a two-phase logic in DropRole() where dependencies of all the roles t

pgsql: Fix DROP ROLE when specifying duplicated roles

2024-01-28 Thread Michael Paquier
Fix DROP ROLE when specifying duplicated roles This commit fixes failures with "tuple already updated by self" when listing twice the same role and in a DROP ROLE query. This is an oversight in 6566133c5f52, that has introduced a two-phase logic in DropRole() where dependencies of all the roles t

Re: pgsql: Temporary patch to help debug pg_walsummary test failures.

2024-01-28 Thread Michael Paquier
On Fri, Jan 26, 2024 at 06:37:17PM +, Robert Haas wrote: > Temporary patch to help debug pg_walsummary test failures. > > This patch should be reverted once we sort out what's happening here. Not sure if that's worth fixing if this should be gone at some point, but koel has been complaining o

pgsql: Add more LOG messages when starting and ending recovery from a b

2024-01-28 Thread Michael Paquier
Add more LOG messages when starting and ending recovery from a backup Three LOG messages are added in the recovery code paths, providing information that can be useful to track corruption issues depending on the state of the cluster, telling that: - Recovery has started from a backup_label. - Reco

pgsql: Add more LOG messages when starting and ending recovery from a b

2024-01-28 Thread Michael Paquier
Add more LOG messages when starting and ending recovery from a backup Three LOG messages are added in the recovery code paths, providing information that can be useful to track corruption issues depending on the state of the cluster, telling that: - Recovery has started from a backup_label. - Reco

pgsql: Remove ReorderBufferTupleBuf structure.

2024-01-28 Thread Masahiko Sawada
Remove ReorderBufferTupleBuf structure. Since commit a4ccc1cef, the 'node' and 'alloc_tuple_size' fields of the ReorderBufferTupleBuf structure are no longer used. This leaves only the 'tuple' field in the structure. Since keeping a single-field structure makes little sense, the ReorderBufferTuple

pgsql: Allow setting failover property in the replication command.

2024-01-28 Thread Amit Kapila
Allow setting failover property in the replication command. This commit implements a new replication command called ALTER_REPLICATION_SLOT and a corresponding walreceiver API function named walrcv_alter_slot. Additionally, the CREATE_REPLICATION_SLOT command has been extended to support the failov

pgsql: Fix comments in ReplicationSlotAcquire().

2024-01-28 Thread Amit Kapila
Fix comments in ReplicationSlotAcquire(). They were incorrectly referring to a slot parameter in ReplicationSlotAcquire() which is not passed to the API. Author: Wang Wei Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/os3pr01mb6275e3ce4dc15ff8b8b80d3a9e...@os3pr01mb6275.jpnprd01.prod.o

pgsql: Fix catalog lookup due to wrong snapshot for subtransactions dur

2024-01-28 Thread Amit Kapila
Fix catalog lookup due to wrong snapshot for subtransactions during decoding. In commit 272248a0c, we fixed the catalog lookup due to the wrong snapshot for transactions and subtransactions during decoding. We failed to consider the case where top-level xact is already marked as containing catalog

pgsql: Fix catalog lookup due to wrong snapshot for subtransactions dur

2024-01-28 Thread Amit Kapila
Fix catalog lookup due to wrong snapshot for subtransactions during decoding. In commit 272248a0c, we fixed the catalog lookup due to the wrong snapshot for transactions and subtransactions during decoding. We failed to consider the case where top-level xact is already marked as containing catalog

pgsql: Remove make function vpathsearch

2024-01-28 Thread Peter Eisentraut
Remove make function vpathsearch This function served to support having prebuilt files in the source tree for vpath builds. This is no longer possible (since 721856ff24b); all built files are now always in the build tree. The invocations of this function are no longer required. Branch -- ma

pgsql: Doc: Fix incorrect reference to conflicting column in pg_replica

2024-01-28 Thread Amit Kapila
Doc: Fix incorrect reference to conflicting column in pg_replication_slots. Commit 007693f2a3 changes the existing 'conflicting' field to 'conflict_reason' in pg_replication_slots but missed updating one of its existing references. Author: Hou Zhijie Discussion: https://postgr.es/m/os0pr01mb5716