pgsql: doc: Adjust note about pg_upgrade's --jobs option.

2025-03-08 Thread Nathan Bossart
doc: Adjust note about pg_upgrade's --jobs option. Presently, this section lists a couple of parallelized parts of pg_upgrade and suggests a starting point for setting the --jobs option. The list of parallelized tasks is not particularly actionable, and the phrasing for the --jobs recommendation

pgsql: Don't convert to and from floats in pg_dump.

2025-03-08 Thread Jeff Davis
Don't convert to and from floats in pg_dump. Commit 8f427187db improved performance by remembering relation stats as native types rather than issuing a new query for each relation. Using native types is fine for integers like relpages; but reltuples is floating point. The commit controllled for t

pgsql: Clear errno before calling strtol() in spell.c.

2025-03-08 Thread Tom Lane
Clear errno before calling strtol() in spell.c. Per POSIX, a caller of strtol() that wishes to check for errors must set errno to 0 beforehand. Several places in spell.c neglected that, so that they risked delivering a false overflow error in case errno had been ERANGE already. Given the lack of

pgsql: Clear errno before calling strtol() in spell.c.

2025-03-08 Thread Tom Lane
Clear errno before calling strtol() in spell.c. Per POSIX, a caller of strtol() that wishes to check for errors must set errno to 0 beforehand. Several places in spell.c neglected that, so that they risked delivering a false overflow error in case errno had been ERANGE already. Given the lack of

pgsql: Clear errno before calling strtol() in spell.c.

2025-03-08 Thread Tom Lane
Clear errno before calling strtol() in spell.c. Per POSIX, a caller of strtol() that wishes to check for errors must set errno to 0 beforehand. Several places in spell.c neglected that, so that they risked delivering a false overflow error in case errno had been ERANGE already. Given the lack of

pgsql: Clear errno before calling strtol() in spell.c.

2025-03-08 Thread Tom Lane
Clear errno before calling strtol() in spell.c. Per POSIX, a caller of strtol() that wishes to check for errors must set errno to 0 beforehand. Several places in spell.c neglected that, so that they risked delivering a false overflow error in case errno had been ERANGE already. Given the lack of

pgsql: Clear errno before calling strtol() in spell.c.

2025-03-08 Thread Tom Lane
Clear errno before calling strtol() in spell.c. Per POSIX, a caller of strtol() that wishes to check for errors must set errno to 0 beforehand. Several places in spell.c neglected that, so that they risked delivering a false overflow error in case errno had been ERANGE already. Given the lack of

pgsql: Clear errno before calling strtol() in spell.c.

2025-03-08 Thread Tom Lane
Clear errno before calling strtol() in spell.c. Per POSIX, a caller of strtol() that wishes to check for errors must set errno to 0 beforehand. Several places in spell.c neglected that, so that they risked delivering a false overflow error in case errno had been ERANGE already. Given the lack of

pgsql: Make parallel nbtree index scans use an LWLock.

2025-03-08 Thread Peter Geoghegan
Make parallel nbtree index scans use an LWLock. Teach parallel nbtree index scans to use an LWLock (not a spinlock) to protect the scan's shared descriptor state. Preparation for an upcoming patch that will add skip scan optimizations to nbtree. That patch will create the need to occasionally al

Re: pgsql: Generalize hash and ordering support in amapi

2025-03-08 Thread Peter Eisentraut
On 07.03.25 19:50, Tom Lane wrote: Peter Eisentraut writes: I have committed fixes for these issues along the lines you suggested. Thanks. There is a typo in hashhandler: - amroutine->amcancrosscompare = true; + amroutine->amconsistentequality = true; + amroutine->amconsistentequality

pgsql: Make amcanorder independent of amconsistentordering

2025-03-08 Thread Peter Eisentraut
Make amcanorder independent of amconsistentordering Follow-up to commit af4002b381d: Make amconsistentordering not depend on amcanorder. Although they are related, they are independent properties. Reported-by: Tom Lane Discussion: https://www.postgresql.org/message-id/flat/E1tngY6-UL-2n%40

pgsql: Fix typo

2025-03-08 Thread Peter Eisentraut
Fix typo Duplicate assignment in commit af4002b381d should have been a different field. (But it didn't affect the outcome.) Reported-by: Tom Lane Discussion: https://www.postgresql.org/message-id/flat/E1tngY6-UL-2n%40gemulon.postgresql.org Branch -- master Details --- https://git