pgsql: Fix incorrect format placeholder

2021-11-02 Thread Peter Eisentraut
Fix incorrect format placeholder Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ef6f047d2c87b91318364341c058dd6b715951b2 Modified Files -- src/bin/initdb/initdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix parallel amvacuumcleanup safety bug.

2021-11-02 Thread Peter Geoghegan
Fix parallel amvacuumcleanup safety bug. Commit b4af70cb inverted the return value of the function parallel_processing_is_safe(), but missed the amvacuumcleanup test. Index AMs that don't support parallel cleanup at all were affected. The practical consequences of this bug were not very serious.

pgsql: Fix parallel amvacuumcleanup safety bug.

2021-11-02 Thread Peter Geoghegan
Fix parallel amvacuumcleanup safety bug. Commit b4af70cb inverted the return value of the function parallel_processing_is_safe(), but missed the amvacuumcleanup test. Index AMs that don't support parallel cleanup at all were affected. The practical consequences of this bug were not very serious.

pgsql: Blind attempt to silence SSL compile failures on hamerkop.

2021-11-02 Thread Tom Lane
Blind attempt to silence SSL compile failures on hamerkop. Buildfarm member hamerkop has been failing for the last few days with errors that look like OpenSSL's X509-related symbols have not been imported into be-secure-openssl.c. It's unclear why this should be, but let's try adding an explicit

pgsql: Don't overlook indexes during parallel VACUUM.

2021-11-02 Thread Peter Geoghegan
Don't overlook indexes during parallel VACUUM. Commit b4af70cb, which simplified state managed by VACUUM, performed refactoring of parallel VACUUM in passing. Confusion about the exact details of the tasks that the leader process is responsible for led to code that made it possible for parallel V

pgsql: Don't overlook indexes during parallel VACUUM.

2021-11-02 Thread Peter Geoghegan
Don't overlook indexes during parallel VACUUM. Commit b4af70cb, which simplified state managed by VACUUM, performed refactoring of parallel VACUUM in passing. Confusion about the exact details of the tasks that the leader process is responsible for led to code that made it possible for parallel V

pgsql: Ensure consistent logical replication of datetime and float8 val

2021-11-02 Thread Tom Lane
Ensure consistent logical replication of datetime and float8 values. In walreceiver, set the publisher's relevant GUCs (datestyle, intervalstyle, extra_float_digits) to the same values that pg_dump uses, and for the same reason: we need the output to be read the same way regardless of the receiver

pgsql: Fix variable lifespan in ExecInitCoerceToDomain().

2021-11-02 Thread Tom Lane
Fix variable lifespan in ExecInitCoerceToDomain(). This undoes a mistake in 1ec7679f1: domainval and domainnull were meant to live across loop iterations, but they were incorrectly moved inside the loop. The effect was only to emit useless extra EEOP_MAKE_READONLY steps, so it's not a big deal; n

pgsql: Fix variable lifespan in ExecInitCoerceToDomain().

2021-11-02 Thread Tom Lane
Fix variable lifespan in ExecInitCoerceToDomain(). This undoes a mistake in 1ec7679f1: domainval and domainnull were meant to live across loop iterations, but they were incorrectly moved inside the loop. The effect was only to emit useless extra EEOP_MAKE_READONLY steps, so it's not a big deal; n

pgsql: Fix variable lifespan in ExecInitCoerceToDomain().

2021-11-02 Thread Tom Lane
Fix variable lifespan in ExecInitCoerceToDomain(). This undoes a mistake in 1ec7679f1: domainval and domainnull were meant to live across loop iterations, but they were incorrectly moved inside the loop. The effect was only to emit useless extra EEOP_MAKE_READONLY steps, so it's not a big deal; n

pgsql: Doc: clean up some places that mentioned template1 but not templ

2021-11-02 Thread Tom Lane
Doc: clean up some places that mentioned template1 but not template0. Improve old text that wasn't updated when we added template0 to the standard database set. Per suggestion from P. Luzanov. Discussion: https://postgr.es/m/163583775122.675.3700595100340939...@wrigleys.postgresql.org Branch -

pgsql: Doc: be more precise about conflicts between relation names.

2021-11-02 Thread Tom Lane
Doc: be more precise about conflicts between relation names. Use verbiage like "The name of the table must be distinct from the name of any other relation (table, sequence, index, view, materialized view, or foreign table) in the same schema." in the reference pages for all those object types. Th

pgsql: Avoid O(N^2) behavior in SyncPostCheckpoint().

2021-11-02 Thread Tom Lane
Avoid O(N^2) behavior in SyncPostCheckpoint(). As in commits 6301c3ada and e9d9ba2a4, avoid doing repetitive list_delete_first() operations, since that would be expensive when there are many files waiting to be unlinked. This is a slightly larger change than in those cases. We have to keep the l

pgsql: Avoid O(N^2) behavior in SyncPostCheckpoint().

2021-11-02 Thread Tom Lane
Avoid O(N^2) behavior in SyncPostCheckpoint(). As in commits 6301c3ada and e9d9ba2a4, avoid doing repetitive list_delete_first() operations, since that would be expensive when there are many files waiting to be unlinked. This is a slightly larger change than in those cases. We have to keep the l

pgsql: Avoid O(N^2) behavior in SyncPostCheckpoint().

2021-11-02 Thread Tom Lane
Avoid O(N^2) behavior in SyncPostCheckpoint(). As in commits 6301c3ada and e9d9ba2a4, avoid doing repetitive list_delete_first() operations, since that would be expensive when there are many files waiting to be unlinked. This is a slightly larger change than in those cases. We have to keep the l

pgsql: pgbench: Fix typo in comment.

2021-11-02 Thread Fujii Masao
pgbench: Fix typo in comment. Discussion: https://postgr.es/m/f9041ec2-46b6-1b41-0e84-9c8a1e2d6...@oss.nttdata.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d8dba4d030681ea3ffc8e7c7b4fa3e35a7f4 Modified Files -- src/bin/pgbench/pgbench.c | 2

pgsql: pgbench: Improve error-handling in pgbench.

2021-11-02 Thread Fujii Masao
pgbench: Improve error-handling in pgbench. Previously failures of initial connection and logfile open caused pgbench to proceed the benchmarking, report the incomplete results and exit with status 2. It didn't make sense to proceed the benchmarking even when pgbench could not start as prescribed.