pgsql: Message style improvements

2021-06-27 Thread Peter Eisentraut
Message style improvements Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c31833779d5a4775d7220be4b9143bec66c9a9fd Modified Files -- src/backend/access/common/toast_compression.c | 2 +- src/backend/catalog/catalog.c | 14 +-

pgsql: Improve RelationGetIdentityKeyBitmap().

2021-06-27 Thread Amit Kapila
Improve RelationGetIdentityKeyBitmap(). We were using RelationGetIndexList() to update the relation's replica identity index but instead, we can directly use RelationGetReplicaIndex() which uses the same functionality. This is a minor code readability improvement. Author: Japin Li Reviewed-By: Ta

pgsql: Fix race condition in TransactionGroupUpdateXidStatus().

2021-06-27 Thread Amit Kapila
Fix race condition in TransactionGroupUpdateXidStatus(). When we cannot immediately acquire CLogControlLock in exclusive mode at commit time, we add ourselves to a list of processes that need their XIDs status update. We do this if the clog page where we need to update the current transaction stat

pgsql: Fix race condition in TransactionGroupUpdateXidStatus().

2021-06-27 Thread Amit Kapila
Fix race condition in TransactionGroupUpdateXidStatus(). When we cannot immediately acquire XactSLRULock in exclusive mode at commit time, we add ourselves to a list of processes that need their XIDs status update. We do this if the clog page where we need to update the current transaction status

pgsql: Fix race condition in TransactionGroupUpdateXidStatus().

2021-06-27 Thread Amit Kapila
Fix race condition in TransactionGroupUpdateXidStatus(). When we cannot immediately acquire CLogControlLock in exclusive mode at commit time, we add ourselves to a list of processes that need their XIDs status update. We do this if the clog page where we need to update the current transaction stat

pgsql: Fix race condition in TransactionGroupUpdateXidStatus().

2021-06-27 Thread Amit Kapila
Fix race condition in TransactionGroupUpdateXidStatus(). When we cannot immediately acquire XactSLRULock in exclusive mode at commit time, we add ourselves to a list of processes that need their XIDs status update. We do this if the clog page where we need to update the current transaction status

pgsql: Change recovery_init_sync_method to PGC_SIGHUP.

2021-06-27 Thread Thomas Munro
Change recovery_init_sync_method to PGC_SIGHUP. The setting has no effect except during startup. It's still nice to be able to change it dynamically, which is expected to be pretty useful to an admin following crash recovery when restarting the cluster is not so appealing. Per discussions follow

pgsql: Fix variable initialization with ALTER SUBSCRIPTION DROP PUBLICA

2021-06-27 Thread Michael Paquier
Fix variable initialization with ALTER SUBSCRIPTION DROP PUBLICATION copy_data is not a supported option with this sub-command of ALTER SUBSCRIPTION, which would not make a variable related to it initialized after parsing the option set in DefElems. A refresh could then refer to it. Author: Rani

pgsql: Add test for CREATE INDEX CONCURRENTLY with not-so-immutable pre

2021-06-27 Thread Michael Paquier
Add test for CREATE INDEX CONCURRENTLY with not-so-immutable predicate 83158f7 has improved index_set_state_flags() so as it is possible to use transactional updates when updating pg_index state flags, but there was not really a test case which stressed directly the possibility it fixed. This comm

pgsql: Add test for CREATE INDEX CONCURRENTLY with not-so-immutable pre

2021-06-27 Thread Michael Paquier
Add test for CREATE INDEX CONCURRENTLY with not-so-immutable predicate 83158f7 has improved index_set_state_flags() so as it is possible to use transactional updates when updating pg_index state flags, but there was not really a test case which stressed directly the possibility it fixed. This comm

pgsql: Add test for CREATE INDEX CONCURRENTLY with not-so-immutable pre

2021-06-27 Thread Michael Paquier
Add test for CREATE INDEX CONCURRENTLY with not-so-immutable predicate 83158f7 has improved index_set_state_flags() so as it is possible to use transactional updates when updating pg_index state flags, but there was not really a test case which stressed directly the possibility it fixed. This comm

pgsql: Add test for CREATE INDEX CONCURRENTLY with not-so-immutable pre

2021-06-27 Thread Michael Paquier
Add test for CREATE INDEX CONCURRENTLY with not-so-immutable predicate 83158f7 has improved index_set_state_flags() so as it is possible to use transactional updates when updating pg_index state flags, but there was not really a test case which stressed directly the possibility it fixed. This comm

pgsql: Add test for CREATE INDEX CONCURRENTLY with not-so-immutable pre

2021-06-27 Thread Michael Paquier
Add test for CREATE INDEX CONCURRENTLY with not-so-immutable predicate 83158f7 has improved index_set_state_flags() so as it is possible to use transactional updates when updating pg_index state flags, but there was not really a test case which stressed directly the possibility it fixed. This comm

pgsql: Add test for CREATE INDEX CONCURRENTLY with not-so-immutable pre

2021-06-27 Thread Michael Paquier
Add test for CREATE INDEX CONCURRENTLY with not-so-immutable predicate 83158f7 has improved index_set_state_flags() so as it is possible to use transactional updates when updating pg_index state flags, but there was not really a test case which stressed directly the possibility it fixed. This comm

pgsql: Make index_set_state_flags() transactional

2021-06-27 Thread Michael Paquier
Make index_set_state_flags() transactional 3c84046 is the original commit that introduced index_set_state_flags(), where the presence of SnapshotNow made necessary the use of an in-place update. SnapshotNow has been removed in 813fb03, so there is no actual reasons to not make this operation tran

pgsql: Make index_set_state_flags() transactional

2021-06-27 Thread Michael Paquier
Make index_set_state_flags() transactional 3c84046 is the original commit that introduced index_set_state_flags(), where the presence of SnapshotNow made necessary the use of an in-place update. SnapshotNow has been removed in 813fb03, so there is no actual reasons to not make this operation tran

pgsql: Make index_set_state_flags() transactional

2021-06-27 Thread Michael Paquier
Make index_set_state_flags() transactional 3c84046 is the original commit that introduced index_set_state_flags(), where the presence of SnapshotNow made necessary the use of an in-place update. SnapshotNow has been removed in 813fb03, so there is no actual reasons to not make this operation tran

pgsql: Make index_set_state_flags() transactional

2021-06-27 Thread Michael Paquier
Make index_set_state_flags() transactional 3c84046 is the original commit that introduced index_set_state_flags(), where the presence of SnapshotNow made necessary the use of an in-place update. SnapshotNow has been removed in 813fb03, so there is no actual reasons to not make this operation tran

pgsql: Make index_set_state_flags() transactional

2021-06-27 Thread Michael Paquier
Make index_set_state_flags() transactional 3c84046 is the original commit that introduced index_set_state_flags(), where the presence of SnapshotNow made necessary the use of an in-place update. SnapshotNow has been removed in 813fb03, so there is no actual reasons to not make this operation tran

pgsql: Remove memory leaks in isolationtester.

2021-06-27 Thread Tom Lane
Remove memory leaks in isolationtester. specscanner.l leaked a kilobyte of memory per token of the spec file. Apparently somebody thought that the introductory code block would be executed once; but it's once per yylex() call. A couple of functions in isolationtester.c leaked small amounts of mem

pgsql: Remove memory leaks in isolationtester.

2021-06-27 Thread Tom Lane
Remove memory leaks in isolationtester. specscanner.l leaked a kilobyte of memory per token of the spec file. Apparently somebody thought that the introductory code block would be executed once; but it's once per yylex() call. A couple of functions in isolationtester.c leaked small amounts of mem

pgsql: Remove memory leaks in isolationtester.

2021-06-27 Thread Tom Lane
Remove memory leaks in isolationtester. specscanner.l leaked a kilobyte of memory per token of the spec file. Apparently somebody thought that the introductory code block would be executed once; but it's once per yylex() call. A couple of functions in isolationtester.c leaked small amounts of mem

pgsql: Remove memory leaks in isolationtester.

2021-06-27 Thread Tom Lane
Remove memory leaks in isolationtester. specscanner.l leaked a kilobyte of memory per token of the spec file. Apparently somebody thought that the introductory code block would be executed once; but it's once per yylex() call. A couple of functions in isolationtester.c leaked small amounts of mem

pgsql: Remove memory leaks in isolationtester.

2021-06-27 Thread Tom Lane
Remove memory leaks in isolationtester. specscanner.l leaked a kilobyte of memory per token of the spec file. Apparently somebody thought that the introductory code block would be executed once; but it's once per yylex() call. A couple of functions in isolationtester.c leaked small amounts of mem

pgsql: Remove memory leaks in isolationtester.

2021-06-27 Thread Tom Lane
Remove memory leaks in isolationtester. specscanner.l leaked a kilobyte of memory per token of the spec file. Apparently somebody thought that the introductory code block would be executed once; but it's once per yylex() call. A couple of functions in isolationtester.c leaked small amounts of mem

pgsql: Error message refactoring

2021-06-27 Thread Peter Eisentraut
Error message refactoring Take some untranslatable things out of the message and replace by format placeholders, to reduce translatable strings and reduce translation mistakes. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c302a6139072fed9410204fa9e751d95930e05ff