Correctifs appliqués

Heikki Linnakangas pushed:

Magnus Hagander pushed:

Peter Eisentraut pushed:

Tom Lane pushed:

  • Restore linking libpq into pg_ctl on Mingw builds. Commit 1ae853654 missed this. Per Andrew Dunstan.
  • Fix another race-condition-ish issue in recovery/t/ Buildfarm members hornet and sungazer have shown multiple instances of "Failed test 'xmin of non-cascaded slot with hs feedback has changed'". The reason seems to be that the test is checking the current xmin of the master server's replication slot against a past xmin of the first slave server's replication slot. Even though the latter slot is downstream of the former, it's possible for its reported xmin to be ahead of the former's reported xmin, because those numbers are updated whenever the respective downstream walreceiver feels like it (see logic in WalReceiverMain). Instrumenting this test shows that indeed the slave slot's xmin does often advance before the master's does, especially if an autovacuum transaction manages to occur during the relevant window. If we happen to capture such an advanced xmin as $xmin, then the subsequent wait_slot_xmins call can fall through before the master's xmin has advanced at all, and then if it advances before the get_slot_xmins call, we can get the observed failure. Yeah, that's a bit of a long chain of deduction, but it's hard to explain any other way how the test can get past an "xmin <> '$xmin'" check only to have the next query find that xmin does equal $xmin. Fix by keeping separate images of the master and slave slots' xmins and testing their has-xmin-advanced conditions independently.
  • Avoid unreferenced-function warning on low-functionality platforms. On platforms lacking both locale_t and ICU, collationcmds.c failed to make any use of its static function is_all_ascii(), thus probably drawing a compiler warning. Oversight in my commit ddb5fdc06. Per buildfarm member gaur.
  • Doc: fix backwards description of visibility map's all-frozen data. Thinko in commit a892234f8. Vik Fearing Discussion:
  • Doc: update v10 release notes through today.

Dean Rasheed pushed:

  • Simplify the logic checking new range partition bounds. The previous logic, whilst not actually wrong, was overly complex and involved doing two binary searches, where only one was really necessary. This simplifies that logic and improves the comments. One visible change is that if the new partition overlaps multiple existing partitions, the error message now always reports the overlap with the first existing partition (the one with the lowest bounds). The old code would sometimes report the clash with the first partition and sometimes with the last one. Original patch idea from Amit Langote, substantially rewritten by me. Discussion:
  • Clarify the contract of partition_rbound_cmp(). partition_rbound_cmp() is intended to compare range partition bounds in a way such that if all the bound values are equal but one is an upper bound and one is a lower bound, the upper bound is treated as smaller than the lower bound. This particular ordering is required by RelationBuildPartitionDesc() when building the PartitionBoundInfoData, so that it can consistently keep only the upper bounds when upper and lower bounds coincide. Update the function comment to make that clearer. Also, fix a (currently unreachable) corner-case bug -- if the bound values coincide and they contain unbounded values, fall through to the lower-vs-upper comparison code, rather than immediately returning 0. Currently it is not possible to define coincident upper and lower bounds containing unbounded columns, but that may change in the future, so code defensively. Discussion:

Teodor Sigaev pushed:

Álvaro Herrera pushed:

Noah Misch pushed:

Correctifs en attente

Amit Kapila sent in two revisions of a patch to fix an issue around indexes on unlogged tables.

Amit Langote and Dean Rasheed traded patches to enable multi-column range-partitioned tables.

Ashutosh Bapat sent in another revision of a patch to create macros bundling RELKIND_* conditions.

Amit Langote sent in another revision of a patch to cope with differing attnos in ATExecAttachPartition code and teach ATExecAttachPartition to skip validation in more cases.

Amit Kapila sent in two more revisions of a patch to speed up clog access by increasing CLOG buffers.

Amul Sul sent in two more revisions of a patch to implement hash paritioning.

Kuntal Ghosh and Michaël Paquier traded patches to fix a bug that manifested as an error while copying a large file in pg_rewind.

Tom Lane sent in three revisions of a patch to distinguish selectivity of < from <= and > from >=.

Mark Rofail sent in two more revisions of a patch to enable foreign key arrays.

Masahiko Sawada sent in a patch to remove an unused variable scanned_tuples in LVRelStats.

Etsuro Fujita sent in a patch to update a comment in ExecPartitionCheck.

Amit Khandekar sent in another revision of a patch to implement parallel append.

Dmitry Dolgov sent in another revision of a patch to implement generic type subscripting.

Beena Emerson sent in another revision of a patch to allow increasing the default WAL segment size.

Mithun Cy sent in another revision of a patch to implement auto_prewarm.

Etsuro Fujita sent in a patch to fix a comment typo in execMain.c.

Ashutosh Bapat sent in a patch always to mark the partition relations of a dummy partitioned table dummy.

Thomas Munro sent in another revision of a patch to fix an out of date comment in predicate.c.

Petr Jelínek sent in two more revisions of a patch to wait for slots to become free when dropping them.

Etsuro Fujita and Amit Langote traded patches to fix an oddity in error handling of constraint violation in ExecConstraints for partitioned tables.

Yi Wen Yong sent in a patch to ensure that replication_slot_catalog_xmin is explicitly initialized when creating procArray.

Petr Jelínek sent in another revision of a patch to improve the messaging during logical replication worker startup, exit in sync worker if the relation was removed during startup, split the SetSubscriptionRelState function into two, kill sync workers only at commit time in SUBSCRIPTION DDL, allow syscache access to subscriptions in database-less processes, and improve locking for subscriptions and subscribed relations.

Alik Khilazhev sent in a WIP patch to add a Zipfian distribution to pgbench.

Masahiko Sawada sent in a patch to make pg_stop_backup(wait_for_archive := true) on a standby server work.

Thomas Munro sent in a patch to fix an issue where per-statement INSER triggers were not catching COPY operations.

Mengxing Liu sent in another revision of a patch to eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions.

Victor Drobny sent in a patch to add a parameter with acceptable authentification methods that can be passed into connection methods of libpq.

Martin Mai sent in a patch to fix a typo in the source documentation.