pgsql: Use SetInstallXLogFileSegmentActive() in more places in xlog.c

2022-08-16 Thread Michael Paquier
Use SetInstallXLogFileSegmentActive() in more places in xlog.c This reduces the code paths where XLogCtl->InstallXLogFileSegmentActive is directly touched, and this wrapper function does the same thing as the original code replaced by the function call. Author: Bharath Rupireddy Reviewed-by: Nath

pgsql: Allow event trigger table_rewrite for ALTER MATERIALIZED VIEW

2022-08-16 Thread Michael Paquier
Allow event trigger table_rewrite for ALTER MATERIALIZED VIEW This event can happen when using SET ACCESS METHOD, as the data files of the materialized need a full refresh but this command tag was not updated to reflect that. The documentation is updated to track this behavior. Author: Onder Kal

pgsql: Allow event trigger table_rewrite for ALTER MATERIALIZED VIEW

2022-08-16 Thread Michael Paquier
Allow event trigger table_rewrite for ALTER MATERIALIZED VIEW This event can happen when using SET ACCESS METHOD, as the data files of the materialized need a full refresh but this command tag was not updated to reflect that. The documentation is updated to track this behavior. Author: Onder Kal

pgsql: Fix assert in logicalmsg_desc

2022-08-16 Thread Tomas Vondra
Fix assert in logicalmsg_desc The assert, introduced by 9f1cf97bb5, is intended to check if the prefix is terminated by a \0 byte, but it has two flaws. Firstly, prefix_size includes the \0 byte, so prefix[prefix_size] points to the byte after the null byte. Secondly, the check ensures the byte is

pgsql: Fix assert in logicalmsg_desc

2022-08-16 Thread Tomas Vondra
Fix assert in logicalmsg_desc The assert, introduced by 9f1cf97bb5, is intended to check if the prefix is terminated by a \0 byte, but it has two flaws. Firstly, prefix_size includes the \0 byte, so prefix[prefix_size] points to the byte after the null byte. Secondly, the check ensures the byte is

pgsql: Fix assert in logicalmsg_desc

2022-08-16 Thread Tomas Vondra
Fix assert in logicalmsg_desc The assert, introduced by 9f1cf97bb5, is intended to check if the prefix is terminated by a \0 byte, but it has two flaws. Firstly, prefix_size includes the \0 byte, so prefix[prefix_size] points to the byte after the null byte. Secondly, the check ensures the byte is

pgsql: doc: Remove reference to tty libpq connstring param

2022-08-16 Thread Daniel Gustafsson
doc: Remove reference to tty libpq connstring param The tty connection string parameter was removed in commit 14d9b3760 but the reference to it in the docs was mistakenly kept. Fix by removing it from the libpq documentation. Backpatch through v14 where the parameter was removed. Author: Noriyo

pgsql: doc: Remove reference to tty libpq connstring param

2022-08-16 Thread Daniel Gustafsson
doc: Remove reference to tty libpq connstring param The tty connection string parameter was removed in commit 14d9b3760 but the reference to it in the docs was mistakenly kept. Fix by removing it from the libpq documentation. Backpatch through v14 where the parameter was removed. Author: Noriyo

pgsql: doc: Remove reference to tty libpq connstring param

2022-08-16 Thread Daniel Gustafsson
doc: Remove reference to tty libpq connstring param The tty connection string parameter was removed in commit 14d9b3760 but the reference to it in the docs was mistakenly kept. Fix by removing it from the libpq documentation. Backpatch through v14 where the parameter was removed. Author: Noriyo

pgsql: doc: Add missing parenthesis to keycombo

2022-08-16 Thread Daniel Gustafsson
doc: Add missing parenthesis to keycombo The SIGINT keycombo for the pg_waldump stats emission was lacking a closing parenthesis. Backpatch to 15 where this feature was added. Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15 Branch -- REL_1

pgsql: doc: Add missing parenthesis to keycombo

2022-08-16 Thread Daniel Gustafsson
doc: Add missing parenthesis to keycombo The SIGINT keycombo for the pg_waldump stats emission was lacking a closing parenthesis. Backpatch to 15 where this feature was added. Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15 Branch -- maste

pgsql: Fix replica identity check for a partitioned table.

2022-08-16 Thread Amit Kapila
Fix replica identity check for a partitioned table. The current publisher code checks if UPDATE or DELETE can be executed with the replica identity of the table even if it's a partitioned table. We can skip checking the replica identity for partitioned tables because the operations are actually pe

pgsql: Fix replica identity check for a partitioned table.

2022-08-16 Thread Amit Kapila
Fix replica identity check for a partitioned table. The current publisher code checks if UPDATE or DELETE can be executed with the replica identity of the table even if it's a partitioned table. We can skip checking the replica identity for partitioned tables because the operations are actually pe

pgsql: Fix replica identity check for a partitioned table.

2022-08-16 Thread Amit Kapila
Fix replica identity check for a partitioned table. The current publisher code checks if UPDATE or DELETE can be executed with the replica identity of the table even if it's a partitioned table. We can skip checking the replica identity for partitioned tables because the operations are actually pe

pgsql: Fix replica identity check for a partitioned table.

2022-08-16 Thread Amit Kapila
Fix replica identity check for a partitioned table. The current publisher code checks if UPDATE or DELETE can be executed with the replica identity of the table even if it's a partitioned table. We can skip checking the replica identity for partitioned tables because the operations are actually pe