pgsql: Fix oversight in commit b5415e3c2187ab304390524f5ae66b4bd2c58279

2018-12-31 Thread Tom Lane
Fix oversight in commit b5415e3c2187ab304390524f5ae66b4bd2c58279. While rearranging code in tidpath.c, I overlooked the fact that we ought to check restriction_is_securely_promotable when trying to use a join clause as a TID qual. Since tideq itself is leakproof, this wouldn't really allow any in

pgsql: Remove some useless code

2018-12-31 Thread Alvaro Herrera
Remove some useless code In commit 8b08f7d4820f I added member relationId to IndexStmt struct. I'm now not sure why; DefineIndex doesn't need it, since the relation OID is passed as a separate argument anyway. Remove it. Also remove a redundant assignment to the relationId argument (it wasn't re

pgsql: Update leakproofness markings on some btree comparison functions

2018-12-31 Thread Tom Lane
Update leakproofness markings on some btree comparison functions. Mark pg_lsn and oidvector comparison functions as leakproof. Per discussion, these clearly are leakproof so we might as well mark them so. On the other hand, remove leakproof markings from name comparison functions other than equa

pgsql: pg_regress: Promptly detect failed postmaster startup.

2018-12-31 Thread Noah Misch
pg_regress: Promptly detect failed postmaster startup. Detect it the way pg_ctl's wait_for_postmaster() does. When pg_regress spawned a postmaster that failed startup, we were detecting that only with "pg_regress: postmaster did not respond within 60 seconds". Back-patch to 9.4 (all supported ver

pgsql: pg_regress: Promptly detect failed postmaster startup.

2018-12-31 Thread Noah Misch
pg_regress: Promptly detect failed postmaster startup. Detect it the way pg_ctl's wait_for_postmaster() does. When pg_regress spawned a postmaster that failed startup, we were detecting that only with "pg_regress: postmaster did not respond within 60 seconds". Back-patch to 9.4 (all supported ver

pgsql: pg_regress: Promptly detect failed postmaster startup.

2018-12-31 Thread Noah Misch
pg_regress: Promptly detect failed postmaster startup. Detect it the way pg_ctl's wait_for_postmaster() does. When pg_regress spawned a postmaster that failed startup, we were detecting that only with "pg_regress: postmaster did not respond within 60 seconds". Back-patch to 9.4 (all supported ver

pgsql: Process EXTRA_INSTALL serially, during the first temp-install.

2018-12-31 Thread Noah Misch
Process EXTRA_INSTALL serially, during the first temp-install. This closes a race condition in "make -j check-world"; the symptom was EEXIST errors. Back-patch to v10, before which parallel check-world had worse problems. Discussion: https://postgr.es/m/[email protected]

pgsql: pg_regress: Promptly detect failed postmaster startup.

2018-12-31 Thread Noah Misch
pg_regress: Promptly detect failed postmaster startup. Detect it the way pg_ctl's wait_for_postmaster() does. When pg_regress spawned a postmaster that failed startup, we were detecting that only with "pg_regress: postmaster did not respond within 60 seconds". Back-patch to 9.4 (all supported ver

pgsql: Process EXTRA_INSTALL serially, during the first temp-install.

2018-12-31 Thread Noah Misch
Process EXTRA_INSTALL serially, during the first temp-install. This closes a race condition in "make -j check-world"; the symptom was EEXIST errors. Back-patch to v10, before which parallel check-world had worse problems. Discussion: https://postgr.es/m/[email protected]

pgsql: Send EXTRA_INSTALL errors to install.log, not stderr.

2018-12-31 Thread Noah Misch
Send EXTRA_INSTALL errors to install.log, not stderr. We already redirected other temp-install stderr and all temp-install stdout in this way. Back-patch to v10, like the next commit. Discussion: https://postgr.es/m/[email protected] Branch -- master Details ---

pgsql: Process EXTRA_INSTALL serially, during the first temp-install.

2018-12-31 Thread Noah Misch
Process EXTRA_INSTALL serially, during the first temp-install. This closes a race condition in "make -j check-world"; the symptom was EEXIST errors. Back-patch to v10, before which parallel check-world had worse problems. Discussion: https://postgr.es/m/[email protected]

pgsql: pg_regress: Promptly detect failed postmaster startup.

2018-12-31 Thread Noah Misch
pg_regress: Promptly detect failed postmaster startup. Detect it the way pg_ctl's wait_for_postmaster() does. When pg_regress spawned a postmaster that failed startup, we were detecting that only with "pg_regress: postmaster did not respond within 60 seconds". Back-patch to 9.4 (all supported ver

pgsql: pg_regress: Promptly detect failed postmaster startup.

2018-12-31 Thread Noah Misch
pg_regress: Promptly detect failed postmaster startup. Detect it the way pg_ctl's wait_for_postmaster() does. When pg_regress spawned a postmaster that failed startup, we were detecting that only with "pg_regress: postmaster did not respond within 60 seconds". Back-patch to 9.4 (all supported ver

pgsql: Send EXTRA_INSTALL errors to install.log, not stderr.

2018-12-31 Thread Noah Misch
Send EXTRA_INSTALL errors to install.log, not stderr. We already redirected other temp-install stderr and all temp-install stdout in this way. Back-patch to v10, like the next commit. Discussion: https://postgr.es/m/[email protected] Branch -- REL_10_STABLE Details

pgsql: Send EXTRA_INSTALL errors to install.log, not stderr.

2018-12-31 Thread Noah Misch
Send EXTRA_INSTALL errors to install.log, not stderr. We already redirected other temp-install stderr and all temp-install stdout in this way. Back-patch to v10, like the next commit. Discussion: https://postgr.es/m/[email protected] Branch -- REL_11_STABLE Details

pgsql: Improve comments and logs in do_pg_stop/start_backup

2018-12-31 Thread Michael Paquier
Improve comments and logs in do_pg_stop/start_backup The function name pg_stop_backup() has been included for ages in some log messages when stopping the backup, which is confusing for base backups taken with the replication protocol because this function is never called. Some other comments and

pgsql: Fix generation of padding message before encrypting Elgamal in p

2018-12-31 Thread Michael Paquier
Fix generation of padding message before encrypting Elgamal in pgcrypto fe0a0b5, which has added a stronger random source in Postgres, has introduced a thinko when creating a padding message which gets encrypted for Elgamal. The padding message cannot have zeros, which are replaced by random byte

pgsql: Fix generation of padding message before encrypting Elgamal in p

2018-12-31 Thread Michael Paquier
Fix generation of padding message before encrypting Elgamal in pgcrypto fe0a0b5, which has added a stronger random source in Postgres, has introduced a thinko when creating a padding message which gets encrypted for Elgamal. The padding message cannot have zeros, which are replaced by random byte

pgsql: Fix generation of padding message before encrypting Elgamal in p

2018-12-31 Thread Michael Paquier
Fix generation of padding message before encrypting Elgamal in pgcrypto fe0a0b5, which has added a stronger random source in Postgres, has introduced a thinko when creating a padding message which gets encrypted for Elgamal. The padding message cannot have zeros, which are replaced by random byte