pgsql: Skip foreign tablespaces when running pg_checksums/pg_verify_che

2020-02-26 Thread Michael Paquier
Skip foreign tablespaces when running pg_checksums/pg_verify_checksums Attempting to use pg_checksums (pg_verify_checksums in 11) on a data folder which includes tablespace paths used across multiple major versions would cause pg_checksums to scan all directories present in pg_tblspc, and not only

pgsql: Skip foreign tablespaces when running pg_checksums/pg_verify_che

2020-02-26 Thread Michael Paquier
Skip foreign tablespaces when running pg_checksums/pg_verify_checksums Attempting to use pg_checksums (pg_verify_checksums in 11) on a data folder which includes tablespace paths used across multiple major versions would cause pg_checksums to scan all directories present in pg_tblspc, and not only

pgsql: Skip foreign tablespaces when running pg_checksums/pg_verify_che

2020-02-26 Thread Michael Paquier
Skip foreign tablespaces when running pg_checksums/pg_verify_checksums Attempting to use pg_checksums (pg_verify_checksums in 11) on a data folder which includes tablespace paths used across multiple major versions would cause pg_checksums to scan all directories present in pg_tblspc, and not only

Re: pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

2020-02-26 Thread Michael Paquier
On Thu, Feb 27, 2020 at 09:43:14AM +0530, Robert Haas wrote: > Buildfarm member curculio just failed with this complaint: Thanks, I missed this report. > # Failed test 'createdb with incorrect --lc-ctype stderr > /(?^s:^createdb: error: database creation failed: ERROR: invalid > locale name)/'

Re: pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

2020-02-26 Thread Robert Haas
Buildfarm member curculio just failed with this complaint: # Failed test 'createdb with incorrect --lc-ctype stderr /(?^s:^createdb: error: database creation failed: ERROR: invalid locale name)/' # at t/020_createdb.pl line 43. # 'createdb: error: database creation failed: E

pgsql: Move src/backend/utils/hash/hashfn.c to src/common

2020-02-26 Thread Robert Haas
Move src/backend/utils/hash/hashfn.c to src/common This also involves renaming src/include/utils/hashutils.h, which becomes src/include/common/hashfn.h. Perhaps an argument can be made for keeping the hashutils.h name, but it seemed more consistent to make it match the name of the file, and also m

pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

2020-02-26 Thread Michael Paquier
createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate The original coding failed to properly quote those arguments, leading to failures when using quotes in the values used. As the quoting can be encoding-sensitive, the connection to the backend needs to be taken before applying the co

pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

2020-02-26 Thread Michael Paquier
createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate The original coding failed to properly quote those arguments, leading to failures when using quotes in the values used. As the quoting can be encoding-sensitive, the connection to the backend needs to be taken before applying the co

pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

2020-02-26 Thread Michael Paquier
createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate The original coding failed to properly quote those arguments, leading to failures when using quotes in the values used. As the quoting can be encoding-sensitive, the connection to the backend needs to be taken before applying the co

pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

2020-02-26 Thread Michael Paquier
createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate The original coding failed to properly quote those arguments, leading to failures when using quotes in the values used. As the quoting can be encoding-sensitive, the connection to the backend needs to be taken before applying the co

pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

2020-02-26 Thread Michael Paquier
createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate The original coding failed to properly quote those arguments, leading to failures when using quotes in the values used. As the quoting can be encoding-sensitive, the connection to the backend needs to be taken before applying the co

pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

2020-02-26 Thread Michael Paquier
createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate The original coding failed to properly quote those arguments, leading to failures when using quotes in the values used. As the quoting can be encoding-sensitive, the connection to the backend needs to be taken before applying the co

Re: pgsql: Silence compiler warning in nbtinsert.c.

2020-02-26 Thread Peter Geoghegan
On Wed, Feb 26, 2020 at 3:07 PM Alvaro Herrera wrote: > I'm seeing another one: > > /pgsql/source/master/src/backend/access/nbtree/nbtinsert.c: In function > '_bt_insertonpg': > /pgsql/source/master/src/backend/access/nbtree/nbtinsert.c:1231:4: warning: > 'oposting' may be used uninitialized in

pgsql: Silence another compiler warning in nbtinsert.c.

2020-02-26 Thread Peter Geoghegan
Silence another compiler warning in nbtinsert.c. Per complaint from Álvaro Herrera. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2c0797da2c26dd5574e0d9128887c1fc2a385c25 Modified Files -- src/backend/access/nbtree/nbtinsert.c | 2 +- 1 file changed, 1

pgsql: Suppress unnecessary RelabelType nodes in more cases.

2020-02-26 Thread Tom Lane
Suppress unnecessary RelabelType nodes in more cases. eval_const_expressions sometimes produced RelabelType nodes that were useless because they just relabeled an expression to the same exposed type it already had. This is worth avoiding because it can cause two equivalent expressions to not be e

pgsql: Suppress unnecessary RelabelType nodes in more cases.

2020-02-26 Thread Tom Lane
Suppress unnecessary RelabelType nodes in more cases. eval_const_expressions sometimes produced RelabelType nodes that were useless because they just relabeled an expression to the same exposed type it already had. This is worth avoiding because it can cause two equivalent expressions to not be e

Re: pgsql: Silence compiler warning in nbtinsert.c.

2020-02-26 Thread Alvaro Herrera
On 2020-Feb-26, Peter Geoghegan wrote: > Silence compiler warning in nbtinsert.c. > > Per buildfarm member longfin. I'm seeing another one: /pgsql/source/master/src/backend/access/nbtree/nbtinsert.c: In function '_bt_insertonpg': /pgsql/source/master/src/backend/access/nbtree/nbtinsert.c:1231:

pgsql: Fix docs regarding AFTER triggers on partitioned tables

2020-02-26 Thread Alvaro Herrera
Fix docs regarding AFTER triggers on partitioned tables In commit 86f575948c77 I forgot to update the trigger.sgml paragraph that needs to explain that AFTER triggers are allowed in partitioned tables. Do so now. Discussion: https://postgr.es/m/20200224185850.GA30899@alvherre.pgsql Branch -

pgsql: Fix docs regarding AFTER triggers on partitioned tables

2020-02-26 Thread Alvaro Herrera
Fix docs regarding AFTER triggers on partitioned tables In commit 86f575948c77 I forgot to update the trigger.sgml paragraph that needs to explain that AFTER triggers are allowed in partitioned tables. Do so now. Discussion: https://postgr.es/m/20200224185850.GA30899@alvherre.pgsql Branch -

pgsql: Fix docs regarding AFTER triggers on partitioned tables

2020-02-26 Thread Alvaro Herrera
Fix docs regarding AFTER triggers on partitioned tables In commit 86f575948c77 I forgot to update the trigger.sgml paragraph that needs to explain that AFTER triggers are allowed in partitioned tables. Do so now. Discussion: https://postgr.es/m/20200224185850.GA30899@alvherre.pgsql Branch -

pgsql: Silence compiler warning in nbtinsert.c.

2020-02-26 Thread Peter Geoghegan
Silence compiler warning in nbtinsert.c. Per buildfarm member longfin. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2d8a6fad18fcec1850b79ddcf3a0032058d86715 Modified Files -- src/backend/access/nbtree/nbtinsert.c | 2 +- 1 file changed, 1 insertion(+)

pgsql: Add deduplication to nbtree.

2020-02-26 Thread Peter Geoghegan
Add deduplication to nbtree. Deduplication reduces the storage overhead of duplicates in indexes that use the standard nbtree index access method. The deduplication process is applied lazily, after the point where opportunistic deletion of LP_DEAD-marked index tuples occurs. Deduplication is onl

pgsql: Add equalimage B-Tree support functions.

2020-02-26 Thread Peter Geoghegan
Add equalimage B-Tree support functions. Invent the concept of a B-Tree equalimage ("equality implies image equality") support function, registered as support function 4. This indicates whether it is safe (or not safe) to apply optimizations that assume that any two datums considered equal by an

pgsql: Include error code in message from pg_upgrade

2020-02-26 Thread Magnus Hagander
Include error code in message from pg_upgrade In passing, also quote the filename in one message where it wasn't. Author: Dagfinn Ilmari Mannsåker Discussion: https://postgr.es/m/87pne2w98h@wibble.ilmari.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4109b