pgsql: Fix yet another issue with step generation in partition pruning.

2020-08-06 Thread Etsuro Fujita
Fix yet another issue with step generation in partition pruning. Commit 13838740f fixed some issues with step generation in partition pruning, but there was yet another one: get_steps_using_prefix() assumes that clauses in the passed-in prefix list are sorted in ascending order of their partition

pgsql: Fix yet another issue with step generation in partition pruning.

2020-08-06 Thread Etsuro Fujita
Fix yet another issue with step generation in partition pruning. Commit 13838740f fixed some issues with step generation in partition pruning, but there was yet another one: get_steps_using_prefix() assumes that clauses in the passed-in prefix list are sorted in ascending order of their partition

pgsql: Fix yet another issue with step generation in partition pruning.

2020-08-06 Thread Etsuro Fujita
Fix yet another issue with step generation in partition pruning. Commit 13838740f fixed some issues with step generation in partition pruning, but there was yet another one: get_steps_using_prefix() assumes that clauses in the passed-in prefix list are sorted in ascending order of their partition

pgsql: Fix yet another issue with step generation in partition pruning.

2020-08-06 Thread Etsuro Fujita
Fix yet another issue with step generation in partition pruning. Commit 13838740f fixed some issues with step generation in partition pruning, but there was yet another one: get_steps_using_prefix() assumes that clauses in the passed-in prefix list are sorted in ascending order of their partition

pgsql: Remove obsolete amcheck comment.

2020-08-06 Thread Peter Geoghegan
Remove obsolete amcheck comment. Oversight in commit d114cc53871. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3a3be80641c01e675d0ed484f15df8ec536d0a06 Modified Files -- contrib/amcheck/verify_nbtree.c | 1 - 1 file changed, 1 deletion(-)

pgsql: amcheck: Sanitize metapage's allequalimage field.

2020-08-06 Thread Peter Geoghegan
amcheck: Sanitize metapage's allequalimage field. This will be helpful if it ever proves necessary to revoke an opclass's support for deduplication. Backpatch: 13-, where nbtree deduplication was introduced. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c254d8d7b

pgsql: amcheck: Sanitize metapage's allequalimage field.

2020-08-06 Thread Peter Geoghegan
amcheck: Sanitize metapage's allequalimage field. This will be helpful if it ever proves necessary to revoke an opclass's support for deduplication. Backpatch: 13-, where nbtree deduplication was introduced. Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/be

pgsql: Fix bogus EXPLAIN output for Hash Aggregate

2020-08-06 Thread David Rowley
Fix bogus EXPLAIN output for Hash Aggregate 9bdb300de modified the EXPLAIN output for Hash Aggregate to show details from parallel workers. However, it neglected to consider that a given parallel worker may not have assisted with the given Hash Aggregate. This can occur when workers fail to start

pgsql: Fix bogus EXPLAIN output for Hash Aggregate

2020-08-06 Thread David Rowley
Fix bogus EXPLAIN output for Hash Aggregate 9bdb300de modified the EXPLAIN output for Hash Aggregate to show details from parallel workers. However, it neglected to consider that a given parallel worker may not have assisted with the given Hash Aggregate. This can occur when workers fail to start

pgsql: First-draft release notes for 12.4.

2020-08-06 Thread Tom Lane
First-draft release notes for 12.4. As usual, the release notes for other branches will be made by cutting these down, but put them up for community review first. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/a2e0cf45c21afbcbc544d1aca8d51d90004aa5d9 Modifi

pgsql: Fix typo.

2020-08-06 Thread Robert Haas
Fix typo. Per report from Tom Lane. Previously fixed in master by commit f057980149ddccd4b862d2c6b3920ed498b0d7ec. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/495a9b1fbfe890d5da2aaf52ee06a8fd4f4fe339 Modified Files -- src/backend/access/trans

pgsql: Fix typo.

2020-08-06 Thread Robert Haas
Fix typo. Per report from Tom Lane. Previously fixed in master by commit f057980149ddccd4b862d2c6b3920ed498b0d7ec. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/7c78040f6c46e3db8cfa45fc31add9bc511cc2b2 Modified Files -- src/backend/access/trans

Re: pgsql: Fix minor problems with non-exclusive backup cleanup.

2020-08-06 Thread Tom Lane
Robert Haas writes: > On Thu, Aug 6, 2020 at 2:19 PM Tom Lane wrote: >> Also, while I'm bugging you: it wasn't quite clear from the thread >> whether this is alone sufficient to fix the user-visible issue >> reported by Bharath Rupireddy, or whether we still need to change >> the JIT logic as wel

Re: pgsql: Fix minor problems with non-exclusive backup cleanup.

2020-08-06 Thread Robert Haas
On Thu, Aug 6, 2020 at 2:19 PM Tom Lane wrote: > Robert Haas writes: > > Fix minor problems with non-exclusive backup cleanup. > > Seems like there's an extra space in this error message in > do_pg_abort_backup: > > + if (emit_warning) > + ereport(WARNING, > + (errmsg("abort

pgsql: Register llvm_shutdown using on_proc_exit, not before_shmem_exit

2020-08-06 Thread Robert Haas
Register llvm_shutdown using on_proc_exit, not before_shmem_exit. This seems more correct, because other before_shmem_exit calls may expect the infrastructure that is needed to run queries and access the database to be working, and also because this cleanup has nothing to do with shared memory. T

Re: pgsql: Fix minor problems with non-exclusive backup cleanup.

2020-08-06 Thread Tom Lane
Robert Haas writes: > Fix minor problems with non-exclusive backup cleanup. Seems like there's an extra space in this error message in do_pg_abort_backup: + if (emit_warning) + ereport(WARNING, + (errmsg("aborting backup due to backend exiting before pg_stop_back up was ca

pgsql: Fix minor problems with non-exclusive backup cleanup.

2020-08-06 Thread Robert Haas
Fix minor problems with non-exclusive backup cleanup. The previous coding imagined that it could call before_shmem_exit() when a non-exclusive backup began and then remove the previously-added handler by calling cancel_before_shmem_exit() when that backup ended. However, this only works provided t

pgsql: Fix minor problems with non-exclusive backup cleanup.

2020-08-06 Thread Robert Haas
Fix minor problems with non-exclusive backup cleanup. The previous coding imagined that it could call before_shmem_exit() when a non-exclusive backup began and then remove the previously-added handler by calling cancel_before_shmem_exit() when that backup ended. However, this only works provided t