pgsql: Restore robustness of TAP tests that wait for postmaster restart

2021-06-12 Thread Tom Lane
Restore robustness of TAP tests that wait for postmaster restart. Several TAP tests use poll_query_until() to wait for the postmaster to restart. They were checking to see if a trivial query (e.g. "SELECT 1") succeeds. However, that's problematic in the wake of commit 11e9caff8, because now that

pgsql: Restore robustness of TAP tests that wait for postmaster restart

2021-06-12 Thread Tom Lane
Restore robustness of TAP tests that wait for postmaster restart. Several TAP tests use poll_query_until() to wait for the postmaster to restart. They were checking to see if a trivial query (e.g. "SELECT 1") succeeds. However, that's problematic in the wake of commit 11e9caff8, because now that

pgsql: Restore robustness of TAP tests that wait for postmaster restart

2021-06-12 Thread Tom Lane
Restore robustness of TAP tests that wait for postmaster restart. Several TAP tests use poll_query_until() to wait for the postmaster to restart. They were checking to see if a trivial query (e.g. "SELECT 1") succeeds. However, that's problematic in the wake of commit 11e9caff8, because now that

pgsql: Restore robustness of TAP tests that wait for postmaster restart

2021-06-12 Thread Tom Lane
Restore robustness of TAP tests that wait for postmaster restart. Several TAP tests use poll_query_until() to wait for the postmaster to restart. They were checking to see if a trivial query (e.g. "SELECT 1") succeeds. However, that's problematic in the wake of commit 11e9caff8, because now that

pgsql: Restore robustness of TAP tests that wait for postmaster restart

2021-06-12 Thread Tom Lane
Restore robustness of TAP tests that wait for postmaster restart. Several TAP tests use poll_query_until() to wait for the postmaster to restart. They were checking to see if a trivial query (e.g. "SELECT 1") succeeds. However, that's problematic in the wake of commit 11e9caff8, because now that

pgsql: Ensure pg_filenode_relation(0, 0) returns NULL.

2021-06-12 Thread Tom Lane
Ensure pg_filenode_relation(0, 0) returns NULL. Previously, a zero value for the relfilenode resulted in a confusing error message about "unexpected duplicate". This function returns NULL for other invalid relfilenode values, so zero should be treated likewise. It's been like this all along, so b

pgsql: Ensure pg_filenode_relation(0, 0) returns NULL.

2021-06-12 Thread Tom Lane
Ensure pg_filenode_relation(0, 0) returns NULL. Previously, a zero value for the relfilenode resulted in a confusing error message about "unexpected duplicate". This function returns NULL for other invalid relfilenode values, so zero should be treated likewise. It's been like this all along, so b

pgsql: Ensure pg_filenode_relation(0, 0) returns NULL.

2021-06-12 Thread Tom Lane
Ensure pg_filenode_relation(0, 0) returns NULL. Previously, a zero value for the relfilenode resulted in a confusing error message about "unexpected duplicate". This function returns NULL for other invalid relfilenode values, so zero should be treated likewise. It's been like this all along, so b

pgsql: Ensure pg_filenode_relation(0, 0) returns NULL.

2021-06-12 Thread Tom Lane
Ensure pg_filenode_relation(0, 0) returns NULL. Previously, a zero value for the relfilenode resulted in a confusing error message about "unexpected duplicate". This function returns NULL for other invalid relfilenode values, so zero should be treated likewise. It's been like this all along, so b

pgsql: Ensure pg_filenode_relation(0, 0) returns NULL.

2021-06-12 Thread Tom Lane
Ensure pg_filenode_relation(0, 0) returns NULL. Previously, a zero value for the relfilenode resulted in a confusing error message about "unexpected duplicate". This function returns NULL for other invalid relfilenode values, so zero should be treated likewise. It's been like this all along, so b

pgsql: Ensure pg_filenode_relation(0, 0) returns NULL.

2021-06-12 Thread Tom Lane
Ensure pg_filenode_relation(0, 0) returns NULL. Previously, a zero value for the relfilenode resulted in a confusing error message about "unexpected duplicate". This function returns NULL for other invalid relfilenode values, so zero should be treated likewise. It's been like this all along, so b

pgsql: Don't use Asserts to check for violations of replication protoco

2021-06-12 Thread Tom Lane
Don't use Asserts to check for violations of replication protocol. Using an Assert to check the validity of incoming messages is an extremely poor decision. In a debug build, it should not be that easy for a broken or malicious remote client to crash the logrep worker. The consequences could be e

pgsql: Don't use Asserts to check for violations of replication protoco

2021-06-12 Thread Tom Lane
Don't use Asserts to check for violations of replication protocol. Using an Assert to check the validity of incoming messages is an extremely poor decision. In a debug build, it should not be that easy for a broken or malicious remote client to crash the logrep worker. The consequences could be e

pgsql: Don't use Asserts to check for violations of replication protoco

2021-06-12 Thread Tom Lane
Don't use Asserts to check for violations of replication protocol. Using an Assert to check the validity of incoming messages is an extremely poor decision. In a debug build, it should not be that easy for a broken or malicious remote client to crash the logrep worker. The consequences could be e

pgsql: Don't use Asserts to check for violations of replication protoco

2021-06-12 Thread Tom Lane
Don't use Asserts to check for violations of replication protocol. Using an Assert to check the validity of incoming messages is an extremely poor decision. In a debug build, it should not be that easy for a broken or malicious remote client to crash the logrep worker. The consequences could be e

pgsql: Don't use Asserts to check for violations of replication protoco

2021-06-12 Thread Tom Lane
Don't use Asserts to check for violations of replication protocol. Using an Assert to check the validity of incoming messages is an extremely poor decision. In a debug build, it should not be that easy for a broken or malicious remote client to crash the logrep worker. The consequences could be e

pgsql: Fix new recovery test for use under msys

2021-06-12 Thread Andrew Dunstan
Fix new recovery test for use under msys Commit caba8f0d43 wasn't quite right for msys, as demonstrated by several buildfarm animals, including jacana and fairywren. We need to use the msys perl in the archive command, but call it in such a way that Windows will understand the path. Furthermore, i

pgsql: Fix new recovery test for use under msys

2021-06-12 Thread Andrew Dunstan
Fix new recovery test for use under msys Commit caba8f0d43 wasn't quite right for msys, as demonstrated by several buildfarm animals, including jacana and fairywren. We need to use the msys perl in the archive command, but call it in such a way that Windows will understand the path. Furthermore, i

pgsql: Fix new recovery test for use under msys

2021-06-12 Thread Andrew Dunstan
Fix new recovery test for use under msys Commit caba8f0d43 wasn't quite right for msys, as demonstrated by several buildfarm animals, including jacana and fairywren. We need to use the msys perl in the archive command, but call it in such a way that Windows will understand the path. Furthermore, i

pgsql: Fix new recovery test for use under msys

2021-06-12 Thread Andrew Dunstan
Fix new recovery test for use under msys Commit caba8f0d43 wasn't quite right for msys, as demonstrated by several buildfarm animals, including jacana and fairywren. We need to use the msys perl in the archive command, but call it in such a way that Windows will understand the path. Furthermore, i

pgsql: Fix new recovery test for use under msys

2021-06-12 Thread Andrew Dunstan
Fix new recovery test for use under msys Commit caba8f0d43 wasn't quite right for msys, as demonstrated by several buildfarm animals, including jacana and fairywren. We need to use the msys perl in the archive command, but call it in such a way that Windows will understand the path. Furthermore, i

pgsql: Fix new recovery test for use under msys

2021-06-12 Thread Andrew Dunstan
Fix new recovery test for use under msys Commit caba8f0d43 wasn't quite right for msys, as demonstrated by several buildfarm animals, including jacana and fairywren. We need to use the msys perl in the archive command, but call it in such a way that Windows will understand the path. Furthermore, i

Re: pgsql: Make archiver process an auxiliary process.

2021-06-12 Thread Thomas Munro
On Mon, Mar 15, 2021 at 5:14 PM Fujii Masao wrote: > Make archiver process an auxiliary process. > > This commit changes WAL archiver process so that it's treated as > an auxiliary process and can use shared memory. This is an infrastructure > patch required for upcoming shared-memory based stats

pgsql: Simplify some code in getObjectTypeDescription()

2021-06-12 Thread Michael Paquier
Simplify some code in getObjectTypeDescription() This routine is designed to never return an empty description or NULL, providing description fallbacks even if missing objects are accepted, but it included a code path where this was considered possible. All the callers of this routine already con