Re: pgsql: Force run of pg_upgrade in the build directory in its TAP test

2022-06-14 Thread Tom Lane
Michael Paquier writes: > Force run of pg_upgrade in the build directory in its TAP test This commit removed delete_old_cluster.sh etc. from .gitignore, but they are still generated in the current directory, so after running a test in a non-VPATH setup I see $ git status ... Untracked files: (

pgsql: Doc: clarify the default collation behavior of domains.

2022-06-14 Thread Tom Lane
Doc: clarify the default collation behavior of domains. The previous wording was "the underlying data type's default collation is used", which is wrong or at least misleading. The domain inherits the base type's collation behavior, which if "default" actually can mean that we use some non-default

pgsql: Doc: clarify the default collation behavior of domains.

2022-06-14 Thread Tom Lane
Doc: clarify the default collation behavior of domains. The previous wording was "the underlying data type's default collation is used", which is wrong or at least misleading. The domain inherits the base type's collation behavior, which if "default" actually can mean that we use some non-default

pgsql: Doc: clarify the default collation behavior of domains.

2022-06-14 Thread Tom Lane
Doc: clarify the default collation behavior of domains. The previous wording was "the underlying data type's default collation is used", which is wrong or at least misleading. The domain inherits the base type's collation behavior, which if "default" actually can mean that we use some non-default

pgsql: Doc: clarify the default collation behavior of domains.

2022-06-14 Thread Tom Lane
Doc: clarify the default collation behavior of domains. The previous wording was "the underlying data type's default collation is used", which is wrong or at least misleading. The domain inherits the base type's collation behavior, which if "default" actually can mean that we use some non-default

pgsql: Doc: clarify the default collation behavior of domains.

2022-06-14 Thread Tom Lane
Doc: clarify the default collation behavior of domains. The previous wording was "the underlying data type's default collation is used", which is wrong or at least misleading. The domain inherits the base type's collation behavior, which if "default" actually can mean that we use some non-default

pgsql: Doc: clarify the default collation behavior of domains.

2022-06-14 Thread Tom Lane
Doc: clarify the default collation behavior of domains. The previous wording was "the underlying data type's default collation is used", which is wrong or at least misleading. The domain inherits the base type's collation behavior, which if "default" actually can mean that we use some non-default

pgsql: Avoid ecpglib core dump with out-of-order operations.

2022-06-14 Thread Tom Lane
Avoid ecpglib core dump with out-of-order operations. If an application executed operations like EXEC SQL PREPARE without having first established a database connection, it could get a core dump instead of the expected clean failure. This occurred because we did "pthread_getspecific(actual_connec

pgsql: Avoid ecpglib core dump with out-of-order operations.

2022-06-14 Thread Tom Lane
Avoid ecpglib core dump with out-of-order operations. If an application executed operations like EXEC SQL PREPARE without having first established a database connection, it could get a core dump instead of the expected clean failure. This occurred because we did "pthread_getspecific(actual_connec

pgsql: Avoid ecpglib core dump with out-of-order operations.

2022-06-14 Thread Tom Lane
Avoid ecpglib core dump with out-of-order operations. If an application executed operations like EXEC SQL PREPARE without having first established a database connection, it could get a core dump instead of the expected clean failure. This occurred because we did "pthread_getspecific(actual_connec

pgsql: Avoid ecpglib core dump with out-of-order operations.

2022-06-14 Thread Tom Lane
Avoid ecpglib core dump with out-of-order operations. If an application executed operations like EXEC SQL PREPARE without having first established a database connection, it could get a core dump instead of the expected clean failure. This occurred because we did "pthread_getspecific(actual_connec

pgsql: Avoid ecpglib core dump with out-of-order operations.

2022-06-14 Thread Tom Lane
Avoid ecpglib core dump with out-of-order operations. If an application executed operations like EXEC SQL PREPARE without having first established a database connection, it could get a core dump instead of the expected clean failure. This occurred because we did "pthread_getspecific(actual_connec

pgsql: Avoid ecpglib core dump with out-of-order operations.

2022-06-14 Thread Tom Lane
Avoid ecpglib core dump with out-of-order operations. If an application executed operations like EXEC SQL PREPARE without having first established a database connection, it could get a core dump instead of the expected clean failure. This occurred because we did "pthread_getspecific(actual_connec

Re: pgsql: Force run of pg_upgrade in the build directory in its TAP test

2022-06-14 Thread Michael Paquier
On Tue, Jun 14, 2022 at 01:23:04PM -0400, Tom Lane wrote: > I suppose it would be too user-unfriendly to generate those scripts > underneath $PGDATA, so don't we need to put back the .gitignore > entries? delete_old_cluster.sh is generated within tmp_check/ in a non-VPATH build: $ cd src/bin/pg_up

Re: pgsql: Force run of pg_upgrade in the build directory in its TAP test

2022-06-14 Thread Tom Lane
Michael Paquier writes: > On Tue, Jun 14, 2022 at 01:23:04PM -0400, Tom Lane wrote: >> I suppose it would be too user-unfriendly to generate those scripts >> underneath $PGDATA, so don't we need to put back the .gitignore >> entries? > delete_old_cluster.sh is generated within tmp_check/ in a non

Re: pgsql: Force run of pg_upgrade in the build directory in its TAP test

2022-06-14 Thread Michael Paquier
On Tue, Jun 14, 2022 at 08:11:59PM -0400, Tom Lane wrote: > Sorry, I wasn't very clear: I'd tested pg_upgrade with a manual > invocation, like "./pg_upgrade -d ...". That used to be OK and > now it leaves junk around. I think it's worth keeping the > .gitignore entries (and I guess the "make clea

pgsql: Tweak behavior of psql --single-transaction depending on ON_ERRO

2022-06-14 Thread Michael Paquier
Tweak behavior of psql --single-transaction depending on ON_ERROR_STOP This commit, in completion of 157f873, forces a ROLLBACK for --single-transaction only when ON_ERROR_STOP is used when one of the steps defined by -f/-c fails. Hence, COMMIT is always used when ON_ERROR_STOP is not set, ignori

pgsql: Fix cache look-up failures while applying changes in logical rep

2022-06-14 Thread Amit Kapila
Fix cache look-up failures while applying changes in logical replication. While building a new attrmap which maps partition attribute numbers to remoterel's, we incorrectly update the map for dropped column attributes. Later, it caused cache look-up failure when we tried to use the map to fetch th

pgsql: Fix cache look-up failures while applying changes in logical rep

2022-06-14 Thread Amit Kapila
Fix cache look-up failures while applying changes in logical replication. While building a new attrmap which maps partition attribute numbers to remoterel's, we incorrectly update the map for dropped column attributes. Later, it caused cache look-up failure when we tried to use the map to fetch th

pgsql: Fix cache look-up failures while applying changes in logical rep

2022-06-14 Thread Amit Kapila
Fix cache look-up failures while applying changes in logical replication. While building a new attrmap which maps partition attribute numbers to remoterel's, we incorrectly update the map for dropped column attributes. Later, it caused cache look-up failure when we tried to use the map to fetch th

pgsql: Re-add locally-generated files in pg_upgrade's .gitignore and Ma

2022-06-14 Thread Michael Paquier
Re-add locally-generated files in pg_upgrade's .gitignore and Makefile This reverts the changes to pg_upgrade's Makefile and .gitignore done in 15b6d21. The TAP tests run in isolation, executing pg_upgrade in tmp_check/ in the build directory so as any files created in the execution path (reindex