pgsql: Refactor function parse_subscription_options.

2021-07-05 Thread Amit Kapila
Refactor function parse_subscription_options. Instead of using multiple parameters in parse_subscription_options function signature, use the struct SubOpts that encapsulate all the subscription options and their values. It will be useful for future work where we need to add other options in the

pgsql: Fix typo in comment

2021-07-05 Thread David Rowley
Fix typo in comment Author: James Coleman Discussion: https://postgr.es/m/caaaqye8f8ena0i1pdbtunwdd2sxhsmgscnybjhaxmuadfbr...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9ee91cc583802c6507fbc31c348a79e63a10f956 Modified Files --

pgsql: Reduce the number of pallocs when building partition bounds

2021-07-05 Thread David Rowley
Reduce the number of pallocs when building partition bounds In each of the create_*_bound() functions for LIST, RANGE and HASH partitioning, there were a large number of palloc calls which could be reduced down to a much smaller number. In each of these functions, an array was built so that we

pgsql: Use WaitLatch() instead of pg_usleep() at the end of backups

2021-07-05 Thread Michael Paquier
Use WaitLatch() instead of pg_usleep() at the end of backups This concerns pg_stop_backup() and BASE_BACKUP, when waiting for the WAL segments required for a backup to be archived. This simplifies a bit the handling of the wait event used in this code path. Author: Bharath Rupireddy

pgsql: Reduce overhead of cache-clobber testing in LookupOpclassInfo().

2021-07-05 Thread Tom Lane
Reduce overhead of cache-clobber testing in LookupOpclassInfo(). Commit 03ffc4d6d added logic to bypass all caching behavior in LookupOpclassInfo when CLOBBER_CACHE_ALWAYS is enabled. It doesn't look like I stopped to think much about what that would cost, but recent investigation shows that the

pgsql: Reduce overhead of cache-clobber testing in LookupOpclassInfo().

2021-07-05 Thread Tom Lane
Reduce overhead of cache-clobber testing in LookupOpclassInfo(). Commit 03ffc4d6d added logic to bypass all caching behavior in LookupOpclassInfo when CLOBBER_CACHE_ALWAYS is enabled. It doesn't look like I stopped to think much about what that would cost, but recent investigation shows that the

pgsql: Reduce overhead of cache-clobber testing in LookupOpclassInfo().

2021-07-05 Thread Tom Lane
Reduce overhead of cache-clobber testing in LookupOpclassInfo(). Commit 03ffc4d6d added logic to bypass all caching behavior in LookupOpclassInfo when CLOBBER_CACHE_ALWAYS is enabled. It doesn't look like I stopped to think much about what that would cost, but recent investigation shows that the

pgsql: Reduce overhead of cache-clobber testing in LookupOpclassInfo().

2021-07-05 Thread Tom Lane
Reduce overhead of cache-clobber testing in LookupOpclassInfo(). Commit 03ffc4d6d added logic to bypass all caching behavior in LookupOpclassInfo when CLOBBER_CACHE_ALWAYS is enabled. It doesn't look like I stopped to think much about what that would cost, but recent investigation shows that the

pgsql: Reduce overhead of cache-clobber testing in LookupOpclassInfo().

2021-07-05 Thread Tom Lane
Reduce overhead of cache-clobber testing in LookupOpclassInfo(). Commit 03ffc4d6d added logic to bypass all caching behavior in LookupOpclassInfo when CLOBBER_CACHE_ALWAYS is enabled. It doesn't look like I stopped to think much about what that would cost, but recent investigation shows that the

pgsql: Reduce overhead of cache-clobber testing in LookupOpclassInfo().

2021-07-05 Thread Tom Lane
Reduce overhead of cache-clobber testing in LookupOpclassInfo(). Commit 03ffc4d6d added logic to bypass all caching behavior in LookupOpclassInfo when CLOBBER_CACHE_ALWAYS is enabled. It doesn't look like I stopped to think much about what that would cost, but recent investigation shows that the

pgsql: Reduce overhead of cache-clobber testing in LookupOpclassInfo().

2021-07-05 Thread Tom Lane
Reduce overhead of cache-clobber testing in LookupOpclassInfo(). Commit 03ffc4d6d added logic to bypass all caching behavior in LookupOpclassInfo when CLOBBER_CACHE_ALWAYS is enabled. It doesn't look like I stopped to think much about what that would cost, but recent investigation shows that the

pgsql: Rethink blocking annotations in detach-partition-concurrently-[3

2021-07-05 Thread Tom Lane
Rethink blocking annotations in detach-partition-concurrently-[34]. In 741d7f104, I tried to make the reports from canceled steps come out after the pg_cancel_backend() steps, since that was the most common ordering before. However, that doesn't ensure that a canceled step doesn't report even

pgsql: Rethink blocking annotations in detach-partition-concurrently-[3

2021-07-05 Thread Tom Lane
Rethink blocking annotations in detach-partition-concurrently-[34]. In 741d7f104, I tried to make the reports from canceled steps come out after the pg_cancel_backend() steps, since that was the most common ordering before. However, that doesn't ensure that a canceled step doesn't report even

pgsql: Prevent numeric overflows in parallel numeric aggregates.

2021-07-05 Thread Dean Rasheed
Prevent numeric overflows in parallel numeric aggregates. Formerly various numeric aggregate functions supported parallel aggregation by having each worker convert partial aggregate values to Numeric and use numeric_send() as part of serializing their state. That's problematic, since the range of

pgsql: doc: Fix quoting markup

2021-07-05 Thread Peter Eisentraut
doc: Fix quoting markup Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/903d9aa7801e3198ca24e90be805362ad11b6ec3 Modified Files -- doc/src/sgml/appendix-obsolete-default-roles.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

pgsql: doc: Fix quoting markup

2021-07-05 Thread Peter Eisentraut
doc: Fix quoting markup Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/1479c5afdce2c57928dc1322bd71106858a0770f Modified Files -- doc/src/sgml/appendix-obsolete-default-roles.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)