pgsql: doc: Remove more notes about compatibilities with past versions

2020-11-30 Thread Michael Paquier
doc: Remove more notes about compatibilities with past versions This is a follow-up of the work done in fa42c2e, that did not include all the fixes previously agreed on. The contents removed here can be confusing to the reader as they refer to rather old server versions. Author: Stephen Frost, T

pgsql: Use truncate(2) where appropriate.

2020-11-30 Thread Thomas Munro
Use truncate(2) where appropriate. When truncating files by name, use truncate(2). Windows hasn't got it, so keep our previous coding based on ftruncate(2) as a fallback. Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org Branch -- master Details --- https://git.po

pgsql: Free disk space for dropped relations on commit.

2020-11-30 Thread Thomas Munro
Free disk space for dropped relations on commit. When committing a transaction that dropped a relation, we previously truncated only the first segment file to free up disk space (the one that won't be unlinked until the next checkpoint). Truncate higher numbered segments too, even though we unlin

pgsql: Free disk space for dropped relations on commit.

2020-11-30 Thread Thomas Munro
Free disk space for dropped relations on commit. When committing a transaction that dropped a relation, we previously truncated only the first segment file to free up disk space (the one that won't be unlinked until the next checkpoint). Truncate higher numbered segments too, even though we unlin

pgsql: Free disk space for dropped relations on commit.

2020-11-30 Thread Thomas Munro
Free disk space for dropped relations on commit. When committing a transaction that dropped a relation, we previously truncated only the first segment file to free up disk space (the one that won't be unlinked until the next checkpoint). Truncate higher numbered segments too, even though we unlin

pgsql: Free disk space for dropped relations on commit.

2020-11-30 Thread Thomas Munro
Free disk space for dropped relations on commit. When committing a transaction that dropped a relation, we previously truncated only the first segment file to free up disk space (the one that won't be unlinked until the next checkpoint). Truncate higher numbered segments too, even though we unlin

pgsql: Free disk space for dropped relations on commit.

2020-11-30 Thread Thomas Munro
Free disk space for dropped relations on commit. When committing a transaction that dropped a relation, we previously truncated only the first segment file to free up disk space (the one that won't be unlinked until the next checkpoint). Truncate higher numbered segments too, even though we unlin

pgsql: Free disk space for dropped relations on commit.

2020-11-30 Thread Thomas Munro
Free disk space for dropped relations on commit. When committing a transaction that dropped a relation, we previously truncated only the first segment file to free up disk space (the one that won't be unlinked until the next checkpoint). Truncate higher numbered segments too, even though we unlin

pgsql: Free disk space for dropped relations on commit.

2020-11-30 Thread Thomas Munro
Free disk space for dropped relations on commit. When committing a transaction that dropped a relation, we previously truncated only the first segment file to free up disk space (the one that won't be unlinked until the next checkpoint). Truncate higher numbered segments too, even though we unlin

pgsql: Fix missing outfuncs.c support for IncrementalSortPath.

2020-11-30 Thread Tom Lane
Fix missing outfuncs.c support for IncrementalSortPath. For debugging purposes, Path nodes are supposed to have outfuncs support, but this was overlooked in the original incremental sort patch. While at it, clean up a couple other minor oversights, as well as bizarre choice of return type for cre

pgsql: Fix missing outfuncs.c support for IncrementalSortPath.

2020-11-30 Thread Tom Lane
Fix missing outfuncs.c support for IncrementalSortPath. For debugging purposes, Path nodes are supposed to have outfuncs support, but this was overlooked in the original incremental sort patch. While at it, clean up a couple other minor oversights, as well as bizarre choice of return type for cre

pgsql: Document concurrent indexes waiting on each other

2020-11-30 Thread Alvaro Herrera
Document concurrent indexes waiting on each other Because regular CREATE INDEX commands are independent, and there's no logical data dependency, it's not immediately obvious that transactions held by concurrent index builds on one table will block the second phase of concurrent index creation on a

pgsql: Document concurrent indexes waiting on each other

2020-11-30 Thread Alvaro Herrera
Document concurrent indexes waiting on each other Because regular CREATE INDEX commands are independent, and there's no logical data dependency, it's not immediately obvious that transactions held by concurrent index builds on one table will block the second phase of concurrent index creation on a

pgsql: Document concurrent indexes waiting on each other

2020-11-30 Thread Alvaro Herrera
Document concurrent indexes waiting on each other Because regular CREATE INDEX commands are independent, and there's no logical data dependency, it's not immediately obvious that transactions held by concurrent index builds on one table will block the second phase of concurrent index creation on a

pgsql: Document concurrent indexes waiting on each other

2020-11-30 Thread Alvaro Herrera
Document concurrent indexes waiting on each other Because regular CREATE INDEX commands are independent, and there's no logical data dependency, it's not immediately obvious that transactions held by concurrent index builds on one table will block the second phase of concurrent index creation on a

pgsql: Document concurrent indexes waiting on each other

2020-11-30 Thread Alvaro Herrera
Document concurrent indexes waiting on each other Because regular CREATE INDEX commands are independent, and there's no logical data dependency, it's not immediately obvious that transactions held by concurrent index builds on one table will block the second phase of concurrent index creation on a

pgsql: Document concurrent indexes waiting on each other

2020-11-30 Thread Alvaro Herrera
Document concurrent indexes waiting on each other Because regular CREATE INDEX commands are independent, and there's no logical data dependency, it's not immediately obvious that transactions held by concurrent index builds on one table will block the second phase of concurrent index creation on a

pgsql: Document concurrent indexes waiting on each other

2020-11-30 Thread Alvaro Herrera
Document concurrent indexes waiting on each other Because regular CREATE INDEX commands are independent, and there's no logical data dependency, it's not immediately obvious that transactions held by concurrent index builds on one table will block the second phase of concurrent index creation on a

pgsql: Remove configure-time probe for DocBook DTD.

2020-11-30 Thread Tom Lane
Remove configure-time probe for DocBook DTD. Checking for DocBook being installed was valuable when we were on the OpenSP docs toolchain, because that was rather hard to get installed fully. Nowadays, as long as you have xmllint and xsltproc installed, you're good, because those programs will fet

pgsql: Remove configure-time probe for DocBook DTD.

2020-11-30 Thread Tom Lane
Remove configure-time probe for DocBook DTD. Checking for DocBook being installed was valuable when we were on the OpenSP docs toolchain, because that was rather hard to get installed fully. Nowadays, as long as you have xmllint and xsltproc installed, you're good, because those programs will fet

pgsql: Remove configure-time probe for DocBook DTD.

2020-11-30 Thread Tom Lane
Remove configure-time probe for DocBook DTD. Checking for DocBook being installed was valuable when we were on the OpenSP docs toolchain, because that was rather hard to get installed fully. Nowadays, as long as you have xmllint and xsltproc installed, you're good, because those programs will fet

pgsql: Remove configure-time probe for DocBook DTD.

2020-11-30 Thread Tom Lane
Remove configure-time probe for DocBook DTD. Checking for DocBook being installed was valuable when we were on the OpenSP docs toolchain, because that was rather hard to get installed fully. Nowadays, as long as you have xmllint and xsltproc installed, you're good, because those programs will fet

pgsql: Prevent parallel index build in a standalone backend.

2020-11-30 Thread Tom Lane
Prevent parallel index build in a standalone backend. This can't work if there's no postmaster, and indeed the code got an assertion failure trying. There should be a check on IsUnderPostmaster gating the use of parallelism, as the planner has for ordinary parallel queries. Commit 40d964ec9 got

pgsql: Prevent parallel index build in a standalone backend.

2020-11-30 Thread Tom Lane
Prevent parallel index build in a standalone backend. This can't work if there's no postmaster, and indeed the code got an assertion failure trying. There should be a check on IsUnderPostmaster gating the use of parallelism, as the planner has for ordinary parallel queries. Commit 40d964ec9 got

pgsql: Prevent parallel index build in a standalone backend.

2020-11-30 Thread Tom Lane
Prevent parallel index build in a standalone backend. This can't work if there's no postmaster, and indeed the code got an assertion failure trying. There should be a check on IsUnderPostmaster gating the use of parallelism, as the planner has for ordinary parallel queries. Commit 40d964ec9 got

pgsql: Prevent parallel index build in a standalone backend.

2020-11-30 Thread Tom Lane
Prevent parallel index build in a standalone backend. This can't work if there's no postmaster, and indeed the code got an assertion failure trying. There should be a check on IsUnderPostmaster gating the use of parallelism, as the planner has for ordinary parallel queries. Commit 40d964ec9 got

pgsql: Fix miscomputation of direct_lateral_relids for join relations.

2020-11-30 Thread Tom Lane
Fix miscomputation of direct_lateral_relids for join relations. If a PlaceHolderVar is to be evaluated at a join relation, but its value is only needed there and not at higher levels, we neglected to update the joinrel's direct_lateral_relids to include the PHV's source rel. This causes problems

pgsql: Fix miscomputation of direct_lateral_relids for join relations.

2020-11-30 Thread Tom Lane
Fix miscomputation of direct_lateral_relids for join relations. If a PlaceHolderVar is to be evaluated at a join relation, but its value is only needed there and not at higher levels, we neglected to update the joinrel's direct_lateral_relids to include the PHV's source rel. This causes problems

pgsql: Fix miscomputation of direct_lateral_relids for join relations.

2020-11-30 Thread Tom Lane
Fix miscomputation of direct_lateral_relids for join relations. If a PlaceHolderVar is to be evaluated at a join relation, but its value is only needed there and not at higher levels, we neglected to update the joinrel's direct_lateral_relids to include the PHV's source rel. This causes problems

pgsql: Fix miscomputation of direct_lateral_relids for join relations.

2020-11-30 Thread Tom Lane
Fix miscomputation of direct_lateral_relids for join relations. If a PlaceHolderVar is to be evaluated at a join relation, but its value is only needed there and not at higher levels, we neglected to update the joinrel's direct_lateral_relids to include the PHV's source rel. This causes problems

pgsql: Fix miscomputation of direct_lateral_relids for join relations.

2020-11-30 Thread Tom Lane
Fix miscomputation of direct_lateral_relids for join relations. If a PlaceHolderVar is to be evaluated at a join relation, but its value is only needed there and not at higher levels, we neglected to update the joinrel's direct_lateral_relids to include the PHV's source rel. This causes problems

pgsql: Fix miscomputation of direct_lateral_relids for join relations.

2020-11-30 Thread Tom Lane
Fix miscomputation of direct_lateral_relids for join relations. If a PlaceHolderVar is to be evaluated at a join relation, but its value is only needed there and not at higher levels, we neglected to update the joinrel's direct_lateral_relids to include the PHV's source rel. This causes problems

pgsql: Fix miscomputation of direct_lateral_relids for join relations.

2020-11-30 Thread Tom Lane
Fix miscomputation of direct_lateral_relids for join relations. If a PlaceHolderVar is to be evaluated at a join relation, but its value is only needed there and not at higher levels, we neglected to update the joinrel's direct_lateral_relids to include the PHV's source rel. This causes problems

pgsql: Refactor parsing rules for option lists of EXPLAIN, VACUUM and A

2020-11-30 Thread Michael Paquier
Refactor parsing rules for option lists of EXPLAIN, VACUUM and ANALYZE Those three commands have been using the same grammar rules to handle a a list of parenthesized options. This refactors the code so as they use the same parsing rules, shaving some code. A future commit will make use of those

pgsql: Remove leftover comments, left behind by removal of WITH OIDS.

2020-11-30 Thread Heikki Linnakangas
Remove leftover comments, left behind by removal of WITH OIDS. Author: Amit Langote Discussion: https://www.postgresql.org/message-id/CA%2BHiwqGaRoF3XrhPW-Y7P%2BG7bKo84Z_h%3DkQHvMh-80%3Dav3wmOw%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2bc588

pgsql: Remove leftover comments, left behind by removal of WITH OIDS.

2020-11-30 Thread Heikki Linnakangas
Remove leftover comments, left behind by removal of WITH OIDS. Author: Amit Langote Discussion: https://www.postgresql.org/message-id/CA%2BHiwqGaRoF3XrhPW-Y7P%2BG7bKo84Z_h%3DkQHvMh-80%3Dav3wmOw%40mail.gmail.com Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Remove leftover comments, left behind by removal of WITH OIDS.

2020-11-30 Thread Heikki Linnakangas
Remove leftover comments, left behind by removal of WITH OIDS. Author: Amit Langote Discussion: https://www.postgresql.org/message-id/CA%2BHiwqGaRoF3XrhPW-Y7P%2BG7bKo84Z_h%3DkQHvMh-80%3Dav3wmOw%40mail.gmail.com Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff