pgsql: Hash support for row types

2020-11-19 Thread Peter Eisentraut
Hash support for row types Add hash functions for the record type as well as a hash operator family and operator class for the record type. This enables all the hash functionality for the record type such as hash-based plans for UNION/INTERSECT/EXCEPT DISTINCT, recursive queries using UNION DISTI

pgsql: Rename object in test to avoid conflict

2020-11-19 Thread Peter Eisentraut
Rename object in test to avoid conflict In 01e658fa74cb7e3292448f6663b549135958003b, the hash_func test creates a type t1, but apparently a test running in parallel might also use that name, depending on timing. Rename the type to avoid the issue. Branch -- master Details --- https://gi

pgsql: Further fixes for CREATE TABLE LIKE: cope with self-referential

2020-11-19 Thread Tom Lane
Further fixes for CREATE TABLE LIKE: cope with self-referential FKs. Commit 502898192 was too careless about the order of execution of the additional ALTER TABLE operations generated by expandTableLikeClause. It just stuck them all at the end, which seems okay for most purposes. But it falls down

pgsql: Further fixes for CREATE TABLE LIKE: cope with self-referential

2020-11-19 Thread Tom Lane
Further fixes for CREATE TABLE LIKE: cope with self-referential FKs. Commit 502898192 was too careless about the order of execution of the additional ALTER TABLE operations generated by expandTableLikeClause. It just stuck them all at the end, which seems okay for most purposes. But it falls down

pgsql: Further fixes for CREATE TABLE LIKE: cope with self-referential

2020-11-19 Thread Tom Lane
Further fixes for CREATE TABLE LIKE: cope with self-referential FKs. Commit 502898192 was too careless about the order of execution of the additional ALTER TABLE operations generated by expandTableLikeClause. It just stuck them all at the end, which seems okay for most purposes. But it falls down

pgsql: Further fixes for CREATE TABLE LIKE: cope with self-referential

2020-11-19 Thread Tom Lane
Further fixes for CREATE TABLE LIKE: cope with self-referential FKs. Commit 502898192 was too careless about the order of execution of the additional ALTER TABLE operations generated by expandTableLikeClause. It just stuck them all at the end, which seems okay for most purposes. But it falls down

pgsql: Further fixes for CREATE TABLE LIKE: cope with self-referential

2020-11-19 Thread Tom Lane
Further fixes for CREATE TABLE LIKE: cope with self-referential FKs. Commit 502898192 was too careless about the order of execution of the additional ALTER TABLE operations generated by expandTableLikeClause. It just stuck them all at the end, which seems okay for most purposes. But it falls down

pgsql: Further fixes for CREATE TABLE LIKE: cope with self-referential

2020-11-19 Thread Tom Lane
Further fixes for CREATE TABLE LIKE: cope with self-referential FKs. Commit 502898192 was too careless about the order of execution of the additional ALTER TABLE operations generated by expandTableLikeClause. It just stuck them all at the end, which seems okay for most purposes. But it falls down

pgsql: Further fixes for CREATE TABLE LIKE: cope with self-referential

2020-11-19 Thread Tom Lane
Further fixes for CREATE TABLE LIKE: cope with self-referential FKs. Commit 502898192 was too careless about the order of execution of the additional ALTER TABLE operations generated by expandTableLikeClause. It just stuck them all at the end, which seems okay for most purposes. But it falls down

pgsql: Adjust DSM and DSA slot usage constants (back-patch).

2020-11-19 Thread Thomas Munro
Adjust DSM and DSA slot usage constants (back-patch). 1. Previously, a DSA area would create up to four segments at each size before doubling the size. After this commit, it will create only two at each size, so it ramps up faster and therefore needs fewer slots. 2. Previously, the total limit

pgsql: Adjust DSM and DSA slot usage constants (back-patch).

2020-11-19 Thread Thomas Munro
Adjust DSM and DSA slot usage constants (back-patch). 1. Previously, a DSA area would create up to four segments at each size before doubling the size. After this commit, it will create only two at each size, so it ramps up faster and therefore needs fewer slots. 2. Previously, the total limit

pgsql: Adjust DSM and DSA slot usage constants (back-patch).

2020-11-19 Thread Thomas Munro
Adjust DSM and DSA slot usage constants (back-patch). 1. Previously, a DSA area would create up to four segments at each size before doubling the size. After this commit, it will create only two at each size, so it ramps up faster and therefore needs fewer slots. 2. Previously, the total limit

pgsql: Remove undocumented IS [NOT] OF syntax.

2020-11-19 Thread Tom Lane
Remove undocumented IS [NOT] OF syntax. This feature was added a long time ago, in 7c1e67bd5 and eb121ba2c, but never documented in any user-facing way. (Documentation added in 6126d3e70 was commented out almost immediately, in 8272fc3f7.) That's because, while this syntax is defined by SQL:99, o

pgsql: On macOS, use -isysroot in link steps as well as compile steps.

2020-11-19 Thread Tom Lane
On macOS, use -isysroot in link steps as well as compile steps. We previously put the -isysroot switch only into CPPFLAGS, theorizing that it was only needed to find the right copies of include files. However, it seems that we also need to use it while linking programs, to find the right stub ".tb

pgsql: On macOS, use -isysroot in link steps as well as compile steps.

2020-11-19 Thread Tom Lane
On macOS, use -isysroot in link steps as well as compile steps. We previously put the -isysroot switch only into CPPFLAGS, theorizing that it was only needed to find the right copies of include files. However, it seems that we also need to use it while linking programs, to find the right stub ".tb

pgsql: On macOS, use -isysroot in link steps as well as compile steps.

2020-11-19 Thread Tom Lane
On macOS, use -isysroot in link steps as well as compile steps. We previously put the -isysroot switch only into CPPFLAGS, theorizing that it was only needed to find the right copies of include files. However, it seems that we also need to use it while linking programs, to find the right stub ".tb

pgsql: On macOS, use -isysroot in link steps as well as compile steps.

2020-11-19 Thread Tom Lane
On macOS, use -isysroot in link steps as well as compile steps. We previously put the -isysroot switch only into CPPFLAGS, theorizing that it was only needed to find the right copies of include files. However, it seems that we also need to use it while linking programs, to find the right stub ".tb

pgsql: On macOS, use -isysroot in link steps as well as compile steps.

2020-11-19 Thread Tom Lane
On macOS, use -isysroot in link steps as well as compile steps. We previously put the -isysroot switch only into CPPFLAGS, theorizing that it was only needed to find the right copies of include files. However, it seems that we also need to use it while linking programs, to find the right stub ".tb

pgsql: On macOS, use -isysroot in link steps as well as compile steps.

2020-11-19 Thread Tom Lane
On macOS, use -isysroot in link steps as well as compile steps. We previously put the -isysroot switch only into CPPFLAGS, theorizing that it was only needed to find the right copies of include files. However, it seems that we also need to use it while linking programs, to find the right stub ".tb

pgsql: On macOS, use -isysroot in link steps as well as compile steps.

2020-11-19 Thread Tom Lane
On macOS, use -isysroot in link steps as well as compile steps. We previously put the -isysroot switch only into CPPFLAGS, theorizing that it was only needed to find the right copies of include files. However, it seems that we also need to use it while linking programs, to find the right stub ".tb

pgsql: Emit log when restore_command succeeds but archived file faills

2020-11-19 Thread Fujii Masao
Emit log when restore_command succeeds but archived file faills to be restored. Previously, when restore_command claimed to succeed but failed to restore the file with the right name, for example, due to mis-configuration of restore_command, no log message was reported. Then the recovery failed la