pgsql: Rename wal_keep_segments to wal_keep_size.

2020-07-19 Thread Fujii Masao
Rename wal_keep_segments to wal_keep_size. max_slot_wal_keep_size that was added in v13 and wal_keep_segments are the GUC parameters to specify how much WAL files to retain for the standby servers. While max_slot_wal_keep_size accepts the number of bytes of WAL files, wal_keep_segments accepts the

pgsql: Rename wal_keep_segments to wal_keep_size.

2020-07-19 Thread Fujii Masao
Rename wal_keep_segments to wal_keep_size. max_slot_wal_keep_size that was added in v13 and wal_keep_segments are the GUC parameters to specify how much WAL files to retain for the standby servers. While max_slot_wal_keep_size accepts the number of bytes of WAL files, wal_keep_segments accepts the

pgsql: Immediately WAL-log subtransaction and top-level XID association

2020-07-19 Thread Amit Kapila
Immediately WAL-log subtransaction and top-level XID association. The logical decoding infrastructure needs to know which top-level transaction the subxact belongs to, in order to decode all the changes. Until now that might be delayed until commit, due to the caching (GPROC_MAX_CACHED_SUBXIDS), p

pgsql: Add generic_plans and custom_plans fields into pg_prepared_state

2020-07-19 Thread Fujii Masao
Add generic_plans and custom_plans fields into pg_prepared_statements. There was no easy way to find how many times generic and custom plans have been executed for a prepared statement. This commit exposes those numbers of times in pg_prepared_statements view. Author: Atsushi Torikoshi, Kyotaro H

pgsql: Fix minor typo in nodeIncrementalSort.c.

2020-07-19 Thread Amit Kapila
Fix minor typo in nodeIncrementalSort.c. Author: Vignesh C Reviewed-by: James Coleman Backpatch-through: 13, where it was introduced Discussion: https://postgr.es/m/caldanm0wjzqrvdel59zfyh0o4mlbkq23jm-bnjxcfzgpanx...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org

pgsql: Fix minor typo in nodeIncrementalSort.c.

2020-07-19 Thread Amit Kapila
Fix minor typo in nodeIncrementalSort.c. Author: Vignesh C Reviewed-by: James Coleman Backpatch-through: 13, where it was introduced Discussion: https://postgr.es/m/caldanm0wjzqrvdel59zfyh0o4mlbkq23jm-bnjxcfzgpanx...@mail.gmail.com Branch -- REL_13_STABLE Details --- https://git.postgre

pgsql: Avoid harmless Valgrind no-buffer-pin errors.

2020-07-19 Thread Peter Geoghegan
Avoid harmless Valgrind no-buffer-pin errors. Valgrind builds with assertions enabled sometimes perform a theoretically unsafe page access inside an assertion in heapam_tuple_lock(). This happened when the eval-plan-qual isolation test ran one of the permutations added by commit a2418f9e238. Avo

pgsql: Mark buffers as defined to Valgrind consistently.

2020-07-19 Thread Peter Geoghegan
Mark buffers as defined to Valgrind consistently. Make PinBuffer() mark buffers as defined to Valgrind unconditionally, including when the buffer header spinlock must be acquired. Failure to handle that case could lead to false positive reports from Valgrind. This theoretically creates a risk th

pgsql: Correctly mark pg_subscription.subslotname as nullable.

2020-07-19 Thread Tom Lane
Correctly mark pg_subscription.subslotname as nullable. Due to the layout of this catalog, subslotname has to be explicitly marked BKI_FORCE_NULL, else initdb will default to the assumption that it's non-nullable. Since, in fact, CREATE/ALTER SUBSCRIPTION will store null values there, the existin

pgsql: Correctly mark pg_subscription.subslotname as nullable.

2020-07-19 Thread Tom Lane
Correctly mark pg_subscription.subslotname as nullable. Due to the layout of this catalog, subslotname has to be explicitly marked BKI_FORCE_NULL, else initdb will default to the assumption that it's non-nullable. Since, in fact, CREATE/ALTER SUBSCRIPTION will store null values there, the existin

pgsql: Define OPENSSL_API_COMPAT

2020-07-19 Thread Peter Eisentraut
Define OPENSSL_API_COMPAT This avoids deprecation warnings from newer OpenSSL versions (3.0.0 in particular). Discussion: https://www.postgresql.org/message-id/flat/FEF81714-D479-4512-839B-C769D2605F8A%40yesql.se Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4d3