pgsql-hackers Weekly Digest

Thursday, May 21, 2026

A weekly digest of the pgsql-hackers ML — the primary development mailing list for PostgreSQL.

Disclaimer: Thread statuses and summaries are generated by an LLM-based generative AI and may contain inaccuracies.

Hot Threads

Started
RFC: Allow EXPLAIN to Output Page Fault Information Patch Review 42 msgs Dec 24, 2024 08:53
View on pgsql-hackers archive →
Summary
This thread proposes a new `PAGEFAULTS` option for `EXPLAIN (ANALYZE)` to report minor and major page fault counts during query planning and execution. The goal is to provide deeper insights into storage I/O activity beyond what `BUFFERS` currently offers, aiding in diagnosing slow queries. Early discussions covered platform limitations (Windows `getrusage()`) and the performance impact of per-node reporting. A key ongoing concern is the accuracy of `getrusage()` with asynchronous I/O methods, particularly bgworker-based AIO, which could lead to undercounting. The proposer adapted the patch to suppress output when `io_method=worker`. Reviewers have provided detailed feedback on output format, naming, documentation, and test coverage, leading to iterative patch revisions. The thread is still active, with a reviewer recently reiterating concerns about the interpretability of the reported I/O statistics.
Recent Replies
The latest reply from reviewer 2 acknowledges the usefulness of the EXPLAIN storage I/O patch but raises continued concerns about the potential for misleading values when I/O is handled asynchronously or by worker processes, as `getrusage()` may not capture all activity. Reviewer 2 suggests that the documentation should clarify that the reported numbers represent "backend-observed synchronous storage I/O" rather than total query I/O to prevent misinterpretation, indicating that further refinements are needed.
May 21, 2026 05:38
Proposal: Conflict log history table for Logical Replication Patch Review 59 msgs May 5, 2026 05:25
View on pgsql-hackers archive →
Summary
This thread discusses the proposal and implementation of a conflict log history table for PostgreSQL's Logical Replication feature. The proposer introduced a series of patches (up to v37) to create a system-managed `pg_conflict` schema and associated tables to record replication conflicts. Key discussion points include the design of the `ConflictLogDest` enum, handling of schema renaming for `pg_conflict` (comparing it to `pg_catalog`), and the management of internal dependencies for the conflict log tables. Reviewers provided detailed feedback on code structure, commit messages, documentation accuracy, and test cases. Specific suggestions were made regarding the naming and refactoring of dependency management functions, ordering of schema definitions, and clarification of documentation related to conflict logging behavior and JSON array descriptions. The broader implication of preserving subscription OID was also raised as a separate but related concern. The overall aim is to refine the implementation for robustness, clarity, and maintainability.
Recent Replies
The latest reply, from commenter 1, offers three specific comments on the v36-008 and v36-009 documentation patches. Commenter 1 suggests rephrasing text to clarify "conflict attempt" and better describe the "local_conflicts" JSON array. Commenter 1 also advises specifying that the `conflict_log_destination` parameter *only* creates a table when set to 'table' or 'all', and recommends linking the term "Conflicts" to the relevant chapter in the documentation for improved clarity.
May 21, 2026 10:39
A reviewer provided further review comments, confirming that a commit message update for the conflict log table name was handled in an earlier patch. The reviewer also re-affirmed that the current approach of checking for `operation != CMD_DELETE` in `execMain.c` to enforce DML restrictions on conflict log tables is acceptable, even with `TRUNCATE` handled as a separate utility command.
May 21, 2026 07:13
The latest reply from commenter 1 raises a strategic concern regarding patch 007's logic for preserving subscription OIDs. Commenter 1 notes that this functionality is needed by another ongoing thread and had been previously rejected as a standalone effort. Commenter 1 suggests extracting this specific feature into its own, separate thread to avoid making it a dependency of the current patch set, promoting better modularity and addressing its broader implications.
May 21, 2026 06:01
[Patch] Add WHERE clause support to REFRESH MATERIALIZED VIEW Patch Review 10 msgs Dec 8, 2025 20:58
View on pgsql-hackers archive →
Summary
This thread discusses a patch to add `WHERE` clause support to `REFRESH MATERIALIZED VIEW`, enabling partial refreshes to improve performance by targeting only changed data. The proposer initially implemented a 'Prune + Upsert' strategy for non-concurrent refreshes. An early commenter highlighted a real-world need for this feature. Reviewers identified a bug in unique index handling and raised concerns about consistency gaps in the non-concurrent mode. The proposer considered using transaction-level advisory locks to address concurrency but abandoned it due to scalability issues. The revised approach for non-concurrent refreshes now uses `SELECT ... FOR UPDATE` followed by a single CTE for upsert/delete. Discussion also touched upon whether the `CONCURRENTLY` keyword's semantics might become inverted with a `WHERE` clause, and the need for clear documentation on concurrency guarantees for this feature.
Recent Replies
The latest commenter, a reviewer, provided feedback on the updated patch, questioning the safety of the `FOR UPDATE + single-CTE` approach for overlapping refreshes due to potential deadlocks. They also reiterated concerns about the potentially unintuitive behavior of the `CONCURRENTLY` keyword when combined with a `WHERE` clause. The reviewer emphasized the value of the feature for high-churn scenarios and requested clearer documentation of the concurrency guarantees.
May 21, 2026 05:17
[PATCH] Release replication slot on error in SQL-callable slot functions Patch Review 4 msgs May 9, 2026 20:45
View on pgsql-hackers archive →
Summary
The proposer reported a bug where SQL-callable replication slot functions (like pg_replication_slot_advance) can fail to release an acquired replication slot if an error occurs and is caught by a PL/pgSQL EXCEPTION block. This leads to a stale MyReplicationSlot process-global variable, causing an Assert crash in debug builds or silently orphaning the slot in release builds. Orphaned slots prevent other sessions from acquiring them and block vacuum and WAL deletion. The proposer provided a patch using PG_TRY/PG_CATCH blocks to ensure ReplicationSlotRelease() is called on error. Reviewers confirmed the approach, but raised questions about handling temporary logical replication slots which ReplicationSlotRelease() might not fully drop, and identified other functions (pg_copy_logical_replication_slot(), pg_logical_slot_get_changes()) that might suffer from similar issues, requiring a broader fix.
Recent Replies
The latest reply is from the proposer, acknowledging the feedback received from the reviewers. The message is truncated, suggesting they are in the process of responding to the points raised, which included concerns about temporary slots and other related functions needing similar fixes.
May 21, 2026 14:38
A reviewer confirmed that the issue extends to `pg_logical_slot_get_changes`, providing a specific reproduction scenario. This indicates that the proposed fix may need to cover additional SQL-callable functions beyond those initially considered, broadening the scope of the problem to be addressed.
May 21, 2026 06:49
Fix pg_stat_wal_receiver to show CONNECTING status Patch Review 10 msgs May 19, 2026 05:55
View on pgsql-hackers archive →
Summary
The thread begins with the proposer reporting a bug where `pg_stat_wal_receiver` does not show the `CONNECTING` status for a WAL receiver, which contradicts the original intent for monitoring. The proposer suggests a patch (v1) to display a minimal row with the PID and 'connecting' status when `WalRcv->ready_to_display` is false. A reviewer proposes an alternative patch (v2) that refines how `WalRcv->ready_to_display` is used, splitting the data filling into two steps to ensure `CONNECTING` status is visible without exposing potentially stale connection details. The proposer initially raises concerns about v2's display of `last_msg_send_time` and `last_msg_receipt_time` during the `CONNECTING` state, arguing they could be misleading if showing initial timestamp values rather than actual message activity. The reviewer defends v2, explaining that these values reflect the initialized state of the WAL receiver and can still be useful. The proposer eventually accepts v2, suggesting a documentation update for clarity. However, the proposer then discovers a new, related bug: a `conninfo` leak in the WAL receiver reuse path, where old connection information could persist while in `CONNECTING` or `WAITING` states. The proposer describes the leak and proposes a new patch to address it by only copying primary connection info when switching to `WALRCV_STARTING`, avoiding unnecessary `conninfo` clobbering. The reviewer confirms this new bug is legitimate, affects stable branches, and requests the proposer to submit the patch for backporting.
Recent Replies
The proposer apologizes for missing attachments in the previous message and states that the new patch addressing the `conninfo` leak is now attached for review. This patch aims to prevent the leak in the WAL receiver reuse path, a bug discovered during the review of earlier proposed changes to `pg_stat_wal_receiver`.
May 21, 2026 12:29
The proposer identified a new bug related to a `conninfo` leak in the WAL receiver reuse path, providing a diff to demonstrate it. They proposed a solution to copy primary connection information to `walrcv->conninfo` only when switching to `WALRCV_STARTING`, preventing the leak during the `WALRCV_WAITING` reuse path. The reviewer acknowledged the bug as legitimate and requested a patch for it, noting its impact on stable branches.
May 21, 2026 12:08
The proposer identified a potential conninfo leak in the WAL receiver reuse path, even with the v2 patch. The proposer outlined a specific sequence of WAL receiver states (WAITING -> RESTARTING -> CONNECTING) where conninfo could be copied into walrcv->conninfo before it is cleared by v2, leading to a temporary leak if the ready_to_display flag is then set to true.
May 21, 2026 07:20
Rename Postgres 19 to Postgres 26 (year-based)? Discussing 2 msgs May 21, 2026 14:20
View on pgsql-hackers archive →
Summary
The proposer suggests changing PostgreSQL's major versioning scheme from a sequential integer (e.g., Postgres 19) to a year-based one (e.g., Postgres 26 for 2026). The primary motivation is to make it easier for users to quickly determine the age of a running PostgreSQL instance, as the project has a stable annual release cycle. The proposer believes aligning the version number with the last two digits of the release year would improve memorability and provide better context for users managing multiple database versions. A commenter supports the idea, noting similar versioning approaches in other operating systems (macOS) and distributions (Ubuntu, Debian), and suggests the possibility of also naming releases.
Recent Replies
The latest reply from a commenter supports the idea of year-based versioning. The commenter draws parallels with macOS and Ubuntu, which use similar schemes, and also suggests that giving each major release a name could be an interesting additional feature.
May 21, 2026 15:18
The proposer initiates a discussion by suggesting that PostgreSQL's major version numbering be changed from a sequential system (e.g., 19) to a year-based one (e.g., 26 for 2026). The primary goal is to enhance memorability for users managing various database versions, providing a clearer indication of a version's release year and how current it is.
May 21, 2026 14:20
Avoid leaking system path from pg_available_extensions Patch Review 4 msgs May 20, 2026 01:00
View on pgsql-hackers archive →
Summary
The proposer identified an information leakage bug in the pg_available_extensions view. When the extension_control_path parameter is explicitly set to an empty string, the location column incorrectly displays the absolute system path (e.g., /usr/local/pgsql/share/extension) instead of the documented '$system'. This behavior contradicts the documentation, which states that an empty string for this parameter should default to '$system'. The proposer provided a straightforward patch to correct this, ensuring that '$system' is displayed as expected in this scenario. Multiple reviewers reproduced the bug and confirmed the patch fixes the issue.
Recent Replies
The latest reply is from a reviewer who confirmed they reproduced the issue and verified that the provided patch correctly addresses the bug. This indicates agreement on the problem and the proposed solution.
May 21, 2026 15:12
A reviewer confirms the existence of the problem described by the proposer and verifies that the provided patch successfully fixes the issue. The reviewer indicates that the patch "looks good".
May 21, 2026 08:55
The latest reply clarifies that the patch mentioned in the initial message was accidentally omitted and is now attached. This follow-up ensures the proposed solution is available for review.
May 20, 2026 01:07
Optimize LISTEN/NOTIFY Committed 27 msgs Nov 13, 2025 06:36
View on pgsql-hackers archive →
Summary
This extensive thread focuses on optimizing `LISTEN/NOTIFY` functionality. The proposer introduced a new design for tracking `LISTEN` state using hash tables at three levels: per-transaction pending changes, per-backend committed state cache, and cluster-wide shared state. This aimed to reduce shared dshash operations by performing more work locally and deduplicating actions. Significant discussion revolved around the terminology and the handling of 'laggard' backends not interested in specific notifications, to avoid a 'thundering herd' problem. A reviewer proposed a revised patch (v35) incorporating cosmetic changes and bug fixes, including restoring the previous behavior for laggard backends. The latest messages indicate that v35 was committed, and a follow-up comment identified an inconsistency in the `async-notify.spec` test related to `ChannelHashAddListener()`, which was eliminated in an earlier patch version.
Recent Replies
The proposer acknowledges a reviewer's finding that a test case in `async-notify.spec` is obsolete due to changes in `ChannelHashAddListener()`. The proposer indicates they will prepare a separate patch to remove this outdated test.
May 20, 2026 11:47
amcheck support for BRIN indexes Patch Review 25 msgs Apr 22, 2025 09:05
View on pgsql-hackers archive →
Summary
The proposer initiated a thread to add `amcheck` support for BRIN indexes, outlining a patch with index structure checks (meta page, revmap, regular pages) and consistency checks between heap and index. Early discussions revolved around how to handle operator identification for the 'all consistent check', especially for opclasses that lack an equality operator, with commenter 1 suggesting leveraging existing primitives and the proposer exploring user-defined operators or a catalog mapping. Reviewer 1 provided detailed feedback, proposing an optional operator argument, requiring tests for multi-column indexes, suggesting improvements to the `CheckIndexCheckXMin` function, and requesting documentation updates. The proposer subsequently updated the patch to incorporate some of these suggestions, making the operator list optional and relocating `indcheckxmin`. More recently, the proposer reiterated the idea of an opclass-to-operator mapping to simplify user experience. Reviewer 2 successfully applied and built the updated patch, performing basic validation tests and noting a necessary `ALTER EXTENSION amcheck UPDATE` for existing `amcheck` installations, which the proposer confirmed as expected behavior for upgrades.
Recent Replies
The latest reply from the proposer acknowledges the successful testing report from reviewer 2. The proposer clarifies that the need to run `ALTER EXTENSION amcheck UPDATE` after applying the patch is expected when an existing `amcheck` installation is being updated, and does not indicate an issue with the patch itself.
May 20, 2026 17:55
A reviewer confirms that the patch applied successfully and built without issues. They verified that the `brin_index_check()` function became available and worked as expected after updating the `amcheck` extension, and that some basic BRIN index validation tests passed.
May 20, 2026 12:15
pg_stat_io_histogram Patch Review 32 msgs Jan 26, 2026 09:40
View on pgsql-hackers archive →
Summary
This thread proposes a new feature, `pg_stat_io_histogram`, to track and display I/O latency profiles, aiming to help users identify I/O outliers quickly. The initial patch focused on avoiding overhead with fast bucket calculation. Much of the subsequent discussion revolved around optimizing memory usage, particularly in each backend and in shared memory, as early versions significantly increased `pgStatLocal` and `PendingIOStats` sizes. Reviewers raised concerns about wasting memory for unused statistics. The proposer developed several patch versions (v7, v9a, v9b, v10) exploring different memory optimization strategies, including dynamically allocating memory and using indirect offsets to reduce the footprint. Performance testing indicated negligible CPU impact. The debate also included histogram range and bucket width. The latest patch, v10, aims to address memory concerns using indirect offsets and dynamic shared memory allocation on startup, making the shared memory footprint acceptable.
Recent Replies
The proposer announces the submission of v10, which implements a reduced shared memory footprint using indirect offsets. This version incorporates the idea of sizing and allocating shared memory dynamically on startup. This iteration is a continuation of previous attempts (v9b) to optimize memory usage.
May 20, 2026 08:37
Bypassing cursors in postgres_fdw to enable parallel plans Patch Review 25 msgs Jan 6, 2025 08:52
View on pgsql-hackers archive →
Summary
This thread proposes a mechanism to bypass cursors in `postgres_fdw` to enable parallel query plans on the remote server, addressing a limitation where parallel plans fail due to cursor usage. The initial approach introduced a GUC `postgres_fdw.use_cursor` and used `PQsetChunkedRowsMode` in non-cursor mode. A challenge arose with simultaneous queries, leading to the development of a mechanism to store fetched data in a Tuplestore when a cursor switch occurs. The patch underwent significant refactoring based on reviewer feedback, including adding a Tuplestore to `PgFdwScanState`, renaming flags, and improving `postgresReScanForeignScan` logic. Discussions highlighted issues like unnecessary code, flag naming, `active_scan` pointer management, and `ExprContext` usage. The latest version of the patch split the changes into two, the first renaming `cursor_exists` to `scan_in_progress` and the second implementing the fetch mechanism, and introduced a new GUC `streaming_fetch`.
Recent Replies
The proposer acknowledges the reviewer's detailed feedback, agreeing with the analysis of the `ExprContext` problem and the underlying `active_scan` pointer issue. The proposer confirms their intention to implement the suggested solution, which involves ensuring the `active_scan` pointer is only non-NULL when results are actively being drained.
May 20, 2026 10:40
Set notice receiver before libpq connection startup Discussing 5 msgs May 20, 2026 07:21
View on pgsql-hackers archive →
Summary
The proposer identified an issue where NOTICE messages generated during libpq connection establishment, such as from login triggers, are not correctly logged via ereport() but are instead printed to stderr. This occurs because the libpqsrv_notice_receiver is installed too late in the connection process. The proposer initially suggested adding wrapper functions to install the receiver earlier. A reviewer, however, proposed a more general solution: splitting the libpqsrv_connect() function into two phases, libpqsrv_connect_start() and libpqsrv_connect_complete(), to allow the notice receiver to be set in the interim. The proposer agreed to this refactoring approach.
Recent Replies
The proposer agreed to the reviewer's suggestion of splitting the connection function into start and complete phases. The proposer indicated they would proceed with the suggested refactoring, acknowledging its generality for handling various connection-time settings, not just notice receivers.
May 21, 2026 07:26
The latest message is a brief acknowledgment from the proposer to the reviewer, confirming receipt of the feedback. It indicates that the discussion on the design approach is ongoing, with the proposer having agreed to the reviewer's suggestion of splitting the connection function into start and complete phases rather than using dedicated wrapper functions.
May 21, 2026 05:03
The latest reply from the proposer is a response to the reviewer's suggestion. Although truncated, it appears to be engaging with and discussing the reviewer's proposed alternative solution, which involves splitting the connection function into start and complete phases for a more generalized approach to setting up connection parameters, including the notice receiver.
May 21, 2026 02:09
Pg upgrade bug with NOT NULL NOT VALID Proposed 1 msgs May 21, 2026 12:14
View on pgsql-hackers archive →
Summary
The proposer identified a bug in `pg_upgrade` when upgrading from PostgreSQL 17 to a newer version. The issue occurs when a user explicitly defines a `NOT NULL` constraint using `CHECK ((i is not null)) NOT VALID`, which `pg_restore` fails to re-add because an implicitly created `NOT NULL` constraint with the same name already exists. This leads to an "ERROR: constraint already exists". The proposer suggested a fix involving choosing a less obvious, unique name for `NOT NULL` constraints generated during `CREATE TABLE` processing to avoid naming conflicts. They also noted this change might affect non-`pg_upgrade` operations and offered to prepare a patch.
Recent Replies
The proposer outlined a bug in `pg_upgrade` where an explicitly defined `NOT NULL NOT VALID` constraint conflicts with an implicitly generated one, causing `pg_restore` to fail with a "constraint already exists" error. They proposed a solution to rename the implicitly created `NOT NULL` constraints and offered to provide a patch.
May 21, 2026 12:14
PSQL - prevent describe listing tables that are already in listed schemas Discussing 11 msgs May 18, 2026 03:20
View on pgsql-hackers archive →
Summary
This thread proposes an enhancement to psql's `\dRp+` command, aiming to prevent it from listing individual tables if they are already encompassed by a `FOR TABLES IN SCHEMA` clause within a publication. The proposer argued that the current behavior creates confusing output, especially when row filters or future `EXCEPT` clauses are involved. Commenters supported the idea, leading to the incorporation of a similar logic to improve the `\d+` command, ensuring tables are not redundantly displayed. A discussion on including a PostgreSQL 15 version check for catalog access in psql was resolved by adding it as a precautionary measure. The patch has undergone several revisions and is now considered complete and ready for a committer's review.
Recent Replies
The latest reply from commenter 1 confirms that all comments and concerns have been addressed in the latest patch version (v6). Commenter 1 also states their intention to mark the commitfest entry as 'Ready for Committer,' signaling that the proposed changes are now deemed complete and approved for inclusion.
May 21, 2026 05:53
In the latest message, the proposer confirms the efficacy of new tests in a recent patch version and agrees with reviewer 1's suggestion to include a PG15 version check. This check is deemed a cautious measure to prevent internal SQL errors on older server versions, even if PG14 reaches end-of-life before the feature's release. The proposer has submitted patch v6 with these changes.
May 20, 2026 23:34
A reviewer confirms that a version guard for accessing `pg_publication_namespace` is not needed for the proposed change. This decision is based on the expectation that older PostgreSQL versions (PG14 and below) will be End-of-Life by the time the current development branch (PG20) is shipped, making backporting considerations for older `psql` clients less critical.
May 20, 2026 08:27
[PATCH] Fix LISTEN startup race with direct advancement Patch Review 5 msgs May 19, 2026 20:37
View on pgsql-hackers archive →
Summary
The thread addresses a race condition in the async notification mechanism (`async.c`) that can cause `LISTEN` clients to entirely miss `NOTIFY` messages. This occurs when a `NOTIFY` commits in a brief window between a listener registering its queue position and becoming active. During this window, `SignalBackends()` might incorrectly conclude the listener isn't interested and advance its queue pointer past the notification, leading to a "false negative" where a notification is lost. The proposer suggested a fix that involves treating staged `LISTEN` entries as potential listeners when deciding whom to wake. The proposed solution includes three patches: two tests and the fix. A reviewer confirmed the bug and the effectiveness of the fix, also pointing out a test file duplication and another related scenario addressed by the patch.
Recent Replies
The proposer acknowledged the feedback from a reviewer regarding a duplication in the test files. A new version of the patches will be prepared, ensuring that the test for the missed notification and the test for the already-seen work are distinct, and that the fix patch contains only the core solution.
May 21, 2026 04:49
The latest reply from commenter 1 reiterated a query regarding the similarity between two of the provided test patches (0001 and 0003). Despite earlier clarification from the proposer about differing injection points, commenter 1 pointed out that the test specification files themselves appeared identical, seeking further explanation for this observation.
May 20, 2026 17:27
The proposer clarified the distinction between the two test patches (0001 and 0002), explaining that they target different injection points to demonstrate separate race conditions. The proposer also acknowledged that the main fix patch (0003) successfully addresses another related notification scenario identified by the reviewer.
May 20, 2026 11:20
Adding pg_dump flag for parallel export to pipes Patch Review 24 msgs Apr 7, 2025 17:16
View on pgsql-hackers archive →
Summary
This thread proposes adding a new flag, initially `--pipe-command` and later renamed to `--pip`, to `pg_dump` and `pg_restore` for use with the directory output format (`-Fd`). The feature aims to enable piping individual dump files to external commands, offering flexibility for custom compression, streaming to cloud storage, or transferring data via SSH, which is currently not possible with the directory format. The proposer introduced a `%f` specifier for dynamic file naming within the pipe command. A reviewer provided extensive feedback, suggesting a shorter flag name, improved error handling, more comprehensive testing, and considering `pg_dumpall` support. The proposer has since rebased the patch multiple times, incorporated many suggestions including renaming the flag to `--pip`, enhancing error handling, adding numerous tests for various scenarios and parallelism, and specifically addressing Windows compatibility. Support for `pg_dumpall` has been deferred for a future patch.
Recent Replies
The latest reply from the proposer focuses on refining the patch for better compatibility, specifically addressing how pipe commands are quoted within the Windows test suite. This indicates an ongoing effort to ensure the robustness and cross-platform functionality of the proposed `--pip` feature for `pg_dump` and `pg_restore`.
May 21, 2026 09:56
The proposer provided another updated version of the patches. This latest revision primarily focuses on cleaning up the test files, specifically addressing and removing a 'split command' that was causing issues during Windows tests. This indicates continued effort to ensure the robustness and cross-platform compatibility of the proposed feature's test suite.
May 14, 2026 10:09
The latest reply from the proposer provides an updated patch version. This version includes minor changes to the test code specifically to accommodate Windows backslash paths, indicating continued efforts to ensure cross-platform compatibility and robustness. The code has also been rebased.
May 11, 2026 05:34
Fix SPLIT PARTITION bound-overlap bug and other improvements Patch Review 19 msgs May 13, 2026 04:38
View on pgsql-hackers archive →
Summary
The proposer identified a bound-overlap bug in ALTER TABLE ... SPLIT PARTITION and other areas needing improvement, including unclear documentation for splitting with a DEFAULT partition and a need for better error messages. The initial proposal included multiple patches, with a reviewer confirming that patches 0001-0003 were ready. The proposer then identified a collation-related issue in patch 0004 concerning LIST partitions and provided a revised version. The reviewer subsequently committed patches 0001-0003 and revised patch 0004, adding further tests. The discussion continued around the details of patch 0004, focusing on correct handling of collations and ensuring proper bound comparisons for LIST partitions.
Recent Replies
The latest reply by the proposer (Message 13) acknowledges the reviewer's action of committing patches 0001-0003. The proposer also confirms their understanding regarding the collation issue that was discussed for the remaining patch (0004), which the reviewer had revised.
May 20, 2026 23:22
The latest messages, though truncated, indicate reviewer 1's continued engagement on the final patch (0004). Previously, reviewer 1 confirmed committing patches 0001-0003 and provided a revised version of 0004, incorporating additional regression tests and addressing the collation-related concerns raised by the proposer. This reflects ongoing efforts to finalize the solution for preventing degenerate split partition operations.
May 20, 2026 21:17
The proposer confirms that their previous suggestion has been addressed and expresses satisfaction with the current state of the remaining patch (0004), indicating it is ready for further review or commitment.
May 20, 2026 11:46
synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication Patch Review 77 msgs Feb 24, 2026 22:08
View on pgsql-hackers archive →
Summary
The thread discusses an inconsistency in PostgreSQL's `synchronized_standby_slots` where it requires all listed slots to catch up, even when `synchronous_standby_names` is configured for quorum (ANY M of N) replication. This leads to logical decoding blocking if a non-essential standby goes down. The proposer introduced a patch to extend `synchronized_standby_slots` with quorum-aware syntax (ANY M of N) and later proposed adding priority-based syntax (FIRST N). The discussion evolved to splitting the work into three patches: first, refactoring the synchronous replication parser to better distinguish syntax forms; second, implementing `ANY N` semantics; and third, implementing `FIRST N` semantics. Reviewers provided feedback, including identifying a bug where duplicate entries in priority configuration are not filtered, which the proposer has committed to addressing.
Recent Replies
The proposer acknowledges a bug reported by a reviewer regarding duplicate entries not being filtered in priority configurations for `synchronized_standby_slots`. The proposer confirms this is a valid issue and commits to addressing it in the next version of the patch.
May 21, 2026 09:12
The reviewer continues to examine the reordered patch set, specifically patch 001, which refactors the synchronous replication parser. The reviewer provides minor feedback on documentation formatting, suggesting the use of asterisks for bullet points. Additionally, the reviewer suggests a variable name change from `num_sync_standbys` to `num_sync_slots` for improved clarity within the context of the code.
May 15, 2026 03:58
The latest reply from reviewer 2 acknowledges the proposer's reordered patch set, which now begins with a parser refactoring. This restructuring addresses prior concerns about independent patch functionality. The reviewer also provided minor comments for the first patch, suggesting improvements to documentation clarity, specifically recommending the use of 'ANY N' instead of 'ANY 1' for better explanation and other minor code review points.
May 14, 2026 11:06
Implement waiting for wal lsn replay: reloaded Committed 41 msgs Jan 27, 2026 01:14
View on pgsql-hackers archive →
Summary
This thread discusses improvements and bug fixes related to the `WAIT FOR LSN` functionality, particularly concerning how replay waiters are woken up and memory barrier semantics. Initial patches addressed a misplaced wake-up call and memory barriers in `GetWalRcvWriteRecPtr()`. The discussion involved ensuring proper handling of `writtenUpto` with atomic operations and robust testing for various scenarios, including off-by-one errors and timeline boundaries. The proposer assembled a patchset, which underwent several revisions to incorporate feedback, improve test coverage, and address a newly discovered test failure in `wait_for_catchup()`. The thread concludes with the proposer reviewing a fix for this test failure and the initial patchset being committed.
Recent Replies
The reviewer confirms that they have added comments for new functions in patch 0006 and proposes to push the patchset, acknowledging that while some aspects might still be missing, the current version significantly improves many areas. The proposer then reviewed the patchset and identified a potential issue in a test for patch 5, which was subsequently fixed, with other parts of the patchset deemed acceptable.
May 20, 2026 12:16
The latest reply is an empty message from the proposer, implicitly acknowledging the newly reported test failure regarding a regression in the `wait_for_catchup()` implementation. This failure was identified by commenter 1 after the patchset had been committed, indicating a need for further investigation and resolution of the introduced bug.
May 20, 2026 05:18
The proposer acknowledged a new test failure reported by a commenter, which appears to be a regression caused by the recently committed `wait_for_catchup()` implementation. The failure occurs in `t/019_replslot_limit.pl`, specifically with checks for replication slot states, indicating that the states are not transitioning as expected.
May 20, 2026 03:30
Add pg_get_publication_ddl function Patch Review 9 msgs Jan 11, 2026 11:20
View on pgsql-hackers archive →
Summary
This thread proposes and reviews a new function, `pg_get_publication_ddl`, designed to generate the DDL for PostgreSQL publication objects. The proposer initially submitted a patch (v1) and sought feedback, particularly on the implications of viewing publication details without explicit 'view' privileges and how to handle default values. Reviewers provided extensive feedback on v1, pointing out numerous typos, potential information leaks due to missing `ONLY` clauses, incorrect schema prefix handling, and suggesting various code and documentation improvements. The proposer then submitted v2, incorporating a new structure, adding `pretty` and `owner` options, improving string management, using cache instead of shared locks, addressing grammar, and enhancing test coverage, including support for the `EXCEPT` clause. Reviewers are now actively providing detailed feedback on the v2 patch, focusing on documentation clarity, parameter naming, and minor code style adjustments to further refine the proposal.
Recent Replies
The latest reply from reviewer 1 clarifies a previous comment regarding 'pretty' output containing '+' characters. The reviewer explains that these characters are artifacts added by `psql` to indicate line continuations and are not an issue with the patch's output, thus withdrawing that specific criticism of the v2 patch.
May 20, 2026 22:27
A reviewer is providing detailed feedback on the v2 patch, focusing on documentation and code style. They suggest renaming the first parameter in the function signature, making the documentation more concise by removing unnecessary details about clause reordering, and alphabetizing entries in a table. In the code, they suggest simplifying a tricky format string for "ALL SEQUENCES" and improving the placement of a comment.
May 20, 2026 10:00
The proposer submitted v2 of the patch, incorporating extensive changes. These include adopting a new structured approach, adding pretty printing and owner options with `ALTER OWNER` statements, refining string manipulation, switching to cache for object access, correcting grammar, expanding test cases for corner situations, and adding support for the `EXCEPT` clause.
May 17, 2026 21:27
Deadlock detector fails to activate on a hot standby replica Patch Review 3 msgs Jan 19, 2026 12:43
View on pgsql-hackers archive →
Summary
This thread discusses a bug where the deadlock detection mechanism fails to activate on a hot standby replica, specifically when a deadlock occurs between startup and backend processes during XLOG_HEAP2_PRUNE_* message processing. This can lead to significant recovery delays, especially if `max_standby_streaming_delay` is disabled. The proposer identified that the root cause lies in `timeout.c` and `ResolveRecoveryConflictWithBufferPin`, where the `SIGALRM` handler can be triggered "spontaneously" due to an optimization in `setitimer` calls, prematurely waking up the process before an actual timeout. If `deadlock_timeout` is larger than `log_startup_progress_interval`, the deadlock detector may never trigger. The proposer submitted a patch aimed at ignoring these spontaneous `SIGALRM` signals. A reviewer then provided detailed feedback on the patch, suggesting improvements to include ordering, clarifying comments regarding `ProcWaitForSignal` wake-ups, explicitly checking the waiter state, and simplifying the control flow within the waiting loop.
Recent Replies
The latest reply from a reviewer provides constructive feedback on the proposed patch. The reviewer suggests reordering includes, rephrasing a comment about `ProcWaitForSignal` wake-ups for accuracy, recommending a more explicit check for the waiter status using `BM_PIN_COUNT_WAITER` and `wait_backend_pgprocno`, and proposing a simplified control flow for the main waiting loop to improve readability.
May 20, 2026 16:26
Patch for bind message regarding the number of parameters and result column format codes Proposed 1 msgs May 21, 2026 01:12
View on pgsql-hackers archive →
Summary
This thread proposes a patch to correct documentation inaccuracies related to the bind message protocol. The proposer identifies that the documentation incorrectly describes the counts for parameter format codes, parameter values, and result-column format codes as signed integers, when they are actually unsigned integers according to the source code. The patch aims to update the documentation to reflect this correction.
Recent Replies
The proposer initiates the thread by highlighting a documentation inaccuracy. The counts for parameter format codes, parameter values, and result-column format codes in bind messages are documented as signed integers but are actually unsigned integers in the source code. A patch is proposed to correct this documentation error.
May 21, 2026 01:12
Improve pg_stat_statements scalability Patch Review 4 msgs May 11, 2026 23:53
View on pgsql-hackers archive →
Summary
The proposer initiated a discussion on improving the scalability of pg_stat_statements, highlighting three primary issues: high spinlock contention, performance bottlenecks during hash table deallocation under exclusive locks, and query text file bloat with inefficient garbage collection. The proposed solution leverages the existing PostgreSQL statistics collector (pgstat) system, which offers local stat writing, periodic flushing to shared memory, and dynamic resizing capabilities. The work builds on recent PostgreSQL developments in pluggable cumulative statistics and serialization callbacks. The proposer later reorganized the patches and fixed an issue causing CI failures related to parallel query execution, providing an updated series.
Recent Replies
The latest reply from the proposer (Message 4) addresses a CI failure encountered on FreeBSD with parallel query execution. The proposer describes the fix, which involves modifying the test setup and marking relevant pg_stat_statements functions as PARALLEL RESTRICTED to ensure stats are correctly accumulated by the leader process. The proposer also briefly questioned the implications of these changes for older versions.
May 20, 2026 22:59
The proposer provided an update, stating that an issue causing CI failures with the serialization callback has been resolved. The patch series was also reorganized into four distinct patches. These patches now include an in-transaction flush as a dependency, the main migration of the pg_stat_statements hash to a custom pgstat kind, the move of the query text file to DSA + file storage, and the addition of new columns to pg_stat_statements_info, refining the proposal for further review.
May 17, 2026 17:37
The proposer clarifies that further testing for spinlock contention will be conducted on a machine with a much higher core count. This is intended to more effectively demonstrate the benefits of the proposed patch series in environments where such contention is a significant performance bottleneck.
May 12, 2026 00:35
[PATCH] Fix REPACK decoding worker not cleaned up on FATAL exit Committed 7 msgs May 12, 2026 23:26
View on pgsql-hackers archive →
Summary
This thread addresses a bug where a REPACK decoding worker process and its temporary replication slot were not properly cleaned up when the main REPACK session terminated via a `FATAL` exit (e.g., `pg_terminate_backend`). The initial proposer identified that `FATAL` exits bypass `PG_FINALLY` blocks, preventing the worker's cleanup function from being called. The proposer's first patch used `on_proc_exit` callbacks, but reviewer 1 found it caused a segfault due to use-after-free, suggesting `before_shmem_exit` instead. Committer 1 then proposed `PG_ENSURE_ERROR_CLEANUP()` as the most robust solution, which handles both `ERROR` and `FATAL` exits, automatically cancels on normal completion to prevent slot leaks, and runs before memory contexts are destroyed. The proposer's v3 patch implemented this, successfully resolving the issues and passing tests. Committer 1 subsequently pushed the fix, along with further refinements to `stop_repack_decoding_worker()` to improve memory handling. Commenter 1 then inquired about a potential omission of `shm_mq_detach()`, leading to a brief discussion about automatic detachment of shared memory queues.
Recent Replies
The committer responded to a question from commenter 1 regarding the `shm_mq_detach()` call. They pointed out that the `shm_mq_attach()` documentation implies automatic detachment of the queue when the dynamic shared memory segment is detached, questioning the necessity of an explicit `shm_mq_detach()` call, but offered to restore it if necessary.
May 20, 2026 20:13
A reviewer comments on a follow-up patch that refactored `stop_repack_decoding_worker()`. The reviewer observes that the `shm_mq_detach()` call seems to have been removed and asks for clarification on whether its functionality is now implicitly handled or if it's a potential omission, noting that explicit detachment improves code readability.
May 20, 2026 07:54
The reviewer confirms that the proposer's v3 patch, which utilizes `PG_ENSURE_ERROR_CLEANUP()`, effectively resolves the bug where `REPACK (CONCURRENTLY)` decoding workers and their temporary slots were not cleaned up on FATAL exit. The reviewer states that the patch has been committed, with minor cosmetic adjustments, and also mentions a subsequent patch to further improve the `stop_repack_decoding_worker()` function.
May 19, 2026 18:45
Feature request: Native nanosecond precision support for temporal types Proposed 1 msgs May 20, 2026 20:25
View on pgsql-hackers archive →
Summary
The proposer has initiated a feature request for native nanosecond precision support within PostgreSQL's temporal data types (timestamp, timestamptz, time). They argue that this capability is increasingly critical for modern analytical and financial systems, which often process data requiring nanosecond resolution. The proposer cites several widely used data formats and databases that already support this precision, including Parquet, DuckDB, ClickHouse, Oracle, SAS, Pandas, and NumPy. Currently, PostgreSQL users resort to workarounds such as auxiliary nanosecond-remainder columns, bigint epoch encodings, or custom extensions. The proposer contends that native support would bring consistent casting and operator semantics, improve integration with drivers, ORMs, and FDWs, and establish a standardized approach, thereby making PostgreSQL more competitive for workloads involving high-resolution datasets like market microstructure research.
Recent Replies
The proposer introduces a feature request for native nanosecond precision support for PostgreSQL's temporal types. They explain that current limitations force complex workarounds and that native support would provide a more robust, integrated, and standardized solution, aligning PostgreSQL with modern analytical and financial data requirements.
May 20, 2026 20:25
Dump statistic issue with index on expressions Discussing 3 msgs Feb 25, 2026 16:37
View on pgsql-hackers archive →
Summary
A bug was reported where `pg_dump --statistics-only` fails with an "could not find index attname" error when a table has multiple indexes, including an index on an expression. The proposer provided a simple patch, explaining that `pg_dump` can incorrectly use attribute names from a previously processed index on an expression for a subsequent regular index. A reviewer confirmed the underlying bug (incorrect inheritance of `indAttNames`), but couldn't reproduce the user-facing error on a vanilla PostgreSQL system. The proposer's latest reply clarified that the issue arises in their specific fork because it generates `pg_statistics` entries for all indexes, unlike vanilla PostgreSQL which only does so for expression indexes. This explains why the bug is not easily reproducible on vanilla, but the underlying issue of `pg_dump` misusing `indAttNames` after processing an expression index remains pertinent to the patch.
Recent Replies
The proposer clarifies that the reported bug is not reproducible on a vanilla PostgreSQL installation. The issue stems from a fork-specific behavior where `pg_statistics` records are generated for all indexes, not just those with expressions, leading to the `pg_dump` error described. This explains why the reviewer couldn't reproduce it and suggests the patch addresses a problem that is more visible in environments with extended `pg_statistics` data generation.
May 20, 2026 09:51
PostgreSQL and OpenSSL 4.0.0 Patch Review 13 msgs Apr 16, 2026 13:32
View on pgsql-hackers archive →
Summary
The proposer initiated a thread announcing OpenSSL 4.0.0 release and the need to adapt PostgreSQL. The initial patch addressed compilation warnings arising from const changes in OpenSSL 4.0.0 APIs, ensuring libpq and sslinfo build without warnings across OpenSSL 1.1.1 to 4.0.0 and LibreSSL. Commenter 1 inquired about back-patching and compatibility with older OpenSSL versions. The proposer confirmed the need for back-patching and discussed the implications for older PostgreSQL branches (v14-master), initially suggesting to limit back-patching on v14 due to its older OpenSSL support. Commenter 2 tested the patch and found an issue with SSL tests failing due to OpenSSL 4.0 changing "ssl alert" to "tls alert" in error messages, which the proposer indicated might have been fixed in a later patchset. A core developer then weighed in, recommending back-patching to all branches, including v14, after the next minor releases, given that v14 still has two scheduled releases, allowing time to address any potential issues. The proposer accepted this plan and committed to preparing rebased patches for all branches.
Recent Replies
The proposer re-posted rebased versions of the patchset, which aim to address OpenSSL 4.0.0 compatibility, specifically for PostgreSQL versions 14 through master. This action aligns with the previously discussed plan to push the fix to all stable branches after the upcoming minor releases, ensuring broad compatibility.
May 19, 2026 21:18
Multi-Entry Indexing for GiST & SP-GiST Proposed 1 msgs May 20, 2026 17:44
View on pgsql-hackers archive →
Summary
The proposer has submitted a patch set introducing multi-entry indexing for GiST and SP-GiST access methods. This new functionality enables a single heap tuple to generate multiple index entries, akin to GIN's `extractValue`. The primary motivation is to enhance the precision of operators like `@>` and `<@` for composite data types such as multiranges, especially those with gaps, which currently suffer from numerous false positives. Additionally, it provides the first multirange opclass support for SP-GiST. The design integrates an optional `extractValue` support function (proc 13 for GiST, proc 8 for SP-GiST) that decomposes a datum into sub-entries during index insertion and building. During scans, a TID hash ensures result deduplication, and for KNN scans, an early filter is applied. The proposer also outlines semantic considerations for opclass authors, noting that consistent functions will process one sub-entry at a time, often necessitating `recheck=true` for accuracy.
Recent Replies
The latest message proposes multi-entry indexing for GiST and SP-GiST, allowing single heap tuples to produce multiple index entries. This aims to improve precision for operators on complex types like multiranges and introduces multirange support for SP-GiST, using a new `extractValue` support function to decompose values.
May 20, 2026 17:44
Prevent setting NO INHERIT on partitioned not-null constraints Proposed 1 msgs May 20, 2026 19:25
View on pgsql-hackers archive →
Summary
The proposer identified a bug where `NOT NULL` constraints on partitioned tables could be configured with `NO INHERIT` using `ALTER CONSTRAINT`, despite being disallowed during initial table creation. This inconsistency is deemed an oversight. To address this, a patch has been provided which introduces a check to prevent `ALTER TABLE ... ALTER CONSTRAINT ... NO INHERIT` on `NOT NULL` constraints for partitioned tables, ensuring that such operations are consistently rejected across both `CREATE TABLE` and `ALTER TABLE` statements. The proposer included SQL examples demonstrating the problematic behavior.
Recent Replies
The latest message by the proposer reports a bug where `NOT NULL` constraints on partitioned tables can be set to `NO INHERIT` via `ALTER CONSTRAINT`, which should be prevented. A patch is attached to add a check, aligning `ALTER CONSTRAINT` behavior with `CREATE TABLE` restrictions for such constraints.
May 20, 2026 19:25
[PATCH] Add reentrancy guards in ri_triggers.c Proposed 1 msgs May 20, 2026 13:14
View on pgsql-hackers archive →
Summary
The proposer identified a critical use-after-free bug within the `ri_triggers.c` module, specifically in `RI_FKey_cascade_del`. This vulnerability can lead to a segmentation fault when a DELETE operation is performed on a self-referential table that has `BEFORE DELETE` triggers which also delete rows from the same table. The issue arises during reentrant RI trigger execution if the plancache is invalidated, causing a freed Postgres plan to be used prematurely. To address this, the proposer submitted two patches: one introducing a test case to reliably reproduce the segmentation fault, and another implementing reentrancy guards in `ri_triggers.c`. These guards are designed to maintain a reference count for plans currently in execution, thereby preventing their premature deallocation.
Recent Replies
The proposer introduced two patches: the first adds a test case to reproduce a segmentation fault, and the second fixes `ri_triggers.c` by implementing reentrancy guards. These guards aim to prevent a use-after-free bug by maintaining a reference count for plans in execution, stopping them from being freed while still active during reentrant RI trigger calls.
May 20, 2026 13:14
Function scan FDW pushdown Patch Review 14 msgs Mar 18, 2026 12:08
View on pgsql-hackers archive →
Summary
The thread discusses a patch to enable function scan pushdown for Foreign Data Wrappers (FDW), specifically for PostgreSQL FDW. The initial patch was returned with feedback due to unresolved issues with `rte->functions` and an unfinished design. The proposer submitted an updated patch (v3), disallowing pushdown for functions returning complex types or with parameters. A reviewer tested v3 and v4, noting that pushdown was not observed in their tests due to planner cost estimation favoring local joins. The proposer explained the cost model, emphasizing that remote joins must be cheaper. Subsequent patch versions (v5, v6) addressed issues with deparsing whole-row variables for function RTEs and handling `postgresBeginForeignScan` for function RTEs. The discussion also involved restoring per-function metadata. The latest discussions focus on refining whole-row variable deparsing for nullable outer sides and correctly handling `fdw_private` data for base restrict infos, suggesting further complexity in the patch.
Recent Replies
The proposer identifies two new issues in the latest patch. First, it seems that `RTE RelOptInfo` is missing `fdw_private`, which impacts the classification of `baserestrictinfo` and might require passing `fpinfo` down to `foreign_expr_walker`. Second, the proposer highlights a suspicious plan where a function uses a parameter in its argument, which was previously forbidden. The proposer also points out a potentially redundant `rtekind` check.
May 20, 2026 10:17
The latest reply from commenter 2 addresses feedback on the revised patch. The commenter acknowledges and accepts a proposed fix for an issue in whole-row variable deparsing when dealing with nullable outer sides, which ensures correct handling of null values. Additionally, the commenter responds to a query about the possibility of `rtfuncdata` being NULL in `get_tupdesc_for_join_scan_tuples()`, indicating they believe it's not possible and suggesting an assertion for robustness, with an updated patch attached.
May 19, 2026 18:21
The proposer identifies two further issues in the latest patch. First, deparseColumnRef produces records from nulls instead of actual nulls when handling nullable outer sides for whole-row variables. Second, the proposer questions if get_tupdesc_for_join_scan_tuples() could receive NULL rtfuncdata when processing RTE_FUNCTION RTEs, indicating a potential gap in metadata handling for foreign function scan tuples.
May 19, 2026 15:25
[PATCH] Remove obsolete LISTEN array growth isolation test Proposed 1 msgs May 20, 2026 11:50
View on pgsql-hackers archive →
Summary
This thread proposes removing an obsolete test case related to the `LISTEN` array growth isolation. The test was identified as a leftover from a previous patch version for the `LISTEN/NOTIFY` optimization. The proposer indicated that a patch to remove this test would be submitted in a separate thread.
Recent Replies
The proposer submitted a small patch to remove an unnecessary test, specifically the 'LISTEN array growth isolation test', which was identified as obsolete by another developer.
May 20, 2026 11:50
[PATCH] Prevent repeated deadlock-check signals in standby buffer pin waits Patch Review 5 msgs Apr 19, 2026 05:46
View on pgsql-hackers archive →
Summary
This thread discusses a patch aimed at preventing repeated `RECOVERY_CONFLICT_BUFFERPIN_DEADLOCK` signals during standby buffer pin waits. The proposer observed that when `deadlock_timeout` fires in `ResolveRecoveryConflictWithBufferPin()`, the function repeatedly sends the deadlock-check signal without waiting, similar to a previously fixed issue in the lock-conflict path. The proposed solution involves resetting the `got_standby_deadlock_timeout` flag and calling `ProcWaitForSignal()` after the signal, allowing the startup process to wait for `UnpinBuffer()` instead of looping. Reviewer 1 and reviewer 2 generally approved the patch, classifying it as an improvement rather than a bug fix, suggesting it target the v20 release. Reviewer 1 also suggested a minor initialization for symmetry, which the proposer incorporated into a v2 patch, confirming its performance benefit by reducing signal broadcasts during testing. However, a commenter later questioned the classification as an 'improvement,' citing another report where a similar issue was considered a bug dating back to an earlier PostgreSQL version.
Recent Replies
The latest comment questions the classification of the proposed change as an "improvement" rather than a "bug fix." The commenter references another report that describes a similar issue as a bug existing in older PostgreSQL versions (pg15), suggesting that the current assessment of the patch's urgency or backpatching requirements might need reconsideration.
May 18, 2026 20:32
pg_recvlogical: honor source cluster file permissions for output files Committed 6 msgs May 15, 2026 14:59
View on pgsql-hackers archive →
Summary
This thread addresses a bug in `pg_recvlogical` where it failed to preserve group permissions on its output files, despite documentation stating otherwise. The issue stemmed from output files being created with a hard-coded mode rather than respecting the source cluster's group permissions. The proposer submitted a patch to use `pg_file_create_mode` and update the documentation. A reviewer provided a TAP test to verify the fix. The proposer then refined the TAP test to cover both scenarios: when group access is enabled and when it's disabled, ensuring `pg_recvlogical` correctly applies permissions (0640 vs 0600). The patch, including the improved test (for master branch), has been committed.
Recent Replies
The proposer confirms that the patch has been pushed. They also express gratitude to the reviewer for their contributions to the review and the TAP test.
May 20, 2026 07:04
A reviewer affirmed their approval of the revised TAP test, which now correctly covers both cases where group access is enabled and disabled. The reviewer also agreed with the proposer's plan to backpatch the core fix to all supported branches, but to include the new, more complex test only in the master branch.
May 18, 2026 11:59
The proposer, following up on a previous message, provides the revised TAP test patch. This patch now comprehensively checks `pg_recvlogical`'s behavior by verifying output file permissions under both group access enabled (mode 0640) and group access disabled (mode 0600) configurations, addressing a previous oversight.
May 18, 2026 10:48
COPY TO BLACKHOLE / pg_dump -j -Fb Proposed 1 msgs May 20, 2026 07:16
View on pgsql-hackers archive →
Summary
The proposer introduced a new feature proposal to add a `COPY <t> TO BLACKHOLE` command and a `pg_dump -Fb` format. The motivation stems from current inefficiencies in corruption checking using `COPY to /dev/null` or `verify_heapam()`, and the large disk space requirement for parallel `pg_dump -j` operations that demand a directory format. The `BLACKHOLE` target would discard data, providing a performance optimization over writing to `/dev/null` (benchmarked at 11-14% faster). The `pg_dump -Fb` option would allow parallel dumping without generating output files, thus saving significant disk space on large installations. The proposer is seeking community feedback on the usefulness of these changes.
Recent Replies
The latest reply, from the proposer, introduces the concept of `COPY <t> TO BLACKHOLE` and `pg_dump -Fb`. The proposer explains the benefits for corruption checking and parallel dumping, including benchmark results for `BLACKHOLE`, and clarifies that `pg_dump -Fb` would enable parallel backups without requiring disk space for output. The proposer also indicates that the patch is awaiting community feedback.
May 20, 2026 07:16
Improve conflict detection when replication origins are reused Discussing 8 msgs May 14, 2026 03:05
View on pgsql-hackers archive →
Summary
This thread addresses a critical false-negative conflict detection issue in logical replication. The problem arises when a `ReplOriginId` is reused after a subscription is dropped, causing a new subscription to incorrectly identify previously replicated changes as its own, thereby skipping conflict detection. The proposer introduced two approaches: 1) nullifying old origin IDs in `commit_ts` data on subscription drop, which is comprehensive but potentially expensive and not crash-safe without WAL logging; and 2) adding a creation timestamp to each replication origin and comparing it during conflict checks, deemed lightweight and crash-safe. Reviewers confirmed the problem's significance. A separate scenario involving publisher switching was clarified as outside the current replication model's scope. While LSN matching was considered as an alternative to timestamps, it would necessitate extending the `commit_ts` structure, making Approach 2 (timestamps) the more practical option currently under consideration.
Recent Replies
A reviewer confirmed the proposer's assessment regarding the LSN matching idea for conflict detection. The reviewer stated that the `TransactionIdGetCommitLSN()` function does not provide the exact commit LSN required, reinforcing that extending the `commit_ts` structure would be the sole method to implement an LSN-based approach.
May 20, 2026 04:07
The latest message from the proposer responds to a commenter's suggestion about using LSN matching for conflict detection instead of timestamps. The proposer agrees that LSN is a good idea but notes that it would likely require extending the `commit_ts` structure to include `origin_creation_lsn`, as there's no existing mechanism to extract a tuple's commit LSN during the application of changes.
May 19, 2026 13:38
The latest reply by commenter 1 reiterates the initial problem statement and the two proposed solutions from the proposer. It solidifies the understanding of the core issue related to `ReplOriginId` reuse and confirms the agreed-upon scope of the proposed fixes, refocusing the discussion on the initial proposal after clarifying a tangential scenario.
May 19, 2026 09:22
Fix incorrect size check in statext_dependencies_deserialize Committed 2 msgs May 19, 2026 14:29
View on pgsql-hackers archive →
Summary
The proposer identified a bug in the `statext_dependencies_deserialize()` function where an incorrect size validation check was being performed. Specifically, `SizeOfItem` was mistakenly used instead of `MinSizeOfItems`, leading to an erroneous calculation of the expected bytea size. The proposer noted that a similar function for ndistinct extended statistics correctly uses `MinSizeOfItems`, suggesting the issue was a typo. A reviewer confirmed the validity of the bug report, praised the discovery, and indicated that they would fix the issue.
Recent Replies
The reviewer acknowledged the proposer's identification of an incorrect size check in `statext_dependencies_deserialize()`, confirming it appeared to be a typo. The reviewer expressed appreciation for the bug report and stated their intention to implement the fix.
May 20, 2026 04:49
The proposer identifies an issue in statext_dependencies_deserialize() where SizeOfItem() is incorrectly used for bytea size validation instead of MinSizeOfItems. This results in an incorrect size calculation for multiple dependency items, which should be the header plus ndeps minimally-sized dependency items.
May 19, 2026 14:29
[BUG] Take a long time to reach consistent after pg_rewind Patch Review 3 msgs Apr 10, 2026 09:57
View on pgsql-hackers archive →
Summary
The proposer identified a bug in pg_rewind where a rewound standby node can take an unacceptably long time to reach a consistent state if the new primary is idle. This occurs because pg_rewind sets the minRecoveryPoint using pg_current_wal_insert_lsn(), which can point just past a WAL page header when the primary is idle. Consequently, the standby waits indefinitely for a new WAL record to be written by the primary to advance its lastReplayedEndRecPtr past this minRecoveryPoint. The proposer suggested using GetXLogInsertEndRecPtr() instead, or adjusting the minRecoveryPoint if it's just after a WAL page header. A reviewer reproduced the bug and confirmed the diagnosis, agreeing that fixing the producer (pg_rewind) by using GetXLogInsertEndRecPtr() is the cleaner solution to maintain consistency across how minRecoveryPoint is set and compared. The reviewer also suggested additional documentation and auditing for a defense-in-depth approach, and offered to provide a TAP test, emphasizing the liveness bug's importance for back-patching.
Recent Replies
The reviewer confirmed the bug on macOS, reproducing the described hang and LSN trace. The reviewer agreed with the underlying diagnosis that minRecoveryPoint is expected to be an end-LSN of a WAL record, a condition pg_rewind violates by using pg_current_wal_insert_lsn(). The reviewer recommended the original suggestion of using GetXLogInsertEndRecPtr() in pg_rewind as the primary fix and offered to create a TAP test.
May 19, 2026 21:20
[PATCH] Add contrib/anyarray: intarray-style operations and indexes for any array type Proposed 1 msgs May 20, 2026 02:24
View on pgsql-hackers archive →
Summary
A proposer introduced a new contrib module, `anyarray`, aiming to generalize `contrib/intarray` functionality for any array type with a default btree opclass. The initial submission contained the patch embedded in the email body, which commenter 1 noted, requesting a proper attachment.
Recent Replies
Commenter 1's latest reply informs the proposer that the patch needs to be attached to the email, rather than included in the message body, indicating an issue with the submission format.
May 20, 2026 02:24
Heads Up: cirrus-ci is shutting down June 1st Patch Review 18 msgs Apr 9, 2026 20:55
View on pgsql-hackers archive →
Summary
The proposer announced the imminent shutdown of Cirrus CI on June 1, 2026, which is used by cfbot and individual developers, necessitating an urgent replacement. The proposer outlined seven key considerations for a new CI system, including self-hosting, open-source nature, speed, multi-OS support, personal repository integration, and free access. Commenters largely agreed on the importance of enabling CI on personal repositories and the desirability of self-hosting and open-source solutions. There was also discussion about optimizing CI resource usage, particularly for small or inactive patches, while preserving the value of initial runs. Towards the deadline, one developer provided an initial GitHub Actions YAML file as a temporary solution to ensure CI continuity, acknowledging it's not the long-term goal. Another developer then offered to take over and refine this patch.
Recent Replies
The latest reply is from a reviewer who offered to take over and refine the proposed GitHub Actions patch. The reviewer attached their own work-in-progress version, noting differences in OS support and the use of helper scripts for future portability. The reviewer also reported success in enabling `io_uring` support, which was previously disabled, and plans to merge the two patches and address the absence of pre-built images.
May 18, 2026 22:27
Recognizing the urgent deadline of June 1st, the latest reply presents a functional GitHub Actions YAML file, developed with the help of an AI, which successfully achieves green builds across all systems previously supported by Cirrus CI. The proposer clarifies that this is an immediate, temporary solution, not a definitive long-term platform choice. They also highlight remaining tasks, such as re-enabling io_uring support, integrating pre-built images, and establishing CFBot integration, requesting community assistance to bring this 'patch' to a committable state.
May 18, 2026 21:22
VACUUM FULL or CREATE INDEX fails with error: missing chunk number 0 for toast value XXX Patch Review 1 msgs May 18, 2026 04:20
View on pgsql-hackers archive →
Summary
The proposer reported and provided detailed reproduction steps for a known bug where VACUUM FULL or CREATE INDEX can fail with "ERROR: missing chunk number 0 for toast value". The bug stems from a discrepancy in transaction horizon computation between a main table's VACUUM and its associated TOAST table's VACUUM. Specifically, ComputeXidHorizons for the main table respects local database transactions, preventing old tuples from being immediately removed. However, when the TOAST table is vacuumed later, an external transaction holding up the main table's horizon might have committed. With no other active processes in the same database, the TOAST VACUUM can wrongly determine an OldestXmin that allows the TOAST tuples to be removed. Subsequently, a CREATE INDEX on the main table, calculating its own OldestXmin (which now considers the external transaction), expects the RECENTLY_DEAD main table tuple's TOAST value to exist but finds it missing. The proposer developed a prototype patch that reuses the parent table's OldestXmin when vacuuming a TOAST table to ensure consistent horizons.
Recent Replies
The proposer detailed a reproduction method for a "missing chunk number 0 for toast value" error during VACUUM FULL or CREATE INDEX. The root cause is disparate transaction horizon calculations for a main table and its TOAST table, leading to premature deletion of TOAST data. A prototype patch was introduced to address this by ensuring the TOAST table's VACUUM reuses the parent table's OldestXmin, aiming for consistent tuple visibility.
May 18, 2026 04:20
relfilenode statistics Patch Review 25 msgs Jan 3, 2025 16:18
View on pgsql-hackers archive →
Summary
This thread discusses an improvement to PostgreSQL's statistics system, aiming to address inaccuracies in statistics after a crash recovery or failover. The core proposal is to key statistics by `relfilenode` instead of relation OID, which can change. Earlier ideas, such as storing OID to buffertag mapping, were dismissed due to recovery limitations. The main debate focuses on the design of the `PgStat_StatTabEntry` structure. Reviewer 1 suggested splitting it into table, index, and relfilenode specific fields from the outset to avoid complexity, particularly concerning partitioned tables and unnecessary data for autovacuum. The proposer, supported by reviewer 2, argues for an incremental approach, advocating for a unified structure initially and considering a split later, once WAL-replay-based stat population is implemented. The proposer believes the current patch (v16) adequately addresses technical concerns and is a necessary step that doesn't hinder future architectural changes, and is seeking a committer to drive it forward.
Recent Replies
The latest message from the proposer summarizes the current state of the patch (v16), addressing previous concerns from reviewer 1 regarding stat copying and structure splitting. The proposer reiterates support for an incremental design, explaining it unblocks future work and allows for better-informed decisions on a split. The message explicitly asks reviewer 2 about committing the patch and reviewer 1 about continued review.
May 18, 2026 16:28
Adding REPACK [concurrently] Rejected 22 msgs Apr 27, 2026 04:25
View on pgsql-hackers archive →
Summary
This thread discusses the implementation of 'REPACK CONCURRENTLY', particularly focusing on the use of database-specific snapshots within the logical decoding mechanism. Initial concerns were raised about a plugin's declaration of not using shared catalogs, which led to a broader discussion about potential indirect breakages. The proposer identified a critical issue where the snapshot builder's transaction processing could incorrectly consider committed transactions as running when using database-specific snapshots, leading to lost data effects. A reviewer provided a clear method to reproduce this WAL ordering problem. Further architectural concerns were raised by another commenter regarding the fundamental mismatch between database-specific snapshots and the cluster-wide design of logical decoding, citing inefficiencies and limitations, such as incompatibility with standby servers. Due to these significant architectural challenges and the limited time before beta 1, a core developer decided to revert the database-specific snapshot aspect of 'REPACK CONCURRENTLY' for the current release (PostgreSQL 19), with the intention to revisit and redesign the feature for a future release (PostgreSQL 20).
Recent Replies
The reviewer acknowledges the architectural concerns regarding the interaction between database-specific snapshots and the cluster-wide logical decoding machinery. Given the scarcity of time before beta 1, the reviewer agrees that it is prudent to revert the database-specific snapshot functionality for 'REPACK CONCURRENTLY' in the current release. The feature will be reconsidered for a future version after a more thorough architectural review.
May 19, 2026 18:52
The latest reply by reviewer 1 highlights fundamental architectural issues with the current implementation of database-specific snapshots in logical decoding. The reviewer pointed out inefficiencies like tracking cluster-wide XIDs for db-specific snapshots and the general mismatch with the cluster-wide design of logical decoding. Given these concerns and the time constraints, the reviewer reiterated the suggestion to revert this feature for the current release and re-evaluate its design in future development cycles.
May 14, 2026 07:02
The latest reply from reviewer 1 acknowledges the significant concerns raised by commenter 2 regarding db-specific snapshots in logical decoding, including its inefficiencies and limitations on standbys. The reviewer outlines two paths forward: either accept the current patch with further fixes for inefficiencies or revert the db-specific snapshots part for the current release and revisit it later. The reviewer also questions the practical impact of the standby limitation for the REPACK operation.
May 13, 2026 16:58
Fix typo 586/686 in atomics/arch-x86.h Committed 21 msgs Nov 28, 2025 08:44
View on pgsql-hackers archive →
Summary
This thread originated from the proposer identifying a typo in `src/include/port/atomics/arch-x86.h` (`__i568__`, `__i668__` instead of `__i586__`, `__i686__`). Initial discussions questioned whether to fix the typo or remove the code entirely, given its long-standing presence without issues. Investigation revealed inconsistent compiler behavior for 32-bit builds across different Linux distributions regarding these macros. Ultimately, the consensus shifted away from fixing the typo to removing the problematic 32-bit specific code altogether, as performance work for 32-bit builds was deemed a low priority. The committer agreed to apply the removal patch, with a separate fix for 64-bit MSVC detection to be addressed later.
Recent Replies
The latest message from the committer confirms that the patch has been committed. This signifies the successful resolution of the issue by removing the identified 32-bit specific code, concluding the discussion.
May 18, 2026 16:17
Review observations for partial REFRESH MATERIALIZED VIEW patc Patch Review 3 msgs May 19, 2026 05:42
View on pgsql-hackers archive →
Summary
This thread centers on a review of a patch introducing partial refreshes for materialized views using a WHERE clause. The reviewer raised several concerns regarding the patch's concurrency semantics. Key issues included potential deadlock scenarios arising from the proposed FOR UPDATE + single-CTE approach, particularly in cases of UPSERT conflicts. The reviewer also noted that the CONCURRENTLY behavior for WHERE refreshes appeared counter-intuitive, seemingly making the non-concurrent path more permissive for writers, which deviates from established REFRESH MATERIALIZED VIEW semantics. Documentation for intended guarantees around overlapping partial refreshes and concurrent DML on base tables was also suggested. Despite the valuable use case identified for high-churn refresh workloads, the subsequent messages in the thread did not address these technical points, instead focusing on administrative guidance for the reviewer regarding proper mailing list etiquette, specifically how to reply-all to the original thread.
Recent Replies
The latest reply corrects a previously provided link. Commenter 1, who had earlier instructed the reviewer on the correct procedure for replying to the original thread, updated the link to the archived email, ensuring the reviewer could properly follow the established mailing list protocol. This message is purely administrative and does not contribute to the technical discussion of the patch.
May 19, 2026 10:04
The reviewer provided observations on the `REFRESH MATERIALIZED VIEW ... WHERE` patch, raising concerns about concurrency semantics. The reviewer questioned potential deadlock scenarios with overlapping refreshes and UPSERT conflicts, and found the `CONCURRENTLY` behavior unintuitive. The reviewer also suggested documenting the guarantees for overlapping partial refreshes and concurrent DML on base tables.
May 19, 2026 05:42
[Bug]Assertion failure in LATERAL GRAPH_TABLE with multi-label pattern Patch Review 4 msgs May 7, 2026 04:13
View on pgsql-hackers archive →
Summary
This thread addresses an assertion failure encountered when using LATERAL GRAPH_TABLE with patterns matching multiple path queries. The proposer identified the bug, occurring in create_lateral_join_info when GRAPH_TABLE is used with UNION ALL for multi-label patterns, leading to !bms_is_member(rti, lateral_relids) assertion. The root cause was traced to rewriteGraphTable() bumping outer Vars for the initial subquery, but generate_setop_from_pathqueries() failing to bump Vars again when wrapping each path query in further subquery RTEs for the UNION ALL operation. This caused the lateral reference to incorrectly collapse onto the GRAPH_TABLE's own RTE. The proposed fix involves incrementing the sublevels_up for Vars within each lquery before it's wrapped in an RTE_SUBQUERY. A reviewer provided feedback on code comments, requested a clearer explanation of the connection between varlevelsup, subquery RTE addition, and the assertion failure, and suggested refining the provided test cases.
Recent Replies
The latest message is from a reviewer, indicating continued review of the patch. The content is truncated, but it's a direct response to the proposer's earlier clarifications regarding multi-line comments and the necessity of specific test cases. It implies ongoing discussion and refinement of the patch based on the review feedback.
May 19, 2026 15:15
The proposer acknowledges the feedback from reviewer 1 regarding the submitted patch. Reviewer 1 had previously provided detailed comments, suggesting improvements to the commit message's explanation of the bug's connection between `varlevelsup` and `RTEs`, and recommending a consolidation of the proposed tests. The latest reply from the proposer is a simple acknowledgement of these points, without further technical detail or a revised patch yet.
May 12, 2026 17:41
The reviewer provided feedback on the patch, suggesting an improved comment for the `IncrementVarSublevelsUp` call to clarify its purpose. The reviewer also requested a detailed explanation in the commit message about how `varlevelsup` relates to subquery RTEs and the observed assertion failure. Additionally, the reviewer advised removing one of the two test cases and relocating the remaining one to an appropriate section for lateral references.
May 12, 2026 11:15
Sequence Access Methods, round two Patch Review 44 msgs Feb 18, 2025 05:11
View on pgsql-hackers archive →
Summary
This thread discusses the implementation of Sequence Access Methods in PostgreSQL, allowing custom sequence generation. The proposer introduced several patch versions, with v11 being the first in the visible messages and v28/v29 later. A reviewer provided detailed feedback on v26, covering documentation clarity, header file ordering, handling of unlogged sequences, use of default constants, and macro design, to which the proposer largely responded. Another reviewer later rebased the patch set, offering comments on a snowflake sequence implementation and performance concerns related to function pointers. The proposer noted a lack of wider developer enthusiasm, leading to the patch being dropped from the commitfest, though he still supports the design. The latest exchanges include the second reviewer providing benchmark results for v29, indicating a slight performance improvement over the baseline, and suggestions for further optimization regarding cache lookups. The core idea is to enable extensible sequence generation, which is seen as crucial for distributed applications.
Recent Replies
The latest reply from reviewer 1 presents benchmark results for patch v29. Using both a simple `generate_series` count and `pgbench` for unlogged table insertions, the reviewer found a slight performance improvement (around +0.79% mean tps for pgbench) with the patched version compared to the baseline. The reviewer notes that their hardware might not be sensitive enough for detecting overhead and provides scripts for exact test restoration.
May 19, 2026 13:11
The latest reply from reviewer 2 acknowledges the proposer's stance regarding the lack of enthusiasm from other core developers for the patch set. Despite this, reviewer 2 reiterates a previous suggestion about optimizing the code by avoiding unnecessary cache lookups, implying potential performance improvements could still be explored for the proposed feature.
May 18, 2026 18:42
The proposer reaffirmed that the patch set was withdrawn from the commit fest due to an explicit lack of feedback and enthusiasm from other core developers, suggesting a general disinterest in the proposal. The proposer also acknowledged the importance of benchmarking for worst-case scenarios in performance-critical code paths.
May 17, 2026 22:43
Support EXCEPT for TABLES IN SCHEMA publications Patch Review 34 msgs Apr 14, 2026 06:30
View on pgsql-hackers archive →
Summary
This thread proposes to extend the `EXCEPT` clause functionality to `TABLES IN SCHEMA` publications, similar to its existing use with `FOR ALL TABLES`. The goal is to provide users with a convenient way to exclude specific tables from schema-level publications without resorting to explicit `FOR TABLE` lists, which require manual updates. The proposer outlined a syntax for `CREATE`, `ALTER ADD`, and `ALTER SET` publication commands. Key rules include schema-qualification for excluded tables and ensuring they belong to the published schema. Early discussions focused on the syntax, particularly regarding 'mixed style' `EXCEPT` clauses (applying to multiple schemas in a single command). The proposer initially allowed this for convenience but later revised the approach to restrict `EXCEPT` to its adjacent schema clause to reduce complexity and confusion. The proposed changes are delivered in a series of three patches addressing different command types and related cleanup. Reviewers have provided detailed feedback on documentation, code logic, error messages, and `pg_dump` integration, to which the proposer has been responsive, providing updated patch versions.
Recent Replies
In the latest reply, the proposer addresses a reviewer's comments on the v5-0001 patch. The proposer clarifies the logic behind freeing `schemaRels` only in the `EXCEPT` case to prevent memory corruption. They also explain the design choice in `gram.y` for handling the `EXCEPT` clause in multi-schema continuation scenarios, emphasizing the intent to collect the `EXCEPT` list and explicitly raise an error if a table publication object contains an `EXCEPT` list, rather than silently ignoring it.
May 19, 2026 11:14
The latest reply from the proposer addresses recent review comments on patch v5-0001. The proposer clarifies why certain assertions did not fail in earlier patches, explaining that the relevant function was not yet being called. The proposer also agrees to incorporate a suggestion to use `GetExcludedPublicationTables` instead of `get_publication_relations` and to update an associated assertion in the first patch. The proposer confirms that all remaining comments will be addressed in the next patch iteration.
May 17, 2026 01:32
The proposer responded to the latest round of review comments for patch v5-0001, agreeing to most of the suggestions. These included updating an assert related to schema publications in `GetExcludedPublicationTables` and making other indicated changes to documentation, naming conventions, and error messages. The proposer also clarified that earlier patches did not call the function in question, which explained why certain tests passed without the assert being modified previously.
May 15, 2026 13:32
COPY FROM ON_ERROR SET_NULL bypasses domain NOT NULL with partial column list Committed 5 msgs Apr 16, 2026 17:09
View on pgsql-hackers archive →
Summary
This thread addresses a critical bug in the `COPY FROM ON_ERROR SET_NULL` command. The proposer identified that when a partial column list was used, particularly targeting higher-numbered columns, the system would incorrectly handle `NOT NULL` constraints on domain types. This led to an out-of-bounds read in `copyfromparse.c`, silently inserting `NULL` values into columns that should have enforced a `NOT NULL` constraint. The proposed solution involved correctly allocating the `domain_with_constraint[]` array using `num_phys_attrs` and indexing it with `attnum - 1`, ensuring consistency with other per-column arrays and proper constraint checking. A new test case was also included to cover the specific scenario. The fix was reviewed positively by multiple participants, with one reviewer noting they had independently found the same bug and developed a similar fix. The patch was subsequently committed.
Recent Replies
The committer acknowledged the positive review from a commenter, who had independently discovered the same bug. Following this, the committer confirmed that the patch addressing the incorrect `NOT NULL` bypass during `COPY FROM` operations has been successfully pushed, finalizing the resolution of the bug.
May 19, 2026 01:13
The commenter confirms that they had independently discovered and reported the same bug. They noted that the proposed patch's code changes are identical to their own solution, although the accompanying test case is slightly different but still effective.
May 18, 2026 22:27
The latest reply, from reviewer 2, affirms that the patch addresses the identified bug effectively. The reviewer confirms that the solution is sound and, without further objections, plans to commit the patch to the codebase.
May 18, 2026 13:22
[PATCH] Rebuild CHECK constraints after generated column SET EXPRESSION Patch Review 11 msgs May 11, 2026 09:58
View on pgsql-hackers archive →
Summary
The proposer identified a bug where `ALTER TABLE ... ALTER COLUMN ... SET EXPRESSION` failed to rebuild `CHECK` constraints that referenced a generated column using a whole-row `Var`, potentially leaving the table in an inconsistent state. The proposer's initial patch aimed to rebuild all `CHECK` constraints. Commenter 1 then expanded the scope to include whole-row references in indexes and RLS policies, demonstrating a more comprehensive solution across several patch versions. Discussion revolved around the detailed implementation, appropriate error messages, and whether to disallow `SET EXPRESSION` for whole-row policy references. Through several iterations, the patch was refined to correctly revalidate `CHECK` constraints and rebuild indexes, while safely ignoring whole-row policy references for `SET EXPRESSION` as they do not require action. The latest review confirmed the patch's effectiveness and correct behavior.
Recent Replies
The latest reviewer confirmed that the most recent patch (v5) applied cleanly and built successfully. The reviewer validated that the patch effectively resolves the reported issue, specifically by ensuring that `ALTER COLUMN SET EXPRESSION` correctly fails when existing whole-row `CHECK` constraints would be violated, rather than silently succeeding. The reviewer concluded that both the fix and its associated regression coverage are satisfactory.
May 19, 2026 05:31
In the latest reply, the original proposer acknowledges that the v5 patch successfully addresses the previous concerns regarding policy handling by correctly ignoring whole-row policy references for `SET EXPRESSION`. The proposer indicates that they have no further comments, signifying their approval of the current patch version.
May 16, 2026 07:18
The latest reply from the reviewer confirms that policy objects containing whole-row variable references can be safely ignored for `AT_SetExpression`, addressing a key concern raised by the proposer. The reviewer also clarifies that the function signature for `RememberWholeRowDependentForRebuilding()` is maintained for potential future compatibility with other `ALTER TABLE` commands.
May 16, 2026 06:07

Recent Replies

Started
Rename Postgres 19 to Postgres 26 (year-based)? Discussing 2 msgs May 21, 2026 14:20
The latest reply from a commenter supports the idea of year-based versioning. The commenter draws parallels with macOS and Ubuntu, which use similar schemes, and also suggests that giving each major release a name could be an interesting additional feature.
May 21, 2026 15:18
Avoid leaking system path from pg_available_extensions Patch Review 4 msgs May 20, 2026 01:00
The latest reply is from a reviewer who confirmed they reproduced the issue and verified that the provided patch correctly addresses the bug. This indicates agreement on the problem and the proposed solution.
May 21, 2026 15:12
[PATCH] Release replication slot on error in SQL-callable slot functions Patch Review 4 msgs May 9, 2026 20:45
The latest reply is from the proposer, acknowledging the feedback received from the reviewers. The message is truncated, suggesting they are in the process of responding to the points raised, which included concerns about temporary slots and other related functions needing similar fixes.
May 21, 2026 14:38
Rename Postgres 19 to Postgres 26 (year-based)? Discussing 2 msgs May 21, 2026 14:20
The proposer initiates a discussion by suggesting that PostgreSQL's major version numbering be changed from a sequential system (e.g., 19) to a year-based one (e.g., 26 for 2026). The primary goal is to enhance memorability for users managing various database versions, providing a clearer indication of a version's release year and how current it is.
May 21, 2026 14:20
Fix pg_stat_wal_receiver to show CONNECTING status Patch Review 10 msgs May 19, 2026 05:55
The proposer apologizes for missing attachments in the previous message and states that the new patch addressing the `conninfo` leak is now attached for review. This patch aims to prevent the leak in the WAL receiver reuse path, a bug discovered during the review of earlier proposed changes to `pg_stat_wal_receiver`.
May 21, 2026 12:29
Pg upgrade bug with NOT NULL NOT VALID Proposed 1 msgs May 21, 2026 12:14
The proposer outlined a bug in `pg_upgrade` where an explicitly defined `NOT NULL NOT VALID` constraint conflicts with an implicitly generated one, causing `pg_restore` to fail with a "constraint already exists" error. They proposed a solution to rename the implicitly created `NOT NULL` constraints and offered to provide a patch.
May 21, 2026 12:14
Fix pg_stat_wal_receiver to show CONNECTING status Patch Review 10 msgs May 19, 2026 05:55
The proposer identified a new bug related to a `conninfo` leak in the WAL receiver reuse path, providing a diff to demonstrate it. They proposed a solution to copy primary connection information to `walrcv->conninfo` only when switching to `WALRCV_STARTING`, preventing the leak during the `WALRCV_WAITING` reuse path. The reviewer acknowledged the bug as legitimate and requested a patch for it, noting its impact on stable branches.
May 21, 2026 12:08
Proposal: Conflict log history table for Logical Replication Patch Review 59 msgs May 5, 2026 05:25
The latest reply, from commenter 1, offers three specific comments on the v36-008 and v36-009 documentation patches. Commenter 1 suggests rephrasing text to clarify "conflict attempt" and better describe the "local_conflicts" JSON array. Commenter 1 also advises specifying that the `conflict_log_destination` parameter *only* creates a table when set to 'table' or 'all', and recommends linking the term "Conflicts" to the relevant chapter in the documentation for improved clarity.
May 21, 2026 10:39
Adding pg_dump flag for parallel export to pipes Patch Review 24 msgs Apr 7, 2025 17:16
The latest reply from the proposer focuses on refining the patch for better compatibility, specifically addressing how pipe commands are quoted within the Windows test suite. This indicates an ongoing effort to ensure the robustness and cross-platform functionality of the proposed `--pip` feature for `pg_dump` and `pg_restore`.
May 21, 2026 09:56
synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication Patch Review 77 msgs Feb 24, 2026 22:08
The proposer acknowledges a bug reported by a reviewer regarding duplicate entries not being filtered in priority configurations for `synchronized_standby_slots`. The proposer confirms this is a valid issue and commits to addressing it in the next version of the patch.
May 21, 2026 09:12
Avoid leaking system path from pg_available_extensions Patch Review 4 msgs May 20, 2026 01:00
A reviewer confirms the existence of the problem described by the proposer and verifies that the provided patch successfully fixes the issue. The reviewer indicates that the patch "looks good".
May 21, 2026 08:55
Set notice receiver before libpq connection startup Discussing 5 msgs May 20, 2026 07:21
The proposer agreed to the reviewer's suggestion of splitting the connection function into start and complete phases. The proposer indicated they would proceed with the suggested refactoring, acknowledging its generality for handling various connection-time settings, not just notice receivers.
May 21, 2026 07:26
Fix pg_stat_wal_receiver to show CONNECTING status Patch Review 10 msgs May 19, 2026 05:55
The proposer identified a potential conninfo leak in the WAL receiver reuse path, even with the v2 patch. The proposer outlined a specific sequence of WAL receiver states (WAITING -> RESTARTING -> CONNECTING) where conninfo could be copied into walrcv->conninfo before it is cleared by v2, leading to a temporary leak if the ready_to_display flag is then set to true.
May 21, 2026 07:20
Proposal: Conflict log history table for Logical Replication Patch Review 59 msgs May 5, 2026 05:25
A reviewer provided further review comments, confirming that a commit message update for the conflict log table name was handled in an earlier patch. The reviewer also re-affirmed that the current approach of checking for `operation != CMD_DELETE` in `execMain.c` to enforce DML restrictions on conflict log tables is acceptable, even with `TRUNCATE` handled as a separate utility command.
May 21, 2026 07:13
[PATCH] Release replication slot on error in SQL-callable slot functions Patch Review 4 msgs May 9, 2026 20:45
A reviewer confirmed that the issue extends to `pg_logical_slot_get_changes`, providing a specific reproduction scenario. This indicates that the proposed fix may need to cover additional SQL-callable functions beyond those initially considered, broadening the scope of the problem to be addressed.
May 21, 2026 06:49
Proposal: Conflict log history table for Logical Replication Patch Review 59 msgs May 5, 2026 05:25
The latest reply from commenter 1 raises a strategic concern regarding patch 007's logic for preserving subscription OIDs. Commenter 1 notes that this functionality is needed by another ongoing thread and had been previously rejected as a standalone effort. Commenter 1 suggests extracting this specific feature into its own, separate thread to avoid making it a dependency of the current patch set, promoting better modularity and addressing its broader implications.
May 21, 2026 06:01
PSQL - prevent describe listing tables that are already in listed schemas Discussing 11 msgs May 18, 2026 03:20
The latest reply from commenter 1 confirms that all comments and concerns have been addressed in the latest patch version (v6). Commenter 1 also states their intention to mark the commitfest entry as 'Ready for Committer,' signaling that the proposed changes are now deemed complete and approved for inclusion.
May 21, 2026 05:53
RFC: Allow EXPLAIN to Output Page Fault Information Patch Review 42 msgs Dec 24, 2024 08:53
The latest reply from reviewer 2 acknowledges the usefulness of the EXPLAIN storage I/O patch but raises continued concerns about the potential for misleading values when I/O is handled asynchronously or by worker processes, as `getrusage()` may not capture all activity. Reviewer 2 suggests that the documentation should clarify that the reported numbers represent "backend-observed synchronous storage I/O" rather than total query I/O to prevent misinterpretation, indicating that further refinements are needed.
May 21, 2026 05:38
[Patch] Add WHERE clause support to REFRESH MATERIALIZED VIEW Patch Review 10 msgs Dec 8, 2025 20:58
The latest commenter, a reviewer, provided feedback on the updated patch, questioning the safety of the `FOR UPDATE + single-CTE` approach for overlapping refreshes due to potential deadlocks. They also reiterated concerns about the potentially unintuitive behavior of the `CONCURRENTLY` keyword when combined with a `WHERE` clause. The reviewer emphasized the value of the feature for high-churn scenarios and requested clearer documentation of the concurrency guarantees.
May 21, 2026 05:17
Set notice receiver before libpq connection startup Discussing 5 msgs May 20, 2026 07:21
The latest message is a brief acknowledgment from the proposer to the reviewer, confirming receipt of the feedback. It indicates that the discussion on the design approach is ongoing, with the proposer having agreed to the reviewer's suggestion of splitting the connection function into start and complete phases rather than using dedicated wrapper functions.
May 21, 2026 05:03
Proposal: Conflict log history table for Logical Replication Patch Review 59 msgs May 5, 2026 05:25
The latest message provides minor review comments for documentation patches (v37-0008/0009). The reviewer suggested aligning the order of columns in the documentation's table with the actual CLT column order. Additionally, for the v37-0003/0004 patches, trivial capitalization changes for `OWNER TO` in `ALTER SUBSCRIPTION` statements within test scripts were suggested.
May 21, 2026 04:57
[PATCH] Fix LISTEN startup race with direct advancement Patch Review 5 msgs May 19, 2026 20:37
The proposer acknowledged the feedback from a reviewer regarding a duplication in the test files. A new version of the patches will be prepared, ensuring that the test for the missed notification and the test for the already-seen work are distinct, and that the fix patch contains only the core solution.
May 21, 2026 04:49
Proposal: Conflict log history table for Logical Replication Patch Review 59 msgs May 5, 2026 05:25
The latest reply from reviewer 1 provides feedback on the documentation patches for v37. The reviewer suggests verifying and updating the column order specified in the `logical-replication.sgml` documentation table. This is to ensure that the documented column order for the conflict log table accurately reflects the schema defined in the most recent `conflict.c` file, emphasizing the importance of documentation consistency.
May 21, 2026 03:59
Set notice receiver before libpq connection startup Discussing 5 msgs May 20, 2026 07:21
The latest reply from the proposer is a response to the reviewer's suggestion. Although truncated, it appears to be engaging with and discussing the reviewer's proposed alternative solution, which involves splitting the connection function into start and complete phases for a more generalized approach to setting up connection parameters, including the notice receiver.
May 21, 2026 02:09
Proposal: Conflict log history table for Logical Replication Patch Review 59 msgs May 5, 2026 05:25
The reviewer provides feedback on the `drop_conflict_log_table` function in the latest patch. The reviewer suggests renaming it to `drop_subscription_dependencies` to accurately reflect its functionality of dropping all subscription dependencies via cascade, rather than just the conflict log table. The reviewer also recommends clarifying in the function comment that `PERFORM_DELETION_SKIP_ORIGINAL` ensures the parent subscription object is not deleted during the process.
May 21, 2026 01:19
Patch for bind message regarding the number of parameters and result column format codes Proposed 1 msgs May 21, 2026 01:12
The proposer initiates the thread by highlighting a documentation inaccuracy. The counts for parameter format codes, parameter values, and result-column format codes in bind messages are documented as signed integers but are actually unsigned integers in the source code. A patch is proposed to correct this documentation error.
May 21, 2026 01:12
Proposal: Conflict log history table for Logical Replication Patch Review 59 msgs May 5, 2026 05:25
In the latest reply, reviewer 2 addresses a point raised by commenter 2 regarding the hardcoded pg_conflict schema name and its immutability. Reviewer 2 highlights that attempting to rename even pg_catalog results in similar functional breakdowns, suggesting that the behavior might be a general characteristic for system-managed schemas rather than a specific issue with the proposed schema's error message.
May 21, 2026 00:02
PSQL - prevent describe listing tables that are already in listed schemas Discussing 11 msgs May 18, 2026 03:20
In the latest message, the proposer confirms the efficacy of new tests in a recent patch version and agrees with reviewer 1's suggestion to include a PG15 version check. This check is deemed a cautious measure to prevent internal SQL errors on older server versions, even if PG14 reaches end-of-life before the feature's release. The proposer has submitted patch v6 with these changes.
May 20, 2026 23:34
Fix SPLIT PARTITION bound-overlap bug and other improvements Patch Review 19 msgs May 13, 2026 04:38
The latest reply by the proposer (Message 13) acknowledges the reviewer's action of committing patches 0001-0003. The proposer also confirms their understanding regarding the collation issue that was discussed for the remaining patch (0004), which the reviewer had revised.
May 20, 2026 23:22
Fix pg_stat_wal_receiver to show CONNECTING status Patch Review 10 msgs May 19, 2026 05:55
The latest reply from the proposer (Message 7) indicates agreement with the reviewer's proposed patch (v2) after receiving further explanations, particularly concerning the handling of connection information. While still having minor reservations about displaying timestamp fields, the proposer expressed being "fine with that" and suggested adding a brief description in the documentation to clarify their meaning during the CONNECTING state.
May 20, 2026 23:06
Improve pg_stat_statements scalability Patch Review 4 msgs May 11, 2026 23:53
The latest reply from the proposer (Message 4) addresses a CI failure encountered on FreeBSD with parallel query execution. The proposer describes the fix, which involves modifying the test setup and marking relevant pg_stat_statements functions as PARALLEL RESTRICTED to ensure stats are correctly accumulated by the leader process. The proposer also briefly questioned the implications of these changes for older versions.
May 20, 2026 22:59
Add pg_get_publication_ddl function Patch Review 9 msgs Jan 11, 2026 11:20
The latest reply from reviewer 1 clarifies a previous comment regarding 'pretty' output containing '+' characters. The reviewer explains that these characters are artifacts added by `psql` to indicate line continuations and are not an issue with the patch's output, thus withdrawing that specific criticism of the v2 patch.
May 20, 2026 22:27
Fix SPLIT PARTITION bound-overlap bug and other improvements Patch Review 19 msgs May 13, 2026 04:38
The latest messages, though truncated, indicate reviewer 1's continued engagement on the final patch (0004). Previously, reviewer 1 confirmed committing patches 0001-0003 and provided a revised version of 0004, incorporating additional regression tests and addressing the collation-related concerns raised by the proposer. This reflects ongoing efforts to finalize the solution for preventing degenerate split partition operations.
May 20, 2026 21:17
Fix pg_stat_wal_receiver to show CONNECTING status Patch Review 10 msgs May 19, 2026 05:55
In the latest reply, reviewer 1 reiterated the effectiveness of their proposed v2 patch, emphasizing that the `ready_to_display` flag's purpose is maintained. The reviewer argued that displaying initialized timestamp values is acceptable and useful for understanding the WAL receiver's early state. The reviewer concluded that v2 sufficiently addresses the issue of showing the `CONNECTING` status without introducing undue confusion, affirming its suitability.
May 20, 2026 20:43
Feature request: Native nanosecond precision support for temporal types Proposed 1 msgs May 20, 2026 20:25
The proposer introduces a feature request for native nanosecond precision support for PostgreSQL's temporal types. They explain that current limitations force complex workarounds and that native support would provide a more robust, integrated, and standardized solution, aligning PostgreSQL with modern analytical and financial data requirements.
May 20, 2026 20:25
[PATCH] Fix REPACK decoding worker not cleaned up on FATAL exit Committed 7 msgs May 12, 2026 23:26
The committer responded to a question from commenter 1 regarding the `shm_mq_detach()` call. They pointed out that the `shm_mq_attach()` documentation implies automatic detachment of the queue when the dynamic shared memory segment is detached, questioning the necessity of an explicit `shm_mq_detach()` call, but offered to restore it if necessary.
May 20, 2026 20:13
Prevent setting NO INHERIT on partitioned not-null constraints Proposed 1 msgs May 20, 2026 19:25
The latest message by the proposer reports a bug where `NOT NULL` constraints on partitioned tables can be set to `NO INHERIT` via `ALTER CONSTRAINT`, which should be prevented. A patch is attached to add a check, aligning `ALTER CONSTRAINT` behavior with `CREATE TABLE` restrictions for such constraints.
May 20, 2026 19:25
amcheck support for BRIN indexes Patch Review 25 msgs Apr 22, 2025 09:05
The latest reply from the proposer acknowledges the successful testing report from reviewer 2. The proposer clarifies that the need to run `ALTER EXTENSION amcheck UPDATE` after applying the patch is expected when an existing `amcheck` installation is being updated, and does not indicate an issue with the patch itself.
May 20, 2026 17:55
Multi-Entry Indexing for GiST & SP-GiST Proposed 1 msgs May 20, 2026 17:44
The latest message proposes multi-entry indexing for GiST and SP-GiST, allowing single heap tuples to produce multiple index entries. This aims to improve precision for operators on complex types like multiranges and introduces multirange support for SP-GiST, using a new `extractValue` support function to decompose values.
May 20, 2026 17:44
[PATCH] Fix LISTEN startup race with direct advancement Patch Review 5 msgs May 19, 2026 20:37
The latest reply from commenter 1 reiterated a query regarding the similarity between two of the provided test patches (0001 and 0003). Despite earlier clarification from the proposer about differing injection points, commenter 1 pointed out that the test specification files themselves appeared identical, seeking further explanation for this observation.
May 20, 2026 17:27
Deadlock detector fails to activate on a hot standby replica Patch Review 3 msgs Jan 19, 2026 12:43
The latest reply from a reviewer provides constructive feedback on the proposed patch. The reviewer suggests reordering includes, rephrasing a comment about `ProcWaitForSignal` wake-ups for accuracy, recommending a more explicit check for the waiter status using `BM_PIN_COUNT_WAITER` and `wait_backend_pgprocno`, and proposing a simplified control flow for the main waiting loop to improve readability.
May 20, 2026 16:26
[PATCH] Add reentrancy guards in ri_triggers.c Proposed 1 msgs May 20, 2026 13:14
The proposer introduced two patches: the first adds a test case to reproduce a segmentation fault, and the second fixes `ri_triggers.c` by implementing reentrancy guards. These guards aim to prevent a use-after-free bug by maintaining a reference count for plans in execution, stopping them from being freed while still active during reentrant RI trigger calls.
May 20, 2026 13:14
Implement waiting for wal lsn replay: reloaded Committed 41 msgs Jan 27, 2026 01:14
The reviewer confirms that they have added comments for new functions in patch 0006 and proposes to push the patchset, acknowledging that while some aspects might still be missing, the current version significantly improves many areas. The proposer then reviewed the patchset and identified a potential issue in a test for patch 5, which was subsequently fixed, with other parts of the patchset deemed acceptable.
May 20, 2026 12:16
amcheck support for BRIN indexes Patch Review 25 msgs Apr 22, 2025 09:05
A reviewer confirms that the patch applied successfully and built without issues. They verified that the `brin_index_check()` function became available and worked as expected after updating the `amcheck` extension, and that some basic BRIN index validation tests passed.
May 20, 2026 12:15
[PATCH] Remove obsolete LISTEN array growth isolation test Proposed 1 msgs May 20, 2026 11:50
The proposer submitted a small patch to remove an unnecessary test, specifically the 'LISTEN array growth isolation test', which was identified as obsolete by another developer.
May 20, 2026 11:50
Optimize LISTEN/NOTIFY Committed 27 msgs Nov 13, 2025 06:36
The proposer acknowledges a reviewer's finding that a test case in `async-notify.spec` is obsolete due to changes in `ChannelHashAddListener()`. The proposer indicates they will prepare a separate patch to remove this outdated test.
May 20, 2026 11:47

Threads from the Past 1 Week (New or Updated)

Started
Rename Postgres 19 to Postgres 26 (year-based)? Discussing 2 msgs May 21, 2026 14:20
View on pgsql-hackers archive →
Summary
The proposer suggests changing PostgreSQL's major versioning scheme from a sequential integer (e.g., Postgres 19) to a year-based one (e.g., Postgres 26 for 2026). The primary motivation is to make it easier for users to quickly determine the age of a running PostgreSQL instance, as the project has a stable annual release cycle. The proposer believes aligning the version number with the last two digits of the release year would improve memorability and provide better context for users managing multiple database versions. A commenter supports the idea, noting similar versioning approaches in other operating systems (macOS) and distributions (Ubuntu, Debian), and suggests the possibility of also naming releases.
Recent Replies
The latest reply from a commenter supports the idea of year-based versioning. The commenter draws parallels with macOS and Ubuntu, which use similar schemes, and also suggests that giving each major release a name could be an interesting additional feature.
May 21, 2026 15:18
The proposer initiates a discussion by suggesting that PostgreSQL's major version numbering be changed from a sequential system (e.g., 19) to a year-based one (e.g., 26 for 2026). The primary goal is to enhance memorability for users managing various database versions, providing a clearer indication of a version's release year and how current it is.
May 21, 2026 14:20
Pg upgrade bug with NOT NULL NOT VALID Proposed 1 msgs May 21, 2026 12:14
View on pgsql-hackers archive →
Summary
The proposer identified a bug in `pg_upgrade` when upgrading from PostgreSQL 17 to a newer version. The issue occurs when a user explicitly defines a `NOT NULL` constraint using `CHECK ((i is not null)) NOT VALID`, which `pg_restore` fails to re-add because an implicitly created `NOT NULL` constraint with the same name already exists. This leads to an "ERROR: constraint already exists". The proposer suggested a fix involving choosing a less obvious, unique name for `NOT NULL` constraints generated during `CREATE TABLE` processing to avoid naming conflicts. They also noted this change might affect non-`pg_upgrade` operations and offered to prepare a patch.
Recent Replies
The proposer outlined a bug in `pg_upgrade` where an explicitly defined `NOT NULL NOT VALID` constraint conflicts with an implicitly generated one, causing `pg_restore` to fail with a "constraint already exists" error. They proposed a solution to rename the implicitly created `NOT NULL` constraints and offered to provide a patch.
May 21, 2026 12:14
Patch for bind message regarding the number of parameters and result column format codes Proposed 1 msgs May 21, 2026 01:12
View on pgsql-hackers archive →
Summary
This thread proposes a patch to correct documentation inaccuracies related to the bind message protocol. The proposer identifies that the documentation incorrectly describes the counts for parameter format codes, parameter values, and result-column format codes as signed integers, when they are actually unsigned integers according to the source code. The patch aims to update the documentation to reflect this correction.
Recent Replies
The proposer initiates the thread by highlighting a documentation inaccuracy. The counts for parameter format codes, parameter values, and result-column format codes in bind messages are documented as signed integers but are actually unsigned integers in the source code. A patch is proposed to correct this documentation error.
May 21, 2026 01:12
Feature request: Native nanosecond precision support for temporal types Proposed 1 msgs May 20, 2026 20:25
View on pgsql-hackers archive →
Summary
The proposer has initiated a feature request for native nanosecond precision support within PostgreSQL's temporal data types (timestamp, timestamptz, time). They argue that this capability is increasingly critical for modern analytical and financial systems, which often process data requiring nanosecond resolution. The proposer cites several widely used data formats and databases that already support this precision, including Parquet, DuckDB, ClickHouse, Oracle, SAS, Pandas, and NumPy. Currently, PostgreSQL users resort to workarounds such as auxiliary nanosecond-remainder columns, bigint epoch encodings, or custom extensions. The proposer contends that native support would bring consistent casting and operator semantics, improve integration with drivers, ORMs, and FDWs, and establish a standardized approach, thereby making PostgreSQL more competitive for workloads involving high-resolution datasets like market microstructure research.
Recent Replies
The proposer introduces a feature request for native nanosecond precision support for PostgreSQL's temporal types. They explain that current limitations force complex workarounds and that native support would provide a more robust, integrated, and standardized solution, aligning PostgreSQL with modern analytical and financial data requirements.
May 20, 2026 20:25
Prevent setting NO INHERIT on partitioned not-null constraints Proposed 1 msgs May 20, 2026 19:25
View on pgsql-hackers archive →
Summary
The proposer identified a bug where `NOT NULL` constraints on partitioned tables could be configured with `NO INHERIT` using `ALTER CONSTRAINT`, despite being disallowed during initial table creation. This inconsistency is deemed an oversight. To address this, a patch has been provided which introduces a check to prevent `ALTER TABLE ... ALTER CONSTRAINT ... NO INHERIT` on `NOT NULL` constraints for partitioned tables, ensuring that such operations are consistently rejected across both `CREATE TABLE` and `ALTER TABLE` statements. The proposer included SQL examples demonstrating the problematic behavior.
Recent Replies
The latest message by the proposer reports a bug where `NOT NULL` constraints on partitioned tables can be set to `NO INHERIT` via `ALTER CONSTRAINT`, which should be prevented. A patch is attached to add a check, aligning `ALTER CONSTRAINT` behavior with `CREATE TABLE` restrictions for such constraints.
May 20, 2026 19:25
Multi-Entry Indexing for GiST & SP-GiST Proposed 1 msgs May 20, 2026 17:44
View on pgsql-hackers archive →
Summary
The proposer has submitted a patch set introducing multi-entry indexing for GiST and SP-GiST access methods. This new functionality enables a single heap tuple to generate multiple index entries, akin to GIN's `extractValue`. The primary motivation is to enhance the precision of operators like `@>` and `<@` for composite data types such as multiranges, especially those with gaps, which currently suffer from numerous false positives. Additionally, it provides the first multirange opclass support for SP-GiST. The design integrates an optional `extractValue` support function (proc 13 for GiST, proc 8 for SP-GiST) that decomposes a datum into sub-entries during index insertion and building. During scans, a TID hash ensures result deduplication, and for KNN scans, an early filter is applied. The proposer also outlines semantic considerations for opclass authors, noting that consistent functions will process one sub-entry at a time, often necessitating `recheck=true` for accuracy.
Recent Replies
The latest message proposes multi-entry indexing for GiST and SP-GiST, allowing single heap tuples to produce multiple index entries. This aims to improve precision for operators on complex types like multiranges and introduces multirange support for SP-GiST, using a new `extractValue` support function to decompose values.
May 20, 2026 17:44
[PATCH] Add reentrancy guards in ri_triggers.c Proposed 1 msgs May 20, 2026 13:14
View on pgsql-hackers archive →
Summary
The proposer identified a critical use-after-free bug within the `ri_triggers.c` module, specifically in `RI_FKey_cascade_del`. This vulnerability can lead to a segmentation fault when a DELETE operation is performed on a self-referential table that has `BEFORE DELETE` triggers which also delete rows from the same table. The issue arises during reentrant RI trigger execution if the plancache is invalidated, causing a freed Postgres plan to be used prematurely. To address this, the proposer submitted two patches: one introducing a test case to reliably reproduce the segmentation fault, and another implementing reentrancy guards in `ri_triggers.c`. These guards are designed to maintain a reference count for plans currently in execution, thereby preventing their premature deallocation.
Recent Replies
The proposer introduced two patches: the first adds a test case to reproduce a segmentation fault, and the second fixes `ri_triggers.c` by implementing reentrancy guards. These guards aim to prevent a use-after-free bug by maintaining a reference count for plans in execution, stopping them from being freed while still active during reentrant RI trigger calls.
May 20, 2026 13:14
[PATCH] Remove obsolete LISTEN array growth isolation test Proposed 1 msgs May 20, 2026 11:50
View on pgsql-hackers archive →
Summary
This thread proposes removing an obsolete test case related to the `LISTEN` array growth isolation. The test was identified as a leftover from a previous patch version for the `LISTEN/NOTIFY` optimization. The proposer indicated that a patch to remove this test would be submitted in a separate thread.
Recent Replies
The proposer submitted a small patch to remove an unnecessary test, specifically the 'LISTEN array growth isolation test', which was identified as obsolete by another developer.
May 20, 2026 11:50
Set notice receiver before libpq connection startup Discussing 5 msgs May 20, 2026 07:21
View on pgsql-hackers archive →
Summary
The proposer identified an issue where NOTICE messages generated during libpq connection establishment, such as from login triggers, are not correctly logged via ereport() but are instead printed to stderr. This occurs because the libpqsrv_notice_receiver is installed too late in the connection process. The proposer initially suggested adding wrapper functions to install the receiver earlier. A reviewer, however, proposed a more general solution: splitting the libpqsrv_connect() function into two phases, libpqsrv_connect_start() and libpqsrv_connect_complete(), to allow the notice receiver to be set in the interim. The proposer agreed to this refactoring approach.
Recent Replies
The proposer agreed to the reviewer's suggestion of splitting the connection function into start and complete phases. The proposer indicated they would proceed with the suggested refactoring, acknowledging its generality for handling various connection-time settings, not just notice receivers.
May 21, 2026 07:26
The latest message is a brief acknowledgment from the proposer to the reviewer, confirming receipt of the feedback. It indicates that the discussion on the design approach is ongoing, with the proposer having agreed to the reviewer's suggestion of splitting the connection function into start and complete phases rather than using dedicated wrapper functions.
May 21, 2026 05:03
The latest reply from the proposer is a response to the reviewer's suggestion. Although truncated, it appears to be engaging with and discussing the reviewer's proposed alternative solution, which involves splitting the connection function into start and complete phases for a more generalized approach to setting up connection parameters, including the notice receiver.
May 21, 2026 02:09
COPY TO BLACKHOLE / pg_dump -j -Fb Proposed 1 msgs May 20, 2026 07:16
View on pgsql-hackers archive →
Summary
The proposer introduced a new feature proposal to add a `COPY <t> TO BLACKHOLE` command and a `pg_dump -Fb` format. The motivation stems from current inefficiencies in corruption checking using `COPY to /dev/null` or `verify_heapam()`, and the large disk space requirement for parallel `pg_dump -j` operations that demand a directory format. The `BLACKHOLE` target would discard data, providing a performance optimization over writing to `/dev/null` (benchmarked at 11-14% faster). The `pg_dump -Fb` option would allow parallel dumping without generating output files, thus saving significant disk space on large installations. The proposer is seeking community feedback on the usefulness of these changes.
Recent Replies
The latest reply, from the proposer, introduces the concept of `COPY <t> TO BLACKHOLE` and `pg_dump -Fb`. The proposer explains the benefits for corruption checking and parallel dumping, including benchmark results for `BLACKHOLE`, and clarifies that `pg_dump -Fb` would enable parallel backups without requiring disk space for output. The proposer also indicates that the patch is awaiting community feedback.
May 20, 2026 07:16
[PATCH] Add contrib/anyarray: intarray-style operations and indexes for any array type Proposed 1 msgs May 20, 2026 02:24
View on pgsql-hackers archive →
Summary
A proposer introduced a new contrib module, `anyarray`, aiming to generalize `contrib/intarray` functionality for any array type with a default btree opclass. The initial submission contained the patch embedded in the email body, which commenter 1 noted, requesting a proper attachment.
Recent Replies
Commenter 1's latest reply informs the proposer that the patch needs to be attached to the email, rather than included in the message body, indicating an issue with the submission format.
May 20, 2026 02:24
Avoid leaking system path from pg_available_extensions Patch Review 4 msgs May 20, 2026 01:00
View on pgsql-hackers archive →
Summary
The proposer identified an information leakage bug in the pg_available_extensions view. When the extension_control_path parameter is explicitly set to an empty string, the location column incorrectly displays the absolute system path (e.g., /usr/local/pgsql/share/extension) instead of the documented '$system'. This behavior contradicts the documentation, which states that an empty string for this parameter should default to '$system'. The proposer provided a straightforward patch to correct this, ensuring that '$system' is displayed as expected in this scenario. Multiple reviewers reproduced the bug and confirmed the patch fixes the issue.
Recent Replies
The latest reply is from a reviewer who confirmed they reproduced the issue and verified that the provided patch correctly addresses the bug. This indicates agreement on the problem and the proposed solution.
May 21, 2026 15:12
A reviewer confirms the existence of the problem described by the proposer and verifies that the provided patch successfully fixes the issue. The reviewer indicates that the patch "looks good".
May 21, 2026 08:55
The latest reply clarifies that the patch mentioned in the initial message was accidentally omitted and is now attached. This follow-up ensures the proposed solution is available for review.
May 20, 2026 01:07
[PATCH] Fix LISTEN startup race with direct advancement Patch Review 5 msgs May 19, 2026 20:37
View on pgsql-hackers archive →
Summary
The thread addresses a race condition in the async notification mechanism (`async.c`) that can cause `LISTEN` clients to entirely miss `NOTIFY` messages. This occurs when a `NOTIFY` commits in a brief window between a listener registering its queue position and becoming active. During this window, `SignalBackends()` might incorrectly conclude the listener isn't interested and advance its queue pointer past the notification, leading to a "false negative" where a notification is lost. The proposer suggested a fix that involves treating staged `LISTEN` entries as potential listeners when deciding whom to wake. The proposed solution includes three patches: two tests and the fix. A reviewer confirmed the bug and the effectiveness of the fix, also pointing out a test file duplication and another related scenario addressed by the patch.
Recent Replies
The proposer acknowledged the feedback from a reviewer regarding a duplication in the test files. A new version of the patches will be prepared, ensuring that the test for the missed notification and the test for the already-seen work are distinct, and that the fix patch contains only the core solution.
May 21, 2026 04:49
The latest reply from commenter 1 reiterated a query regarding the similarity between two of the provided test patches (0001 and 0003). Despite earlier clarification from the proposer about differing injection points, commenter 1 pointed out that the test specification files themselves appeared identical, seeking further explanation for this observation.
May 20, 2026 17:27
The proposer clarified the distinction between the two test patches (0001 and 0002), explaining that they target different injection points to demonstrate separate race conditions. The proposer also acknowledged that the main fix patch (0003) successfully addresses another related notification scenario identified by the reviewer.
May 20, 2026 11:20
Fix incorrect size check in statext_dependencies_deserialize Committed 2 msgs May 19, 2026 14:29
View on pgsql-hackers archive →
Summary
The proposer identified a bug in the `statext_dependencies_deserialize()` function where an incorrect size validation check was being performed. Specifically, `SizeOfItem` was mistakenly used instead of `MinSizeOfItems`, leading to an erroneous calculation of the expected bytea size. The proposer noted that a similar function for ndistinct extended statistics correctly uses `MinSizeOfItems`, suggesting the issue was a typo. A reviewer confirmed the validity of the bug report, praised the discovery, and indicated that they would fix the issue.
Recent Replies
The reviewer acknowledged the proposer's identification of an incorrect size check in `statext_dependencies_deserialize()`, confirming it appeared to be a typo. The reviewer expressed appreciation for the bug report and stated their intention to implement the fix.
May 20, 2026 04:49
The proposer identifies an issue in statext_dependencies_deserialize() where SizeOfItem() is incorrectly used for bytea size validation instead of MinSizeOfItems. This results in an incorrect size calculation for multiple dependency items, which should be the header plus ndeps minimally-sized dependency items.
May 19, 2026 14:29
Fix pg_stat_wal_receiver to show CONNECTING status Patch Review 10 msgs May 19, 2026 05:55
View on pgsql-hackers archive →
Summary
The thread begins with the proposer reporting a bug where `pg_stat_wal_receiver` does not show the `CONNECTING` status for a WAL receiver, which contradicts the original intent for monitoring. The proposer suggests a patch (v1) to display a minimal row with the PID and 'connecting' status when `WalRcv->ready_to_display` is false. A reviewer proposes an alternative patch (v2) that refines how `WalRcv->ready_to_display` is used, splitting the data filling into two steps to ensure `CONNECTING` status is visible without exposing potentially stale connection details. The proposer initially raises concerns about v2's display of `last_msg_send_time` and `last_msg_receipt_time` during the `CONNECTING` state, arguing they could be misleading if showing initial timestamp values rather than actual message activity. The reviewer defends v2, explaining that these values reflect the initialized state of the WAL receiver and can still be useful. The proposer eventually accepts v2, suggesting a documentation update for clarity. However, the proposer then discovers a new, related bug: a `conninfo` leak in the WAL receiver reuse path, where old connection information could persist while in `CONNECTING` or `WAITING` states. The proposer describes the leak and proposes a new patch to address it by only copying primary connection info when switching to `WALRCV_STARTING`, avoiding unnecessary `conninfo` clobbering. The reviewer confirms this new bug is legitimate, affects stable branches, and requests the proposer to submit the patch for backporting.
Recent Replies
The proposer apologizes for missing attachments in the previous message and states that the new patch addressing the `conninfo` leak is now attached for review. This patch aims to prevent the leak in the WAL receiver reuse path, a bug discovered during the review of earlier proposed changes to `pg_stat_wal_receiver`.
May 21, 2026 12:29
The proposer identified a new bug related to a `conninfo` leak in the WAL receiver reuse path, providing a diff to demonstrate it. They proposed a solution to copy primary connection information to `walrcv->conninfo` only when switching to `WALRCV_STARTING`, preventing the leak during the `WALRCV_WAITING` reuse path. The reviewer acknowledged the bug as legitimate and requested a patch for it, noting its impact on stable branches.
May 21, 2026 12:08
The proposer identified a potential conninfo leak in the WAL receiver reuse path, even with the v2 patch. The proposer outlined a specific sequence of WAL receiver states (WAITING -> RESTARTING -> CONNECTING) where conninfo could be copied into walrcv->conninfo before it is cleared by v2, leading to a temporary leak if the ready_to_display flag is then set to true.
May 21, 2026 07:20
Review observations for partial REFRESH MATERIALIZED VIEW patc Patch Review 3 msgs May 19, 2026 05:42
View on pgsql-hackers archive →
Summary
This thread centers on a review of a patch introducing partial refreshes for materialized views using a WHERE clause. The reviewer raised several concerns regarding the patch's concurrency semantics. Key issues included potential deadlock scenarios arising from the proposed FOR UPDATE + single-CTE approach, particularly in cases of UPSERT conflicts. The reviewer also noted that the CONCURRENTLY behavior for WHERE refreshes appeared counter-intuitive, seemingly making the non-concurrent path more permissive for writers, which deviates from established REFRESH MATERIALIZED VIEW semantics. Documentation for intended guarantees around overlapping partial refreshes and concurrent DML on base tables was also suggested. Despite the valuable use case identified for high-churn refresh workloads, the subsequent messages in the thread did not address these technical points, instead focusing on administrative guidance for the reviewer regarding proper mailing list etiquette, specifically how to reply-all to the original thread.
Recent Replies
The latest reply corrects a previously provided link. Commenter 1, who had earlier instructed the reviewer on the correct procedure for replying to the original thread, updated the link to the archived email, ensuring the reviewer could properly follow the established mailing list protocol. This message is purely administrative and does not contribute to the technical discussion of the patch.
May 19, 2026 10:04
The reviewer provided observations on the `REFRESH MATERIALIZED VIEW ... WHERE` patch, raising concerns about concurrency semantics. The reviewer questioned potential deadlock scenarios with overlapping refreshes and UPSERT conflicts, and found the `CONCURRENTLY` behavior unintuitive. The reviewer also suggested documenting the guarantees for overlapping partial refreshes and concurrent DML on base tables.
May 19, 2026 05:42
Make the logical replication conflict messages more like each other Proposed 1 msgs May 18, 2026 23:08
View on pgsql-hackers archive →
Summary
The proposer identified an inconsistency in the wording of logical replication conflict messages generated by `errdetail_apply_conflict` in `conflict.c`. The proposer suggests that these closely related messages, which cover various conflict types like insert/update/delete conflicts and origin differences, should be revised to have a more uniform and consistent phrasing. A detailed list of current message variations was provided to illustrate the problem.
Recent Replies
The proposer's initial message highlights inconsistencies in logical replication conflict messages across different conflict types. They propose rephrasing these messages to achieve greater uniformity and provide a comprehensive list of current variations as examples.
May 18, 2026 23:08
[PATCH] ternary reloption type Patch Review 1 msgs May 18, 2026 19:30
View on pgsql-hackers archive →
Summary
This thread provides a review of a patch related to a "ternary reloption type." The reviewer identified a key issue where the `default_val` field within the `relopt_ternary` structure was incorrectly typed as `int` instead of `pg_ternary`. This type mismatch prevents the field from correctly holding the `PG_TERNARY_TRUE/FALSE/UNSET` values. The reviewer suggested changing the type for `default_val` and also proposed minor code style improvements for argument alignment in related function definitions. The feedback is concise and points to a direct fix.
Recent Replies
The latest message provides feedback on a patch, specifically noting that the `default_val` field in the `relopt_ternary` struct should be of type `pg_ternary` instead of `int` to correctly store `PG_TERNARY_TRUE/FALSE/UNSET` values. It also suggests minor code formatting adjustments.
May 18, 2026 19:30
Extended statistics improvement: multi-column MCV missing values Discussing 2 msgs May 18, 2026 16:09
View on pgsql-hackers archive →
Summary
The proposer introduced an improvement for PostgreSQL's extended statistics, specifically addressing cases where multi-column Most Common Value (MCV) combinations are not present in the MCV list. Currently, the planner falls back to individual independent statistics, often leading to significant overestimations. A test case was provided to illustrate this, showing a query estimated to return 5909 rows when the actual count was zero. Two approaches were suggested to enhance selectivity estimation for these missing combinations: (1) Cap the selectivity using the frequency of the least common item in the MCV list. (2) Employ a method similar to single-column MCVs by incorporating `ndistinct` information to estimate frequencies. The proposer emphasized that these methods would be computationally inexpensive. A reviewer provided feedback on both proposals.
Recent Replies
The latest reply is from a reviewer who provided feedback on the two proposed approaches for improving MCV statistics. The reviewer confirmed the validity of the first approach, which caps selectivity using the least frequent MCV item, specifically noting its applicability to AND-clauses. Regarding the second approach, the reviewer affirmed the correctness of the proposed formula when `ndistinct` statistics are explicitly available, but advised careful consideration of the complexity if `ndistinct` needs to be computed without dedicated statistics.
May 18, 2026 22:13
The latest message, which is also the first in the thread, proposes an improvement to multi-column MCV statistics. It details a scenario where current planning overestimates row counts and suggests a method to cap selectivity estimates using the frequency of the least common MCV item, providing a test case.
May 18, 2026 16:09
Support LIKE with nondeterministic collations Discussing 1 msgs May 18, 2026 11:51
View on pgsql-hackers archive →
Summary
This thread discusses the behavior of the LIKE operator when used with nondeterministic collations, particularly focusing on the relationship between prefix matching and range-based comparisons. An earlier proposal suggested an equivalence between LIKE 'prefix%' and a specific range query. A reviewer questioned if this equivalence holds across all possible collation rules. A commenter responded, arguing that the fundamental definition of a collation necessitates this prefix-to-range connection, implying that any "strange rule" breaking this would mean it's not a valid collation. The conversation is at a conceptual stage, exploring the theoretical underpinnings of collation behavior.
Recent Replies
A commenter reinforced the idea that the LIKE operator's equivalence to a range check is inherent to the definition of a collation. They asserted that "strange rules" that would break this connection between prefixes and ranges would, by definition, mean that the entity in question is not a valid collation.
May 18, 2026 11:51
Support LIKE with nondeterministic collations Discussing 1 msgs May 18, 2026 11:43
View on pgsql-hackers archive →
Summary
The thread delves into the fundamental definition of a "character" within PostgreSQL and SQL, specifically in the context of the LIKE operator and Unicode. An earlier point from a reviewer emphasized that PostgreSQL defines a character as a single code point, arguing that changing this to a "grapheme cluster" (a sequence of code points forming a perceived character) would be a breaking change for many functions. A commenter contended that the single code point definition is inadequate for Unicode, where many "characters" require multiple code points. While acknowledging the breaking nature of such a change for existing string manipulation functions, the commenter advocated for LIKE to adopt grapheme cluster awareness, particularly where current behavior is counter-intuitive to human understanding.
Recent Replies
A commenter asserted that defining a "character" as a single code point is inadequate for Unicode, where many user-perceived characters consist of multiple code points. While recognizing that changing string functions to respect character boundaries would be a breaking change, the commenter proposed that modifying the LIKE operator to interpret "character" as a grapheme cluster would be a safe and desirable "fixing change," especially for cases where its current behavior is perceived as incorrect by users.
May 18, 2026 11:43
Failure in test_slru for host gokiburi (REL_16_STABLE only) Discussing 1 msgs May 18, 2026 11:41
View on pgsql-hackers archive →
Summary
A buildfarm failure was reported for the test_slru module on the gokiburi host, affecting only the REL_16_STABLE branch. The issue manifests as an assertion failure related to LWLock initialization, specifically Assert("LWLockHeldByMe(TestSLRULock)"). The failure is reproducible and a backtrace was provided. The problem appeared after two recent, seemingly unrelated commits. The proposer is actively investigating the root cause of this LWLock-related issue.
Recent Replies
A proposer reported a buildfarm failure specific to REL_16_STABLE on the gokiburi host, manifesting as an Assert("LWLockHeldByMe(TestSLRULock)") error within test_slru. The issue arose after two recent commits, which the proposer believes are unrelated, and they are currently investigating the underlying cause of this LWLock initialization problem.
May 18, 2026 11:41
Support LIKE with nondeterministic collations Discussing 1 msgs May 18, 2026 10:23
View on pgsql-hackers archive →
Summary
This thread reports a significant performance regression introduced by a recently committed change aimed at supporting LIKE with nondeterministic collations. The reporter indicates that the commit, though intended to enhance functionality, has caused `psql \d` and various database tests to become much slower. This slowdown is attributed to the fact that indexes are no longer being utilized in scenarios where they should be. The reporter highlights that this issue was previously brought up in another thread but received no attention, prompting this follow-up to ensure the regression is addressed. The implication is that corrective action or further investigation is required to mitigate the performance impact of the committed feature.
Recent Replies
The reporter highlights a performance regression caused by a recent commit, noting that `psql \d` and tests are now considerably slower because they fail to utilize indexes. The reporter pings the thread to draw attention to this unaddressed issue.
May 18, 2026 10:23
[oauth] Fix minimal typo in OAuth Committed 2 msgs May 18, 2026 07:49
View on pgsql-hackers archive →
Summary
This thread concerns a minor typo fix within the OAuth functionality. The proposer submitted a patch to correct a forgotten quote in an error message. The fix was quickly reviewed and accepted, with the reviewer indicating that it would be applied.
Recent Replies
The reviewer confirmed the validity of the proposed typo fix, acknowledging it as a 'nice catch', and indicated that they would apply the patch, thereby accepting the change for inclusion.
May 18, 2026 13:34
The latest and only reply in the thread, from the proposer, introduces a small patch intended to fix a minor typo. The proposed change addresses a missing quote within an OAuth-related error message, aiming to improve the clarity and correctness of the error output.
May 18, 2026 07:49
Review observations for COPY ON_ERROR_TABLE patch Patch Review 1 msgs May 18, 2026 06:55
View on pgsql-hackers archive →
Summary
This thread presents a reviewer's initial observations and questions regarding the proposed `COPY ON_ERROR_TABLE` patch. The reviewer highlights potential complexities arising from the interaction of this feature with the existing `COPY` multi-insert path, specifically concerning `CopyMultiInsertBuffer` and `table_multi_insert()` batching, and how row-level errors might impact buffer consistency, trigger visibility, and index management. The reviewer suggests disabling multi-insert batching initially for simplicity and correctness. Additional concerns include clarifying the transaction behavior for rejected rows (whether they should rollback with the main `COPY` transaction) and handling recursive failures if the error table insertion itself fails. These are presented as observations rather than confirmed issues.
Recent Replies
The reviewer provides initial implementation observations for the `COPY ON_ERROR_TABLE` patch. Key concerns include potential complications with multi-insert batching, buffer consistency, and transaction semantics for rejected rows. The reviewer also raises the possibility of recursive failures if inserting into the error table itself fails, suggesting disabling multi-insert batching initially for correctness.
May 18, 2026 06:55
VACUUM FULL or CREATE INDEX fails with error: missing chunk number 0 for toast value XXX Patch Review 1 msgs May 18, 2026 04:20
View on pgsql-hackers archive →
Summary
The proposer reported and provided detailed reproduction steps for a known bug where VACUUM FULL or CREATE INDEX can fail with "ERROR: missing chunk number 0 for toast value". The bug stems from a discrepancy in transaction horizon computation between a main table's VACUUM and its associated TOAST table's VACUUM. Specifically, ComputeXidHorizons for the main table respects local database transactions, preventing old tuples from being immediately removed. However, when the TOAST table is vacuumed later, an external transaction holding up the main table's horizon might have committed. With no other active processes in the same database, the TOAST VACUUM can wrongly determine an OldestXmin that allows the TOAST tuples to be removed. Subsequently, a CREATE INDEX on the main table, calculating its own OldestXmin (which now considers the external transaction), expects the RECENTLY_DEAD main table tuple's TOAST value to exist but finds it missing. The proposer developed a prototype patch that reuses the parent table's OldestXmin when vacuuming a TOAST table to ensure consistent horizons.
Recent Replies
The proposer detailed a reproduction method for a "missing chunk number 0 for toast value" error during VACUUM FULL or CREATE INDEX. The root cause is disparate transaction horizon calculations for a main table and its TOAST table, leading to premature deletion of TOAST data. A prototype patch was introduced to address this by ensuring the TOAST table's VACUUM reuses the parent table's OldestXmin, aiming for consistent tuple visibility.
May 18, 2026 04:20
PSQL - prevent describe listing tables that are already in listed schemas Discussing 11 msgs May 18, 2026 03:20
View on pgsql-hackers archive →
Summary
This thread proposes an enhancement to psql's `\dRp+` command, aiming to prevent it from listing individual tables if they are already encompassed by a `FOR TABLES IN SCHEMA` clause within a publication. The proposer argued that the current behavior creates confusing output, especially when row filters or future `EXCEPT` clauses are involved. Commenters supported the idea, leading to the incorporation of a similar logic to improve the `\d+` command, ensuring tables are not redundantly displayed. A discussion on including a PostgreSQL 15 version check for catalog access in psql was resolved by adding it as a precautionary measure. The patch has undergone several revisions and is now considered complete and ready for a committer's review.
Recent Replies
The latest reply from commenter 1 confirms that all comments and concerns have been addressed in the latest patch version (v6). Commenter 1 also states their intention to mark the commitfest entry as 'Ready for Committer,' signaling that the proposed changes are now deemed complete and approved for inclusion.
May 21, 2026 05:53
In the latest message, the proposer confirms the efficacy of new tests in a recent patch version and agrees with reviewer 1's suggestion to include a PG15 version check. This check is deemed a cautious measure to prevent internal SQL errors on older server versions, even if PG14 reaches end-of-life before the feature's release. The proposer has submitted patch v6 with these changes.
May 20, 2026 23:34
A reviewer confirms that a version guard for accessing `pg_publication_namespace` is not needed for the proposed change. This decision is based on the expectation that older PostgreSQL versions (PG14 and below) will be End-of-Life by the time the current development branch (PG20) is shipped, making backporting considerations for older `psql` clients less critical.
May 20, 2026 08:27
Fix small issues of pg_restore_extended_stats() Discussing 2 msgs May 18, 2026 02:25
View on pgsql-hackers archive →
Summary
The proposer identified three issues in `pg_restore_extended_stats()`. The first concerned inconsistent key verification behavior, where `strncmp()` was used for prefix matching instead of exact string comparison, leading to silent discarding of malformed keys without warnings. The second issue pointed out an incorrect number in a warning message. The third issue highlighted inconsistent `heap_freetuple()` calls in `pg_clear_extended_stats()`, suggesting memory leaks in certain error paths. A reviewer confirmed these issues, agreeing that the prefix matching is a silent data loss problem and the other two are minor but valid bugs. The reviewer committed to fixing all reported issues.
Recent Replies
The latest reply from a reviewer acknowledges the three issues reported by the proposer. The reviewer confirms that the inconsistent key verification behavior indeed constitutes silent data loss and agrees with the proposer's analysis. The reviewer also finds the other two issues (incorrect warning message count and inconsistent `heap_freetuple()` calls) to be valid, even if minor. The reviewer concludes by stating an intention to fix all the identified problems.
May 18, 2026 04:19
The latest message, which is the initial proposal, details two issues found in `pg_restore_extended_stats()`. It highlights an inconsistent key verification that can silently ignore invalid input and an incorrect count in a warning message. A fix for the key verification is also suggested.
May 18, 2026 02:25
035_standby_logical_decoding might fail due to FATAL message lost inside libpq Proposed 1 msgs May 17, 2026 15:00
View on pgsql-hackers archive →
Summary
The proposer reports a recurring buildfarm failure in `035_standby_logical_decoding`, where `pg_recvlogical` terminates unexpectedly. The core problem appears to be a FATAL error message from the server being lost or truncated within libpq, resulting in a generic "server closed the connection unexpectedly" error instead of the specific conflict message. The proposer successfully reproduced the issue and provided detailed logs, including truncated raw read buffers from libpq, indicating that libpq might not be correctly handling or reporting the full server error message. The issue has been observed before without a clear explanation.
Recent Replies
The proposer reports a buildfarm failure where `pg_recvlogical` exits unexpectedly. Analysis of logs shows that a server FATAL error message is likely being lost or truncated within libpq, leading to a generic connection closure error instead of a specific conflict message. The proposer successfully reproduced the issue and provided detailed debug logs illustrating the truncated message.
May 17, 2026 15:00
pgstat: Flush some statistics within running transactions, take 2 Proposed 1 msgs May 17, 2026 14:34
View on pgsql-hackers archive →
Summary
The proposer is restarting a discussion to implement mid-transaction flushing of PostgreSQL statistics. Building on previous feedback, the new patch introduces both SQL and C APIs to allow users and extensions to trigger a statistics flush on demand. The SQL API can target a specific PID, flushing immediately for the calling backend or signaling other backends to flush at their next interrupt or main-loop iteration. The C API is for the calling backend only. The proposal differentiates between statistics that can be flushed immediately (e.g., scans, fetches, IO, WAL stats) and those that must still be deferred until transaction end due to their dependency on transaction outcome (e.g., transactional write counters like inserted/updated/deleted tuples).
Recent Replies
The proposer introduces a new patch for flushing statistics mid-transaction, incorporating feedback from a previous discussion. The patch offers SQL and C APIs for on-demand flushing. It specifies that most statistics (e.g., scans, IO, WAL) will be flushed immediately, while transactional write counters will remain deferred until transaction commit or rollback.
May 17, 2026 14:34
pg_stash_advice: dump file with overlong stash name crashes worker in a restart loop Patch Review 1 msgs May 17, 2026 06:24
View on pgsql-hackers archive →
Summary
The proposer identified a critical bug in the `pg_stash_advice` worker that leads to a cluster restart loop. If the `pg_stash_advice.tsv` persistence file contains a stash name of 64 bytes or more (equal to or exceeding `NAMEDATALEN`), the worker crashes on startup with an assertion failure in `dshash_strhash()`. This happens because the file parser lacks a length check, unlike the SQL-level input path, causing an invalid string length to be passed to a function configured for a fixed key size. The postmaster interprets this as a crash, leading to continuous restarts and preventing the cluster from reaching a stable state. In production builds, this would result in silent truncation and potential hash collisions. The proposer attached a patch to address the issue by adding the necessary length validation to the file parser, mirroring existing checks, and included a TAP test.
Recent Replies
The proposer identified and reported a critical bug in the `pg_stash_advice` worker. An overlong stash name in the persistence file causes a startup crash and an infinite restart loop. A patch is provided that introduces a length validation check in the file parser, mirroring the SQL-level checks, along with a TAP test.
May 17, 2026 06:24
[PATCH] Add NESTED_STATEMENTS option to EXPLAIN Patch Review 4 msgs May 16, 2026 06:48
View on pgsql-hackers archive →
Summary
The proposer introduced a patch to add a `NESTED_STATEMENTS` option to `EXPLAIN`, allowing users to directly view execution plans for SQL statements within functions or procedures, bypassing the need for `auto_explain` and server logs. The feature works by temporarily installing executor hooks to capture and display nested plans. A reviewer identified two server crashes: one occurring after an error during `EXPLAIN (ANALYZE, NESTED_STATEMENTS)` followed by other queries, and another when an `EXPLAIN (ANALYZE, NESTED_STATEMENTS)` call was nested within another. A memory leak due to plan allocation in `TopMemoryContext` was also reported. The proposer subsequently released a v2 patch, addressing these issues by implementing `PG_TRY/PG_FINALLY` for robust hook cleanup, a reentrancy guard for nested `EXPLAIN` calls, and a dedicated memory context for captured plans to prevent leaks.
Recent Replies
The proposer submitted v2 of the patch, addressing the server crashes and memory leak reported by the reviewer. The fixes include using `PG_TRY/PG_FINALLY` for error handling and hook removal, adding a reentrancy guard for nested `EXPLAIN` calls, and utilizing a dedicated memory context to manage captured plan data. The proposer confirms that v2 passes regression tests and a comprehensive custom test suite.
May 17, 2026 16:45
The proposer acknowledges the critical bugs, specifically two server crashes and a potential memory leak, identified by the commenter during testing. They confirm that the root causes have been identified and that a revised version of the patch (v2) incorporating the necessary fixes will be released shortly.
May 16, 2026 14:52
A reviewer has identified two critical server crashes when testing the proposed patch. One crash occurs after an `EXPLAIN (ANALYZE, NESTED_STATEMENTS)` fails due to an error, affecting subsequent queries. The second happens when a function being explained with `NESTED_STATEMENTS` attempts to execute a nested `EXPLAIN` with the same option. The reviewer also highlighted a potential memory leak with string duplication into `TopMemoryContext` without clear deallocation.
May 16, 2026 11:15
Move FOR PORTION OF checks out of analysis Discussing 3 msgs May 15, 2026 21:16
View on pgsql-hackers archive →
Summary
This thread discusses moving critical checks for `FOR PORTION OF` clauses, specifically regarding Foreign Data Wrappers (FDWs) and volatile functions, out of the analysis phase and into the planner/executor. The proposer noted that these checks should be deferred to ensure the stability of the system and proper handling of child partitions. Patches for both aspects were submitted. A reviewer clarified that this issue, being a bug introduced in PG19, should not be a commitfest entry but rather listed as an "open item" to be fixed before the PG19 release. The proposer acknowledged this guidance and added the item to the PostgreSQL Open Items list.
Recent Replies
The proposer confirms that the bug fix related to `FOR PORTION OF` checks has been added to the PostgreSQL Open Items list. This ensures the issue is properly tracked for resolution before the upcoming PG19 release, following the advice of a reviewer, instead of being submitted as a commitfest entry.
May 15, 2026 23:51
The latest reply from a reviewer clarifies the process for tracking this fix. The reviewer advises against creating a commitfest entry, instructing the proposer to instead add the issue to the "Open Items" list on the PostgreSQL wiki. This is because the problem is identified as a bug introduced during the development of PG19 and requires a fix before its release.
May 15, 2026 22:09
The latest and sole message in this thread from the proposer outlines its purpose: to track the ongoing effort of moving `FOR PORTION OF` checks from the analysis phase to later execution stages. It details that patches addressing FDW handling in the planner/executor and postponing volatile function checks are being introduced, with a new CommitFest entry planned.
May 15, 2026 21:16
Order of tables dumped by pg_dump Discussing 4 msgs May 15, 2026 18:36
View on pgsql-hackers archive →
Summary
The thread starts with a user reporting non-deterministic table ordering in `pg_dump` output, which complicates schema migration validation. The user found that two identical schemas produced `pg_dump` outputs with different ordering for three specific tables, leading to large, artificial diffs. A core developer confirmed that `pg_dump` order should be deterministic and suggested checking database locales or non-ASCII object names. The user clarified they use UTF-8 and C locale, and revealed a client `pg_dump` version (18.1) higher than the server (14.22). During investigation, the user identified what they believed was a bug in `pg_dump`'s handling of inheritance, specifically the `NOT NULL` constraint on a child table. The core developer clarified that the syntax was valid in `pg_dump` 18 but not 14, and explained that the order inconsistency was unlikely to be demonstrated with just two tables. The user acknowledged the clarification and stated they would continue to investigate the cause of the ordering problem.
Recent Replies
The latest reply from the proposer acknowledges the reviewer's effort and clarifies their misunderstanding regarding `pg_dump`'s handling of `NOT NULL` constraints in inherited tables (which is valid syntax in v18, but was misunderstood to be a bug in relation to v14). The proposer states they will continue trying to identify what triggers the table order problem.
May 16, 2026 17:54
The latest reply by the proposer confirmed their locale settings and UTF-8 encoding. They highlighted that they were using a `pg_dump` client version 18.1 against a PostgreSQL 14.22 database. The proposer also reported discovering a bug where `pg_dump` generates invalid SQL for inherited tables when the child defines a primary key on an inherited column, suggesting this could be related to the non-deterministic ordering observed.
May 16, 2026 16:59
A core developer responded to the user's query, confirming that non-deterministic `pg_dump` output order is unexpected. The developer suggested investigating potential differences in database locales, which could impact object sorting, and provided specific code pointers (`sortDumpableObjectsByTypeName`, `sortDumpableObjects`) for the user to examine the table ordering logic.
May 15, 2026 19:54
[PATCH] doc: Document that invalid indexes are skipped during ATTACH PARTITION Discussing 2 msgs May 15, 2026 18:30
View on pgsql-hackers archive →
Summary
The proposer identified undocumented behavior in `ALTER TABLE ... ATTACH PARTITION` where invalid indexes on a partition are silently skipped, leading to the creation of new indexes instead of attaching the existing ones. This behavior, introduced in a previous commit, could surprise users. The proposer submitted a documentation-only patch to clarify this. A reviewer agreed with the need for documentation and proposed an alternative, more concise wording that explicitly reinforces the requirement for an index to be 'valid' for attachment.
Recent Replies
A reviewer agreed with the need for updated documentation and suggested a specific alternative wording for the `ALTER TABLE` reference page. The proposed change aims to more clearly state that for an equivalent index to be attached, it must be 'valid', and otherwise, a new index will be created.
May 15, 2026 19:57
The latest message is the initial message from the proposer. It proposes a documentation-only patch to ALTER TABLE to clarify that ATTACH PARTITION skips invalid indexes and creates new ones if no valid equivalent is found. This behavior has existed since v11 but was undocumented.
May 15, 2026 18:30
[PATCH] vacuumdb: Add --exclude-database option Proposed 1 msgs May 15, 2026 16:47
View on pgsql-hackers archive →
Summary
This thread introduces a proposal to enhance `vacuumdb` by adding an `--exclude-database (-D)` option. This new feature would allow users to skip specific databases when performing `vacuumdb --all` operations, addressing a common need in production environments where certain databases might need to be excluded from routine maintenance. The proposer provided a detailed explanation of the motivation, usage examples, and confirmed that the patch passes all existing `vacuumdb` TAP tests. New TAP tests and a comprehensive standalone test script were also included to cover various exclusion scenarios, multiple exclusions, and error handling, with all tests passing.
Recent Replies
The latest message is the initial proposal for a `--exclude-database` option for `vacuumdb`. The proposer details the motivation to skip specific databases during `--all` operations, provides usage examples, and outlines extensive testing. This includes new TAP tests and a standalone shell script that validates the feature across various scenarios, such as multiple exclusions, handling non-existent databases, and proper error management, all with successful outcomes.
May 15, 2026 16:47
pg_recvlogical: honor source cluster file permissions for output files Committed 6 msgs May 15, 2026 14:59
View on pgsql-hackers archive →
Summary
This thread addresses a bug in `pg_recvlogical` where it failed to preserve group permissions on its output files, despite documentation stating otherwise. The issue stemmed from output files being created with a hard-coded mode rather than respecting the source cluster's group permissions. The proposer submitted a patch to use `pg_file_create_mode` and update the documentation. A reviewer provided a TAP test to verify the fix. The proposer then refined the TAP test to cover both scenarios: when group access is enabled and when it's disabled, ensuring `pg_recvlogical` correctly applies permissions (0640 vs 0600). The patch, including the improved test (for master branch), has been committed.
Recent Replies
The proposer confirms that the patch has been pushed. They also express gratitude to the reviewer for their contributions to the review and the TAP test.
May 20, 2026 07:04
A reviewer affirmed their approval of the revised TAP test, which now correctly covers both cases where group access is enabled and disabled. The reviewer also agreed with the proposer's plan to backpatch the core fix to all supported branches, but to include the new, more complex test only in the master branch.
May 18, 2026 11:59
The proposer, following up on a previous message, provides the revised TAP test patch. This patch now comprehensively checks `pg_recvlogical`'s behavior by verifying output file permissions under both group access enabled (mode 0640) and group access disabled (mode 0600) configurations, addressing a previous oversight.
May 18, 2026 10:48
doc: fix pg_restore_extended_stats() example syntax Committed 4 msgs May 15, 2026 09:31
View on pgsql-hackers archive →
Summary
A proposer identified a minor syntax error in the documentation for the `pg_restore_extended_stats()` function, specifically a missing comma in a SQL example. The proposer reported the issue with a clear description of the mistake. A reviewer acknowledged the report and promptly confirmed that a fix would be applied. The reviewer then committed the necessary change to correct the documentation. The proposer subsequently thanked the reviewer for the quick resolution, confirming the successful update of the documentation.
Recent Replies
The proposer thanked the reviewer for applying the fix to the documentation example, acknowledging the swift resolution of the reported syntax error regarding the `pg_restore_extended_stats()` function.
May 17, 2026 00:37
The reviewer acknowledged the reported documentation error, confirming that the example syntax for `pg_restore_extended_stats()` was indeed incorrect. They indicated that the issue would be addressed at a later time.
May 15, 2026 11:23
Simplify signature of ProcessStartupPacket() Committed 5 msgs May 15, 2026 06:22
View on pgsql-hackers archive →
Summary
The proposer initiated a discussion to simplify the `ProcessStartupPacket()` function by removing its `ssl_done` and `gss_done` arguments. This simplification was suggested because a recent commit had reduced the number of callers of this routine to just one, making the arguments redundant. A patch was provided targeting HEAD (v20). Two reviewers quickly supported the change, with one suggesting that it could also be applied to v19. The proposer agreed with the suggestion. The patch was subsequently applied to HEAD, marking the successful completion of the cleanup.
Recent Replies
The proposer confirmed that the patch to simplify the `ProcessStartupPacket()` function's signature by removing unnecessary arguments has been applied to HEAD. This action signifies the successful completion of the proposed code cleanup, which received unanimous support from reviewers.
May 16, 2026 23:00
A reviewer provides positive feedback on the proposed patch, stating it "LGTM" (looks good to me). This reinforces the consensus among reviewers and the proposer regarding the simplification of the function signature.
May 16, 2026 14:36
The latest reply from the proposer acknowledged the committer's positive feedback and agreement to commit the patch. The proposer also confirmed that including the change in an earlier release version would be acceptable, indicating flexibility regarding the scheduling of the commit.
May 15, 2026 08:33
A trivial fix on a comment in pgstat_assoc_relation() Proposed 1 msgs May 15, 2026 06:09
View on pgsql-hackers archive →
Summary
This thread proposes a trivial fix to a comment within the pgstat_assoc_relation() function. The proposer observed that the comment begins with "Else," suggesting it is a remnant from a previous code refactoring where the function was split. The proposal is to simply remove the redundant "Else" to improve clarity.
Recent Replies
The proposer has identified an unnecessary "Else" at the beginning of a comment in pgstat_assoc_relation(). They suggest this is a leftover from a previous code split and propose removing it for better clarity.
May 15, 2026 06:09
Bound memory usage during manual slot sync retries Patch Review 8 msgs May 15, 2026 05:32
View on pgsql-hackers archive →
Summary
This thread addresses an unbounded memory growth issue in the `pg_sync_replication_slots()` function when it retries operations within a single SQL function call. Unlike the slotsync worker, it lacks transaction boundaries between retry cycles, leading to the accumulation of allocations for remote slot data (names, plugins, databases) and other per-cycle data. The proposer suggested a patch to run each manual retry cycle within a short-lived memory context, resetting it before each attempt, and included two local cleanups for tuple slots and list containers. Commenter 1 generally supported the idea but suggested fixes for memory context deletion on failure and improved comments. Commenter 2 agreed with the general approach of preventing memory accumulation but disagreed on the need to delete the memory context on failure, citing transaction abort behavior. Commenter 3 inquired about the amount of other unrelated memory allocated per cycle. The proposer explained the problem was found via code review, not observed memory growth, and detailed additional small accumulating allocations, favoring the memory context approach for explicit lifetime management. The proposer then provided measurement results showing an initial 192 KiB growth on HEAD for 100 logical slots, which was significantly reduced after implementing targeted cleanups for copied `RemoteSlot` strings.
Recent Replies
The proposer provided updated memory usage measurements from tests involving 100 failover logical slots, confirming the original HEAD showed a 192 KiB memory increase during retries. They then presented results after applying a targeted cleanup for copied `RemoteSlot` strings, demonstrating a significant reduction in the memory accumulation, although not entirely eliminating it, providing concrete data on the practical impact of the proposed changes.
May 16, 2026 16:25
The proposer presents memory measurement results from testing `pg_sync_replication_slots()` with 100 logical slots. The tests demonstrate that the current HEAD accumulates approximately 192 KiB of memory per retry cycle, a figure reduced to 128 KiB with a partial cleanup. These findings confirm the existence of memory growth, underscoring the necessity of the proposed patch to bound memory usage.
May 16, 2026 11:35
The proposer clarifies that the memory accumulation issue was identified through code review rather than live system observation. They detail specific per-cycle allocations, such as strings for queries, temporary TextDatumGetCString results, standalone TupleTableSlot's, and list containers, which would otherwise accumulate. The choice of a per-cycle memory context is justified as a way to explicitly manage the retry-cycle's memory lifetime and avoid complex manual destructor maintenance for all current and future allocations in that path.
May 15, 2026 13:20
Review comments on createPartitions() in pgbench.c Proposed 1 msgs May 15, 2026 04:15
View on pgsql-hackers archive →
Summary
This thread presents a review of the `createPartitions()` function in `pgbench.c`. The proposer identifies several potential robustness concerns that, while not yet reproduced as failures, warrant review. These observations include a possible integer overflow in the `part_size` calculation, a reliance on `Assert(partitions > 0)` for runtime safety, the reuse of `PQExpBuffer` without explicit resetting, and potential edge cases related to uneven `RANGE` partition boundaries. The proposer offers a concrete suggestion to improve the `part_size` calculation by explicitly casting to `int64` to prevent overflow. The thread is currently in its initial proposal stage, awaiting further discussion or action.
Recent Replies
The proposer highlights four potential robustness issues in `pgbench.c`'s `createPartitions()` function. These include a possible `int64` overflow in `part_size` calculation, `Assert` reliance for runtime safety, `PQExpBuffer` reuse, and `RANGE` partition boundary edge cases. A code suggestion for `part_size` calculation is provided.
May 15, 2026 04:15
Fix bug of COPY (on_error set_null) Discussing 3 msgs May 15, 2026 01:12
View on pgsql-hackers archive →
Summary
The proposer identified a bug in the `COPY (on_error set_null)` option. The issue arises because the `cstate->domain_with_constraint` array is allocated based on the length of the specified column list but is later accessed using the actual attribute number. This mismatch can lead to an out-of-bounds read and incorrect behavior, specifically demonstrated by a `NOT NULL` domain column accepting a NULL value when it should fail during an `ON_ERROR SET_NULL` operation with an invalid input. A clear reproduction case was provided, and the proposer suggested a fix that aligns the allocation and access of the array by using the actual number of table attributes. A commenter then pointed out that this issue appears to be a duplicate of an already reported bug.
Recent Replies
The latest reply is from the proposer, who acknowledged a commenter's observation that the reported bug is a duplicate of a previously identified issue. The proposer thanked the commenter for the information and stated their intention to review the existing patch that addresses the same bug.
May 18, 2026 22:22
The commenter acknowledged the reported bug, which involves an out-of-bounds read and incorrect `NOT NULL` domain handling during `COPY (on_error set_null)` operations, and noted that it appears to be the same issue as a previously reported problem.
May 16, 2026 05:17
The proposer reported a bug in the `COPY (on_error set_null)` feature, where an out-of-bounds read occurs when the specified column list is shorter than the table's attribute list, leading to `NOT NULL` domain constraint violations. They provided a reproducible example and proposed a fix to ensure correct array indexing.
May 15, 2026 01:12
Re-add recently-removed tests for ltree and intarray Committed 8 msgs May 14, 2026 23:38
View on pgsql-hackers archive →
Summary
The thread focuses on re-adding regression tests for `ltree` and `intarray` extensions, which were previously removed due to stack overflow issues on specific buildfarm architectures (ppc64, s390x) when compiled without certain optimizations (e.g., `-O0`). A reviewer provided detailed insight into the root cause: tail-recursion in `findoprnd()` not being optimized by all compilers/architectures, leading to excessive stack usage for right-deep query trees. The proposer introduced new tests designed with a balanced binary tree structure to prevent deep recursion. After a commenter verified the new tests passed under conditions that previously caused failure, the proposer confirmed successful buildfarm results and backpatched the changes to v14.
Recent Replies
The proposer confirms that the updated `ltree` and `intarray` regression tests have been successfully backpatched down to version 14. All ppc buildfarm members have passed these new tests, indicating a stable resolution to the previous stack overflow issues and the successful reintroduction of comprehensive test coverage.
May 15, 2026 23:39
The latest reply from the proposer confirms that the updated tests have been committed to the `HEAD` branch after a reviewer successfully verified their stability on a previously problematic `ppc64le` architecture when compiled with `-O0`. The proposer mentions that several `ppc` buildfarm animals have passed with the new tests on `HEAD`, but is still awaiting more results before proceeding with backpatching to `v14`.
May 15, 2026 06:54
The latest reply from the proposer acknowledges a commenter's point regarding the impact of compiler optimization levels, such as `-O0`, on reproducing the original stack overflow issue. The proposer notes the lack of direct access to the specific problematic environments (ppc64, s390x). Consequently, they state their intention to proceed by first integrating the proposed test changes into the main development branch (`HEAD`), and then, if proven stable, to consider backpatching them to earlier versions.
May 15, 2026 04:59
[PATCH] refint: Avoid reusing cascade UPDATE plans. Patch Review 9 msgs May 14, 2026 19:12
View on pgsql-hackers archive →
Summary
The thread discusses a bug in the refint module where check_foreign_key() incorrectly reuses cached prepared plans for cascade UPDATE actions, leading to propagation of incorrect key values. The proposer initially suggested a fix (v1) to prevent caching cascade UPDATE plans. A reviewer highlighted broader issues with the plan cache's lack of invalidation and suggested using trigger OID as a key, or removing the cache altogether. Following this, another reviewer proposed outright removal of the refint module, given its superseded status and multiple bugs, a suggestion that received support. The proposer then submitted v3, which completely removes the private SPI plan cache from refint for both check_primary_key() and check_foreign_key(), preparing plans per invocation. The discussion continued on refining the patch by removing historical comments and reformatting, with v4 addressing these points and a follow-up pgindent patch planned. A separate thread for refint module removal is also planned.
Recent Replies
The latest message from the proposer includes a v4 patch. This version removes regression-test additions, cleans up historical cache comments, and moves new local variable declarations to the top of functions. The proposer also confirmed plans to start a new thread for the complete removal of the refint module for v20.
May 15, 2026 18:33
The latest message from a reviewer reinforces the suggestion to remove the entire `refint` module in a future release, proposing a separate discussion for that. Regarding the current v3 patch, the reviewer suggests removing unnecessary tests and historical comments about the cache, simplifying local variable declarations, and proposes a follow-up patch for code re-pgindenting, indicating further clean-up and refinement are expected.
May 15, 2026 17:27
The latest reply from the proposer (commenter 1) includes v3 of the patch. This updated patch completely removes the private SPI plan cache from the refint extension, affecting both check_primary_key() and check_foreign_key(). It ensures that SPI plans are prepared and released on each trigger invocation, simplifying the code and resolving the caching issues identified earlier in the thread.
May 15, 2026 15:04
postgres_fdw: use_scram_passthrough on user mapping is ignored when also set on server Patch Review 6 msgs May 14, 2026 17:57
View on pgsql-hackers archive →
Summary
The proposer highlighted an inconsistency in `postgres_fdw` where the `use_scram_passthrough` option's server-level setting incorrectly overrides the user mapping setting, contrary to the expected precedence for per-user options. Reviewer 1 confirmed this behavior is incorrect and noted `dblink` suffered from the same issue. Reviewer 1 then provided patches to correctly prioritize the user mapping setting for both extensions. During review, the proposer identified an additional bug in `dblink`: `use_scram_passthrough` could be set on `dblink_fdw` itself but had no functional effect. Reviewer 1 addressed this with a new patch, ensuring the option is validated only in foreign server or user mapping contexts. Discussion also covered relocating a test for this new fix to `sql/dblink.sql` and the desirability of backporting all three changes to v18 for consistency, aligning with existing precedence rules for similar options like `sslkey`.
Recent Replies
The latest reply from reviewer 1 confirms agreement with the proposer's suggestions. They will move the new test for `dblink_fdw` option validation to `sql/dblink.sql` to avoid excessive complexity. Reviewer 1 also aligns with the proposer's reasoning for backporting all three patches to v18, emphasizing the importance of consistent behavior across PostgreSQL versions and adherence to established precedence patterns for other options documented within `postgres-fdw.sgml`.
May 18, 2026 14:42
The latest reply from the proposer acknowledges the updated patches, particularly the fix for the `dblink` validation issue. The proposer queries the extent and placement of testing for this fix, suggesting a simpler approach. Furthermore, the proposer evaluates the backporting strategy for all patches, expressing a lean towards backporting to v18 for consistency, despite potential user impact due to undocumented current behavior, while agreeing that the validation fix is suitable for backporting.
May 18, 2026 08:01
The latest message from a developer provides an updated patch (0003) to address an identified bug in `dblink` where the `use_scram_passthrough` option, when set at the foreign-data-wrapper level, had no functional impact. The fix ensures this option is correctly processed only when validated within the context of a foreign server or user mapping. Additionally, the developer incorporated a suggested comment into the `UseScramPassthrough()` functions to explicitly clarify the option's precedence.
May 15, 2026 15:46
Set calcSumX2 = true in numeric_(poly_)deserialize Proposed 1 msgs May 14, 2026 17:38
View on pgsql-hackers archive →
Summary
This thread highlights a potential bug in the `numeric_poly_deserialize` and `numeric_deserialize` functions. The proposer points out that these deserialization functions, intended for aggregate states that require `sumX2` (such as `var_pop` and `stddev_pop`), incorrectly initialize the `calcSumX2` flag to `false`. While this might not affect the in-tree `deserialize` then `combine` pipeline, it causes issues for external callers (e.g., extensions) that deserialize state and then apply transition calls, leading to `sumX2` not being accumulated and thus yielding incorrect results. The proposer noted that `numeric_combine` correctly sets this flag. A two-line patch was attached, and the proposer is seeking feedback on whether this fix is necessary or if the current behavior is intentional.
Recent Replies
The proposer described a bug where `numeric_poly_deserialize` and `numeric_deserialize` incorrectly set `calcSumX2 = false`, affecting external aggregate state usage. A two-line patch was provided to set it to `true`, and the proposer is seeking validation on the proposed fix.
May 14, 2026 17:38
[PATCH] Make spelling consistent in waiteventset.c Discussing 1 msgs May 14, 2026 16:05
View on pgsql-hackers archive →
Summary
A patch was submitted to correct a spelling inconsistency in comments within `waiteventset.c`, standardizing "writeable" to "writable". The proposed change is minor and purely stylistic. However, the reviewer encountered a procedural issue: the patch's author was identified by a company name rather than a personal name. The reviewer expressed discomfort committing the patch without proper personal attribution, citing difficulties in referencing the original author in the future. The reviewer requested guidance on whether to proceed with no author, or to simply leave the minor typo unfixed. The core technical merit of the patch is not the issue, but rather the administrative process for committing it.
Recent Replies
The reviewer expressed a dilemma regarding committing the patch due to the author being identified by a company name instead of a personal name. The reviewer stated discomfort with committing without a personal name for future reference and sought input on whether to proceed without an author or to leave the typo unfixed.
May 14, 2026 16:05
postgres_fdw: restore_stats uses current user's mapping instead of table owner's during ANALYZE Discussing 4 msgs May 14, 2026 14:30
View on pgsql-hackers archive →
Summary
The proposer identified an inconsistency in `postgres_fdw`'s `ANALYZE` behavior: when `restore_stats` is disabled, it uses the foreign table owner's user mapping for remote data sampling, but when `restore_stats` is enabled, it uses the executing user's mapping for fetching remote statistics. This can cause `user mapping not found` errors. The proposer submitted a patch to unify this by always using the table owner's mapping. The original implementer defended the current behavior, citing security (lower privilege needed for stats import) and arguing that the issue is rare. The proposer countered that the inconsistency is confusing and problematic, especially when a fallback mechanism implicitly switches to the owner's mapping, potentially requiring two separate user mappings for a single `ANALYZE` operation.
Recent Replies
The latest reply from the original implementer reinforced their stance, stating that the current design is intentional due to security considerations, as stats import requires fewer privileges. They expressed skepticism that the need for two user mappings in fallback scenarios is a significant issue, deeming it an exceptional case that will be further minimized by future efforts to prevent fallback.
May 15, 2026 08:45
The latest reply from the proposer reiterates concerns about the current behavior, arguing against its intentional design. The proposer highlights that if `ANALYZE` with `restore_stats` enabled fails, it implicitly falls back to using the table owner's user mapping for sampling. This hidden fallback mechanism forces users to potentially set up two separate user mappings, which is deemed an unnecessarily confusing and complex requirement.
May 15, 2026 04:55
A reviewer responded to the proposer's bug report, confirming that the differing user mapping behavior in `ANALYZE` with `postgres_fdw` based on `restore_stats` is intentional. The reviewer explained it as a security measure, asserting that consistency is not a strong enough reason to use a potentially more privileged user mapping when only metadata is being fetched.
May 15, 2026 00:55
[PATCH] Fix for bug #19474: LIKE fails to match literal backslashes with nondeterministic collations Patch Review 3 msgs May 14, 2026 11:12
View on pgsql-hackers archive →
Summary
This thread addresses a bug where the `LIKE` operator failed to correctly match literal backslashes when used with non-deterministic collations. The proposer identified that the issue stemmed from redundant backslash escaping within `like_match.c`, a behavior introduced during the implementation of `LIKE` support for non-deterministic collations. An initial patch was provided with a regression test to fix this. A reviewer confirmed the patch resolved the bug but suggested improving the code's readability and robustness by using an `afterescape` flag, similar to existing logic in `do_like_escape`, instead of relying on implicit outer loop details. The proposer agreed to this suggestion and also noted the need to handle multibyte encodings more carefully, proposing to use `NextChar` for character copying to prevent potential issues with byte-by-byte processing.
Recent Replies
In the latest reply, the proposer accepts the reviewer's suggestion to refactor the code using an `afterescape` flag for clarity. They also recognize that byte-by-byte copying might be problematic for multibyte encodings and propose using `NextChar` to copy entire characters, which would make the fix more robust. The possibility of defining and using `CopyAdvChar` for consistency with other functions is also being considered.
May 15, 2026 11:53
The reviewer confirmed the patch successfully addresses the bug but raised concerns about the readability and maintainability of the code. The reviewer suggested either adding a clarifying comment about the implicit logic or refactoring the loop to use a more explicit flag, similar to existing patterns, to reduce fragility.
May 14, 2026 17:58
The latest reply, which is also the initial message, is from the proposer, submitting a patch to fix bug #19474. The bug caused `LIKE` to fail matching literal backslashes with non-deterministic collations due to incorrect escaping. The proposed fix ensures characters after literal backslashes are always included, and a regression test was added.
May 14, 2026 11:12
Fix bug of COPY TO support partition table Committed 5 msgs May 14, 2026 09:59
View on pgsql-hackers archive →
Summary
The thread addresses a bug in the `COPY TO` command when used with partitioned tables where a partition's column order differs from its root table. The proposer discovered that the `build_attrmap_by_name_if_req()` function was called with incorrect arguments, leading to `COPY TO` outputting NULL values. The proposer provided a clear reproducible example and a straightforward fix involving reversing the order of arguments to the function. Reviewer 1 and reviewer 2 confirmed the bug and the validity of the proposed fix. Reviewer 2, who was responsible for the original commit, took ownership of integrating the fix. The proposed solution was committed, resolving the issue.
Recent Replies
The latest reply confirms that the patch addressing the bug in `COPY TO` for partitioned tables has been successfully pushed. This indicates the resolution and integration of the fix into the codebase, concluding the discussion.
May 14, 2026 18:03
The latest reply from commenter 1 gives explicit approval for reviewer 1 to proceed with committing the patch. Reviewer 1 had offered to commit the fix, acknowledging its connection to their earlier contributions, and commenter 1, having reviewed and confirmed the patch's correctness, concurs with this plan.
May 14, 2026 16:56
A reviewer acknowledged the bug report as a "good catch" and positively reviewed the proposed patch. The reviewer found the fix to be correct and approved it, indicating readiness for further progression or commitment.
May 14, 2026 16:25
Should IGNORE NULLS cache nullness for volatile arguments? Committed 7 msgs May 14, 2026 04:14
View on pgsql-hackers archive →
Summary
This thread discusses a potential issue with the `IGNORE NULLS` support for window functions, specifically concerning how nullness is cached for volatile arguments. The proposer observed that the current implementation caches nullness for arguments to avoid re-evaluation, which can lead to unexpected behavior if a volatile argument's nullness changes between the initial check and later evaluation. The proposer proposed a solution where the nullness cache would only be used for arguments safe to reuse, treating non-cacheable (volatile) arguments' nullness as unknown, requiring re-evaluation when needed. A reviewer agreed with this approach, outlining it as a reasonable choice among alternatives. The reviewer suggested minor code refactoring to integrate the cacheability check directly into the `get_notnull_info()` and `put_notnull_info()` functions for better encapsulation. The proposer provided a revised patch incorporating these suggestions, which the reviewer subsequently committed.
Recent Replies
The proposer responded to the reviewer, expressing gratitude for pushing the patch. This indicates the successful resolution of the identified issue and the integration of the proposed changes into the codebase.
May 19, 2026 03:51
The latest reply from the reviewer confirms that the v2 patch, which addressed the potential issue with caching nullness for volatile `IGNORE NULLS` arguments in window functions, has been successfully pushed. This patch modifies the behavior so that the nullness cache is only used when the argument is safe to reuse, preventing inconsistent results from volatile expressions. The reviewer expresses gratitude for the proposer's contribution.
May 18, 2026 03:45
The latest reply from the reviewer confirms that the v2 patch addresses the earlier suggestions and "looks good." The reviewer states an intention to push the patch within a few days, pending any objections, indicating a move towards commitment.
May 15, 2026 07:34
Improve conflict detection when replication origins are reused Discussing 8 msgs May 14, 2026 03:05
View on pgsql-hackers archive →
Summary
This thread addresses a critical false-negative conflict detection issue in logical replication. The problem arises when a `ReplOriginId` is reused after a subscription is dropped, causing a new subscription to incorrectly identify previously replicated changes as its own, thereby skipping conflict detection. The proposer introduced two approaches: 1) nullifying old origin IDs in `commit_ts` data on subscription drop, which is comprehensive but potentially expensive and not crash-safe without WAL logging; and 2) adding a creation timestamp to each replication origin and comparing it during conflict checks, deemed lightweight and crash-safe. Reviewers confirmed the problem's significance. A separate scenario involving publisher switching was clarified as outside the current replication model's scope. While LSN matching was considered as an alternative to timestamps, it would necessitate extending the `commit_ts` structure, making Approach 2 (timestamps) the more practical option currently under consideration.
Recent Replies
A reviewer confirmed the proposer's assessment regarding the LSN matching idea for conflict detection. The reviewer stated that the `TransactionIdGetCommitLSN()` function does not provide the exact commit LSN required, reinforcing that extending the `commit_ts` structure would be the sole method to implement an LSN-based approach.
May 20, 2026 04:07
The latest message from the proposer responds to a commenter's suggestion about using LSN matching for conflict detection instead of timestamps. The proposer agrees that LSN is a good idea but notes that it would likely require extending the `commit_ts` structure to include `origin_creation_lsn`, as there's no existing mechanism to extract a tuple's commit LSN during the application of changes.
May 19, 2026 13:38
The latest reply by commenter 1 reiterates the initial problem statement and the two proposed solutions from the proposer. It solidifies the understanding of the core issue related to `ReplOriginId` reuse and confirms the agreed-upon scope of the proposed fixes, refocusing the discussion on the initial proposal after clarifying a tangential scenario.
May 19, 2026 09:22
FOR PORTION OF should reject GENERATED columns Patch Review 2 msgs May 13, 2026 15:39
View on pgsql-hackers archive →
Summary
This thread focuses on a reported seg-fault that occurs when `FOR PORTION OF` syntax is used with virtual generated columns. The proposer created this dedicated thread to track the development and application of a fix for this specific bug, referencing an earlier discussion where the issue was initially brought up. The proposer clarifies that while their initial approach involved a check during the analysis phase, they have since developed a standalone patch, now at v2, to address this interaction more directly.
Recent Replies
The latest reply from the proposer provides v2 of a patch designed to prevent a seg-fault when `FOR PORTION OF` is used with virtual generated columns. The proposer clarifies that although their initial thought was to implement this check in the analysis phase, they found it more feasible to deliver it as a standalone patch.
May 15, 2026 21:04
The proposer initiated this new thread to specifically address the identified issue where `FOR PORTION OF` operations lead to a segfault with virtual generated columns. The message links back to the original discussion where the problem was first raised, aiming to provide a dedicated place for its resolution.
May 13, 2026 15:39
duckdb has extensible parser Discussing 2 msgs May 13, 2026 13:25
View on pgsql-hackers archive →
Summary
This thread initiates a discussion about the possibility of implementing an extensible SQL parser in PostgreSQL. The proposer references a recent article on DuckDB's runtime-extensible parsers, suggesting it as a potential model for PostgreSQL, and recalls previous discussions on this topic. A commenter then shares their ongoing project, 'Lime', which is a replacement for PostgreSQL's existing flex and bison-based parser. The commenter's goal with 'Lime' is to enable runtime extensibility of the parser, which would provide extension authors with more advanced capabilities. The work is described as not yet stable but is presented as a basis for further discussion on the topic.
Recent Replies
The commenter provided an update on their ongoing project, 'Lime,' which aims to replace PostgreSQL's current parser (flex and bison) with a new one. Their primary goal is to create a parser that can be extended or modified at runtime, enabling more advanced functionality for extension authors. While acknowledging the project is still under development and not yet stable, they offered it as a concrete example to further the discussion on extensible parsers.
May 19, 2026 00:12
The proposer shared a link to an article detailing DuckDB's runtime extensible parser, suggesting it could provide inspiration or a blueprint for future discussions and implementations of a similar feature in PostgreSQL.
May 13, 2026 13:25
Fix SPLIT PARTITION bound-overlap bug and other improvements Patch Review 19 msgs May 13, 2026 04:38
View on pgsql-hackers archive →
Summary
The proposer identified a bound-overlap bug in ALTER TABLE ... SPLIT PARTITION and other areas needing improvement, including unclear documentation for splitting with a DEFAULT partition and a need for better error messages. The initial proposal included multiple patches, with a reviewer confirming that patches 0001-0003 were ready. The proposer then identified a collation-related issue in patch 0004 concerning LIST partitions and provided a revised version. The reviewer subsequently committed patches 0001-0003 and revised patch 0004, adding further tests. The discussion continued around the details of patch 0004, focusing on correct handling of collations and ensuring proper bound comparisons for LIST partitions.
Recent Replies
The latest reply by the proposer (Message 13) acknowledges the reviewer's action of committing patches 0001-0003. The proposer also confirms their understanding regarding the collation issue that was discussed for the remaining patch (0004), which the reviewer had revised.
May 20, 2026 23:22
The latest messages, though truncated, indicate reviewer 1's continued engagement on the final patch (0004). Previously, reviewer 1 confirmed committing patches 0001-0003 and provided a revised version of 0004, incorporating additional regression tests and addressing the collation-related concerns raised by the proposer. This reflects ongoing efforts to finalize the solution for preventing degenerate split partition operations.
May 20, 2026 21:17
The proposer confirms that their previous suggestion has been addressed and expresses satisfaction with the current state of the remaining patch (0004), indicating it is ready for further review or commitment.
May 20, 2026 11:46
[PATCH] Fix REPACK decoding worker not cleaned up on FATAL exit Committed 7 msgs May 12, 2026 23:26
View on pgsql-hackers archive →
Summary
This thread addresses a bug where a REPACK decoding worker process and its temporary replication slot were not properly cleaned up when the main REPACK session terminated via a `FATAL` exit (e.g., `pg_terminate_backend`). The initial proposer identified that `FATAL` exits bypass `PG_FINALLY` blocks, preventing the worker's cleanup function from being called. The proposer's first patch used `on_proc_exit` callbacks, but reviewer 1 found it caused a segfault due to use-after-free, suggesting `before_shmem_exit` instead. Committer 1 then proposed `PG_ENSURE_ERROR_CLEANUP()` as the most robust solution, which handles both `ERROR` and `FATAL` exits, automatically cancels on normal completion to prevent slot leaks, and runs before memory contexts are destroyed. The proposer's v3 patch implemented this, successfully resolving the issues and passing tests. Committer 1 subsequently pushed the fix, along with further refinements to `stop_repack_decoding_worker()` to improve memory handling. Commenter 1 then inquired about a potential omission of `shm_mq_detach()`, leading to a brief discussion about automatic detachment of shared memory queues.
Recent Replies
The committer responded to a question from commenter 1 regarding the `shm_mq_detach()` call. They pointed out that the `shm_mq_attach()` documentation implies automatic detachment of the queue when the dynamic shared memory segment is detached, questioning the necessity of an explicit `shm_mq_detach()` call, but offered to restore it if necessary.
May 20, 2026 20:13
A reviewer comments on a follow-up patch that refactored `stop_repack_decoding_worker()`. The reviewer observes that the `shm_mq_detach()` call seems to have been removed and asks for clarification on whether its functionality is now implicitly handled or if it's a potential omission, noting that explicit detachment improves code readability.
May 20, 2026 07:54
The reviewer confirms that the proposer's v3 patch, which utilizes `PG_ENSURE_ERROR_CLEANUP()`, effectively resolves the bug where `REPACK (CONCURRENTLY)` decoding workers and their temporary slots were not cleaned up on FATAL exit. The reviewer states that the patch has been committed, with minor cosmetic adjustments, and also mentions a subsequent patch to further improve the `stop_repack_decoding_worker()` function.
May 19, 2026 18:45
Vacuumlo improvements Discussing 6 msgs May 12, 2026 17:34
View on pgsql-hackers archive →
Summary
The thread initiates with a proposer highlighting a critical flaw in the `vacuumlo` utility: its silent deletion of large objects (LOs) referenced by columns defined as domains over `oid` or `lo` types, despite this behavior being documented. This leads to irreversible data loss. The proposer suggests either modifying `vacuumlo` to resolve domain types to their base types or to at least issue a warning. Commenter 1 supports documentation improvements and explores user-specified queries, while Commenter 2 advocates promoting the `LO` extension and `lo_manage()` to reduce `vacuumlo`'s role. The discussion then delves into enhancing `vacuumlo`'s detection capabilities for LOs in domains, composite types, and arrays, acknowledging the potential for more complex query generation. Ultimately, participants agree on a multi-faceted approach involving `vacuumlo` improvements, clearer documentation, and encouraging `LO` extension adoption.
Recent Replies
The latest reply from Commenter 1 reinforces the consensus reached in the thread. It emphasizes that a comprehensive solution requires a combination of improving `vacuumlo`'s ability to scan for large objects, enhancing documentation to clearly warn users about cases `vacuumlo` cannot handle, and actively guiding users toward the `lo` extension for better management of large objects.
May 15, 2026 20:29
A commenter acknowledged the value of expanding `vacuumlo`'s capabilities to include domains, composite types, and arrays, which would require more complex data deletion expressions. However, the commenter questioned the overall impact of such changes and reiterated the critical importance of enhancing documentation to clearly warn users about data loss risks and to guide them towards using the `LO` extension for proper large object management.
May 15, 2026 19:36
The latest reply from a commenter suggests that it should be relatively easy to teach `vacuumlo` to correctly handle domains over `oid`, even those defined recursively. The commenter encourages testing this potential solution and notes that this effort could also serve as an opportunity to improve `vacuumlo`'s currently inadequate test suite.
May 14, 2026 03:10
Fix jsonpath .split_part() to honor silent mode Patch Review 5 msgs May 12, 2026 02:10
View on pgsql-hackers archive →
Summary
This thread addresses a bug in the `json_path` method `split_part()` where it does not honor the `silent => true` option when encountering invalid arguments, such as a zero field position or an out-of-range integer. The proposer demonstrated that, unlike the `.decimal()` method, `split_part()` immediately raises an error instead of suppressing it. The root cause was identified as `split_part()` directly using `numeric_int4()` for argument parsing, while `.decimal()` uses `numeric_int4_safe()`. A patch was proposed to switch `split_part()` to use `numeric_int4_safe()` and integrate with the jsonpath error handling mechanism. Commenter 1 confirmed the bug and verified the patch's effectiveness. Reviewer acknowledged the problem and confirmed they would double-check the relevant code areas, which they later reported doing without finding similar issues.
Recent Replies
The reviewer confirms that they have thoroughly checked the related code areas for similar issues and found none. This indicates that the proposed fix addresses a specific problem without introducing new ones or overlooking other instances of the same bug pattern, and they praised the overall quality of the work.
May 14, 2026 23:40
The latest reply from a commenter acknowledges the work done on the patch. The commenter stated that the primary reviewer "beat them to it" in reviewing, implying agreement with the findings and the proposed fix.
May 14, 2026 12:29
The latest reply from a core developer confirms the bug identified by the proposer, calling it a "good catch." The developer indicates an intention to further investigate the code area before taking any action, implying a final check is needed prior to accepting the proposed fix.
May 14, 2026 06:02
Improve pg_stat_statements scalability Patch Review 4 msgs May 11, 2026 23:53
View on pgsql-hackers archive →
Summary
The proposer initiated a discussion on improving the scalability of pg_stat_statements, highlighting three primary issues: high spinlock contention, performance bottlenecks during hash table deallocation under exclusive locks, and query text file bloat with inefficient garbage collection. The proposed solution leverages the existing PostgreSQL statistics collector (pgstat) system, which offers local stat writing, periodic flushing to shared memory, and dynamic resizing capabilities. The work builds on recent PostgreSQL developments in pluggable cumulative statistics and serialization callbacks. The proposer later reorganized the patches and fixed an issue causing CI failures related to parallel query execution, providing an updated series.
Recent Replies
The latest reply from the proposer (Message 4) addresses a CI failure encountered on FreeBSD with parallel query execution. The proposer describes the fix, which involves modifying the test setup and marking relevant pg_stat_statements functions as PARALLEL RESTRICTED to ensure stats are correctly accumulated by the leader process. The proposer also briefly questioned the implications of these changes for older versions.
May 20, 2026 22:59
The proposer provided an update, stating that an issue causing CI failures with the serialization callback has been resolved. The patch series was also reorganized into four distinct patches. These patches now include an in-transaction flush as a dependency, the main migration of the pg_stat_statements hash to a custom pgstat kind, the move of the query text file to DSA + file storage, and the addition of new columns to pg_stat_statements_info, refining the proposal for further review.
May 17, 2026 17:37
The proposer clarifies that further testing for spinlock contention will be conducted on a machine with a much higher core count. This is intended to more effectively demonstrate the benefits of the proposed patch series in environments where such contention is a significant performance bottleneck.
May 12, 2026 00:35
[PATCH] Fix psql tab completion for REPACK boolean options Committed 9 msgs May 11, 2026 19:45
View on pgsql-hackers archive →
Summary
The thread began with the proposer identifying and fixing a bug in `psql`'s tab completion for `REPACK`'s boolean options (`ANALYZE`, `CONCURRENTLY`, `VERBOSE`). The original implementation used `TailMatches` incorrectly, requiring all options to appear sequentially instead of as alternatives. The proposer's patch, which switched to pipe-separated alternatives, was reviewed and committed. During subsequent testing, reviewer 1 discovered two additional related bugs in `REPACK`'s parsing: `CONCURRENTLY OFF` was incorrectly treated as an unrecognized option, and specifying the same option multiple times did not always honor the last value (e.g., `ON` overriding a final `OFF`). A second patch addressing these parsing issues was also proposed, reviewed, and committed. The thread concluded with a discussion about potential future refactoring to centralize the `DefElem` list processing logic across commands like `REPACK`, `VACUUM`, and `EXPLAIN` to prevent similar bugs.
Recent Replies
The latest reply, from commenter 1, clarifies a previous suggestion regarding generalized option handling. Commenter 1 emphasizes that the proposal is not for shared option definitions but for a common routine to process the `DefElem` list, handling aspects like last-duplicate-wins, rejecting unknown options, and type coercion, thereby centralizing this logic for commands like `REPACK` and `VACUUM`.
May 18, 2026 12:29
A reviewer responded to a commenter's query about consolidating option handling logic across REPACK, VACUUM, and EXPLAIN. The reviewer suggested that the options for these commands might not be entirely uniform but invited the commenter to propose a patch if they identified concrete opportunities for code improvement and consolidation.
May 18, 2026 11:49
Commenter 1 notes the recent commitment of the patch fixing `REPACK`'s parsing issues. They then inquire whether it would be beneficial to unify the option handling logic for commands like `REPACK`, `VACUUM`, and `EXPLAIN` into a single, centralized mechanism.
May 18, 2026 11:04
[PATCH] Rebuild CHECK constraints after generated column SET EXPRESSION Patch Review 11 msgs May 11, 2026 09:58
View on pgsql-hackers archive →
Summary
The proposer identified a bug where `ALTER TABLE ... ALTER COLUMN ... SET EXPRESSION` failed to rebuild `CHECK` constraints that referenced a generated column using a whole-row `Var`, potentially leaving the table in an inconsistent state. The proposer's initial patch aimed to rebuild all `CHECK` constraints. Commenter 1 then expanded the scope to include whole-row references in indexes and RLS policies, demonstrating a more comprehensive solution across several patch versions. Discussion revolved around the detailed implementation, appropriate error messages, and whether to disallow `SET EXPRESSION` for whole-row policy references. Through several iterations, the patch was refined to correctly revalidate `CHECK` constraints and rebuild indexes, while safely ignoring whole-row policy references for `SET EXPRESSION` as they do not require action. The latest review confirmed the patch's effectiveness and correct behavior.
Recent Replies
The latest reviewer confirmed that the most recent patch (v5) applied cleanly and built successfully. The reviewer validated that the patch effectively resolves the reported issue, specifically by ensuring that `ALTER COLUMN SET EXPRESSION` correctly fails when existing whole-row `CHECK` constraints would be violated, rather than silently succeeding. The reviewer concluded that both the fix and its associated regression coverage are satisfactory.
May 19, 2026 05:31
In the latest reply, the original proposer acknowledges that the v5 patch successfully addresses the previous concerns regarding policy handling by correctly ignoring whole-row policy references for `SET EXPRESSION`. The proposer indicates that they have no further comments, signifying their approval of the current patch version.
May 16, 2026 07:18
The latest reply from the reviewer confirms that policy objects containing whole-row variable references can be safely ignored for `AT_SetExpression`, addressing a key concern raised by the proposer. The reviewer also clarifies that the function signature for `RememberWholeRowDependentForRebuilding()` is maintained for potential future compatibility with other `ALTER TABLE` commands.
May 16, 2026 06:07
[PATCH] Make NumericVar storage semantics explicit Patch Review 4 msgs May 10, 2026 14:12
View on pgsql-hackers archive →
Summary
The proposer initiated a refactoring effort to make the memory and ownership semantics of NumericVar explicit, reorganizing helper functions for clarity and maintainability. The goal is to establish a clear, consistent internal contract for digit-buffer acquisition, release, borrowing, and writing, rather than altering numeric algorithms or immediately boosting performance. The proposer released multiple versions of the patch, addressing a bug where set_var_from_var() could pass NULL to memcpy() for zero NumericVar and fixing a test instability. The latest update (v4) specifically ensured the re-inclusion of the set_var_from_var() fix.
Recent Replies
The proposer released the fourth version of the patch (v4). This update primarily restores a critical fix for a bug in set_var_from_var() that was accidentally omitted in the previous version (v3). No other design changes were intended or made in this refresh, focusing solely on ensuring the correct implementation of the previously identified bug fix.
May 16, 2026 14:32
The proposer provided another refresh of the patch, stating that a test instability was found and fixed. This indicates continued active development and refinement of the proposed changes to `NumericVar` storage semantics.
May 16, 2026 04:37
The latest reply from the proposer provides v2 of the patch. This update specifically addresses a bug found by CI/UBSan in the `set_var_from_var()` function, where a finite zero NumericVar could lead to `memcpy()` being called with a `NULL` pointer despite a zero copy length. No other design changes were intended in this updated version, which is presented as a refreshed, complete patch series.
May 11, 2026 10:55
[PATCH] Release replication slot on error in SQL-callable slot functions Patch Review 4 msgs May 9, 2026 20:45
View on pgsql-hackers archive →
Summary
The proposer reported a bug where SQL-callable replication slot functions (like pg_replication_slot_advance) can fail to release an acquired replication slot if an error occurs and is caught by a PL/pgSQL EXCEPTION block. This leads to a stale MyReplicationSlot process-global variable, causing an Assert crash in debug builds or silently orphaning the slot in release builds. Orphaned slots prevent other sessions from acquiring them and block vacuum and WAL deletion. The proposer provided a patch using PG_TRY/PG_CATCH blocks to ensure ReplicationSlotRelease() is called on error. Reviewers confirmed the approach, but raised questions about handling temporary logical replication slots which ReplicationSlotRelease() might not fully drop, and identified other functions (pg_copy_logical_replication_slot(), pg_logical_slot_get_changes()) that might suffer from similar issues, requiring a broader fix.
Recent Replies
The latest reply is from the proposer, acknowledging the feedback received from the reviewers. The message is truncated, suggesting they are in the process of responding to the points raised, which included concerns about temporary slots and other related functions needing similar fixes.
May 21, 2026 14:38
A reviewer confirmed that the issue extends to `pg_logical_slot_get_changes`, providing a specific reproduction scenario. This indicates that the proposed fix may need to cover additional SQL-callable functions beyond those initially considered, broadening the scope of the problem to be addressed.
May 21, 2026 06:49
[SQL/PGQ] Early pruning for GRAPH_TABLE path generation Discussing 9 msgs May 9, 2026 07:25
View on pgsql-hackers archive →
Summary
This thread discusses an optimization for `GRAPH_TABLE` path generation. The proposer introduced a patch for "early pruning" during Depth-First Search (DFS) path construction. This change aims to improve performance by checking edge-vertex adjacency constraints proactively, thereby avoiding the enumeration of infeasible full-length paths, a common issue leading to memory exhaustion. Commenter 1 reviewed the patch extensively, confirming its correctness, architectural soundness, and positive impact on performance, while also suggesting minor improvements and requesting regression tests, which the proposer addressed in subsequent versions. However, Commenter 2 raised concerns about the potential complexity this "failing early" strategy might introduce for future advanced features like variable-length or embedded path patterns, suggesting a delay or further discussion on its long-term compatibility. The proposer provided profiling data to demonstrate the significant time consumed by path expansion.
Recent Replies
The proposer addressed some cosmetic comments from a reviewer, including moving an `if` statement and adding comments for `rev_feasible`. Responding to a request for performance data, the proposer provided temporary time logs demonstrating that path expansion within `generate_queries_for_path_pattern_recurse` is indeed consuming a significant amount of the query execution time. The proposer also acknowledged the reviewer's architectural concerns regarding future features.
May 14, 2026 15:30
The latest reply from a core developer acknowledges the impressive performance gains from the early pruning patch. However, the developer raises concerns about whether this implementation strategy might hinder the development of more advanced graph query features in the future. The developer suggests delaying the patch's commitment to thoroughly assess its impact on future work, unless its absence renders current functionality prohibitively slow. The developer also provides minor stylistic suggestions and recommends submitting the `CHECK_FOR_INTERRUPTS` change as a separate patch.
May 14, 2026 06:25
Reviewer 1 provided a quick review of the v2 patch, confirming that prior notes were addressed. A minor fix was requested for the newly added regression test (0002), specifically to replace a Unicode arrow character with an ASCII equivalent in both the .sql and .out files. The reviewer also acknowledged and affirmed the proposer's updated commit message description for existing test coverage and the reasoning behind the `Assert` change for path factor alternation.
May 14, 2026 00:38
Parallel INSERT SELECT take 2 Discussing 6 msgs May 8, 2026 23:58
View on pgsql-hackers archive →
Summary
This thread re-opens the discussion on parallelizing INSERT ... SELECT queries, a feature previously committed and then reverted due to overhead concerns with partitioned tables. The proposer rebased an old patch and summarized the historical context and challenges. The main discussion point revolves around a "declarative approach" involving a pg_class attribute to store parallel safety information. The proposer advocates for automatically updating this flag, while a commenter highlights the complexity, locking issues, and race conditions associated with such an automatic update, particularly with concurrent DDLs affecting functions used in expressions. The proposer acknowledges the complexity but questions the frequency of such operations in production. An alternative idea of fully materializing the SELECT result before INSERT is also brought up, which could simplify concurrency but might limit future extensions to UPDATE/DELETE due to EvalPlanQual (EPQ) concerns. The discussion is evaluating fundamental design choices and their long-term implications.
Recent Replies
The latest reply discusses an alternative approach: materializing the SELECT result into a temporary store before the INSERT. The proposer queries the implications of this approach, particularly regarding EvalPlanQual (EPQ), which is crucial for UPDATE/DELETE but not directly for INSERT. The proposer wonders if this materialization approach would be acceptable if the feature is limited to INSERT, or if it would hinder future expansion to other DML types that require EPQ rechecks.
May 17, 2026 11:24
The latest reply from the proposer acknowledged the complexity of automatically adjusting parallel safety flags, particularly concerning concurrent DDLs and function dependencies. They suggested that requiring exclusive locks on functions for changes to their parallel safety might be a pragmatic, albeit not ideal, solution given the expected infrequency of such operations. They also proposed an alternative: restricting the ability to change the parallel safety flag after initial relation creation.
May 11, 2026 11:44
The latest reply from commenter 1 is a short acknowledgement of the proposer's previous message. It indicates continued engagement in the discussion but doesn't introduce new content, primarily serving as a placeholder for further engagement on the core design choice regarding automatic versus declarative parallel safety for target relations.
May 11, 2026 07:21
[RFC PATCH v0 0/7] Add EXPLAIN ANALYZE wait event reporting Discussing 4 msgs May 8, 2026 23:22
View on pgsql-hackers archive →
Summary
This thread is an RFC proposing to add EXPLAIN (ANALYZE, WAITS) functionality to PostgreSQL. The proposed feature would report completed wait intervals observed during statement execution, attributing them to both statement-level and plan-node levels. Statement-level waits would include parallel worker waits, and plan-node attribution would be inclusive, meaning a wait is attributed to all active nodes when it begins. The implementation uses fixed-size accumulators to avoid allocation overhead during wait-end accounting, with an overflow mechanism for additional distinct wait events. The proposer has outlined several key design questions for discussion, including the option name (WAITS vs WAIT_EVENTS), the inclusive per-node attribution semantics, the fixed accumulator size and overflow handling, and the hot-path overhead. Initial versions of the patch have been submitted, with subsequent versions focusing on improving regression test stability.
Recent Replies
The latest reply introduces v2 of the patch series, which focuses solely on improving regression test coverage and stability. This update addresses issues where earlier tests assumed a too narrow statement-level wait list and adjusts JSON tests to robustly find specific wait events. It also disables parallel query settings for serial tests to ensure determinism. No core accounting code changes were made, and the original RFC design questions remain open for discussion.
May 18, 2026 06:11
The latest reply from the proposer re-submitted the initial RFC patch series as a single email, addressing a formatting suggestion from a commenter. This action ensures adherence to mailing list practices. No functional code changes were introduced from the previous version; the message reiterated the core functionality and the key review questions for the proposed `EXPLAIN (ANALYZE, WAITS)` feature.
May 14, 2026 11:19
Commenter 1 provides feedback on the submission process, instructing the proposer that the standard practice for submitting a series of patches to the PostgreSQL mailing lists is to consolidate all individual patches into a single email, rather than sending each patch as a separate email in the thread.
May 11, 2026 03:50
[PATCH] psql: Make ParseVariableDouble reject values above max Committed 3 msgs May 8, 2026 15:39
View on pgsql-hackers archive →
Summary
The proposer identified an asymmetric bug in the `ParseVariableDouble()` function within `src/bin/psql/variables.c`. The function correctly rejected values below its minimum bound but incorrectly assigned values exceeding its maximum bound, despite logging an error. This behavior violated the function's contract that `*result` should not be modified on unsuccessful validation. A user-visible example was an out-of-range `WATCH_INTERVAL` variable being reported as invalid but still set. The committer acknowledged the bug and committed the fix, which also included backpatching to an earlier version and adding a new test case to ensure correct behavior.
Recent Replies
The latest message from the committer confirms that the patch has been pushed and backpatched to v18, along with the addition of a test case. This signifies the successful resolution and commitment of the fix for the `ParseVariableDouble()` bug.
May 18, 2026 15:41
(SQL/PGQ) cache lookup failed for label Patch Review 12 msgs May 8, 2026 08:39
View on pgsql-hackers archive →
Summary
The thread discusses a bug where dropping a label or property from a property graph, which is used by a view created with GRAPH_TABLE, causes a "cache lookup failed for label" error when querying the view. The proposer initially reported the issue and provided a patch. Due to the proposer's unavailability, a reviewer took over the patch development. The root cause was identified as missing dependency tracking for GraphLabelRef and GraphPropertyRef nodes in views. A new patch was developed that adds appropriate dependency walker cases, preventing the problematic ALTER PROPERTY GRAPH operations if a view depends on the label or property. Multiple reviewers provided feedback, leading to several patch versions, with the latest incorporating comprehensive regression tests covering label and property drops in various contexts, including GRAPH_TABLE pattern and column lists. The patch is now marked as "Ready for Committer".
Recent Replies
The latest reply from a reviewer confirms that the latest patch version (v3 from another contributor) looks good and has been marked as "Ready for Committer" in the CommitFest system. This indicates a consensus among reviewers that the proposed fix and its test coverage adequately resolve the reported bug, preparing it for a committer to apply it to the codebase.
May 18, 2026 06:26
Reviewer 1 continued the discussion regarding the patch. Reviewer 1 commented on a potential inconsistency in the comments within `expression_tree_walker()` regarding when `false` is returned. Reviewer 1 suggested that the newly added `GraphLabelRef` and `GraphPropertyRef` nodes' reliance on `expression_tree_walker()` is acceptable, but the misleading comment should be removed for clarity.
May 18, 2026 02:07
The latest reply from reviewer 1 continues a detailed code review, specifically addressing an earlier comment about the internal consistency of the expression_tree_walker() function. The reviewer elaborates on the behavior of return false for primitive nodes and its implications for the newly added GraphLabelRef and GraphPropertyRef cases, suggesting a more consistent approach to comments and behavior in the patch.
May 18, 2026 00:22
[Bug]Assertion failure in LATERAL GRAPH_TABLE with multi-label pattern Patch Review 4 msgs May 7, 2026 04:13
View on pgsql-hackers archive →
Summary
This thread addresses an assertion failure encountered when using LATERAL GRAPH_TABLE with patterns matching multiple path queries. The proposer identified the bug, occurring in create_lateral_join_info when GRAPH_TABLE is used with UNION ALL for multi-label patterns, leading to !bms_is_member(rti, lateral_relids) assertion. The root cause was traced to rewriteGraphTable() bumping outer Vars for the initial subquery, but generate_setop_from_pathqueries() failing to bump Vars again when wrapping each path query in further subquery RTEs for the UNION ALL operation. This caused the lateral reference to incorrectly collapse onto the GRAPH_TABLE's own RTE. The proposed fix involves incrementing the sublevels_up for Vars within each lquery before it's wrapped in an RTE_SUBQUERY. A reviewer provided feedback on code comments, requested a clearer explanation of the connection between varlevelsup, subquery RTE addition, and the assertion failure, and suggested refining the provided test cases.
Recent Replies
The latest message is from a reviewer, indicating continued review of the patch. The content is truncated, but it's a direct response to the proposer's earlier clarifications regarding multi-line comments and the necessity of specific test cases. It implies ongoing discussion and refinement of the patch based on the review feedback.
May 19, 2026 15:15
The proposer acknowledges the feedback from reviewer 1 regarding the submitted patch. Reviewer 1 had previously provided detailed comments, suggesting improvements to the commit message's explanation of the bug's connection between `varlevelsup` and `RTEs`, and recommending a consolidation of the proposed tests. The latest reply from the proposer is a simple acknowledgement of these points, without further technical detail or a revised patch yet.
May 12, 2026 17:41
The reviewer provided feedback on the patch, suggesting an improved comment for the `IncrementVarSublevelsUp` call to clarify its purpose. The reviewer also requested a detailed explanation in the commit message about how `varlevelsup` relates to subquery RTEs and the observed assertion failure. Additionally, the reviewer advised removing one of the two test cases and relocating the remaining one to an appropriate section for lateral references.
May 12, 2026 11:15
Proposal: Conflict log history table for Logical Replication Patch Review 59 msgs May 5, 2026 05:25
View on pgsql-hackers archive →
Summary
This thread discusses the proposal and implementation of a conflict log history table for PostgreSQL's Logical Replication feature. The proposer introduced a series of patches (up to v37) to create a system-managed `pg_conflict` schema and associated tables to record replication conflicts. Key discussion points include the design of the `ConflictLogDest` enum, handling of schema renaming for `pg_conflict` (comparing it to `pg_catalog`), and the management of internal dependencies for the conflict log tables. Reviewers provided detailed feedback on code structure, commit messages, documentation accuracy, and test cases. Specific suggestions were made regarding the naming and refactoring of dependency management functions, ordering of schema definitions, and clarification of documentation related to conflict logging behavior and JSON array descriptions. The broader implication of preserving subscription OID was also raised as a separate but related concern. The overall aim is to refine the implementation for robustness, clarity, and maintainability.
Recent Replies
The latest reply, from commenter 1, offers three specific comments on the v36-008 and v36-009 documentation patches. Commenter 1 suggests rephrasing text to clarify "conflict attempt" and better describe the "local_conflicts" JSON array. Commenter 1 also advises specifying that the `conflict_log_destination` parameter *only* creates a table when set to 'table' or 'all', and recommends linking the term "Conflicts" to the relevant chapter in the documentation for improved clarity.
May 21, 2026 10:39
A reviewer provided further review comments, confirming that a commit message update for the conflict log table name was handled in an earlier patch. The reviewer also re-affirmed that the current approach of checking for `operation != CMD_DELETE` in `execMain.c` to enforce DML restrictions on conflict log tables is acceptable, even with `TRUNCATE` handled as a separate utility command.
May 21, 2026 07:13
The latest reply from commenter 1 raises a strategic concern regarding patch 007's logic for preserving subscription OIDs. Commenter 1 notes that this functionality is needed by another ongoing thread and had been previously rejected as a standalone effort. Commenter 1 suggests extracting this specific feature into its own, separate thread to avoid making it a dependency of the current patch set, promoting better modularity and addressing its broader implications.
May 21, 2026 06:01
Adjust pg_stat_get_lock() prorows to match lock types Patch Review 2 msgs May 4, 2026 02:23
View on pgsql-hackers archive →
Summary
The proposer observed that the `pg_stat_get_lock()` function consistently returns 12 rows, yet its `prorows` estimate in `pg_proc.dat` is defined as 10. This discrepancy leads to an inaccurate row count estimate for the planner. The proposer submitted a patch to correct the `prorows` value to 12, thereby improving the planner's accuracy, given that the number of lock types is stable. The patch also includes minor adjustments to function comments in `pgstat_lock.c`. The proposer subsequently rebased the patch, indicating continued maintenance and readiness for review.
Recent Replies
The latest reply from the proposer simply indicated that the patch had been rebased. This action typically means the patch was updated to apply cleanly against the latest development branch, ensuring its continued relevance for review without introducing new content or discussion.
May 15, 2026 08:34
[PATCH] btree_gist: add cross-type integer operator support for GiST Patch Review 2 msgs May 2, 2026 17:26
View on pgsql-hackers archive →
Summary
This thread proposes a patch to add cross-type integer operator support (int2, int4, int8) to the btree_gist GiST operator families. Currently, GiST indexes only work with exact type matches, preventing the planner from using an index when a query uses a compatible but different integer type (e.g., int8 column compared with an int4 literal). The proposed solution extends the gist_int2_ops, gist_int4_ops, and gist_int8_ops families with cross-type comparison and KNN-distance operators. Instead of registering new support functions for each cross-type combination, the patch dispatches cross-type queries directly within existing consistent and distance functions, leveraging existing subtype information. This aims to improve index usability without requiring explicit casts in queries. A patch and reproduction scripts were submitted.
Recent Replies
The latest reply is a "bump" from the proposer, indicating that no feedback has been received on the submitted patch yet. The proposer is nudging the thread to encourage reviewers to look at the patch and provide comments.
May 17, 2026 10:28
Enforce INSERT RLS checks for FOR PORTION OF leftovers? Discussing 3 msgs May 1, 2026 18:53
View on pgsql-hackers archive →
Summary
The thread discusses a potential discrepancy in PostgreSQL's Row Level Security (RLS) implementation concerning `UPDATE/DELETE FOR PORTION OF` commands. The proposer observed that when these commands insert temporal "leftover" rows, they bypass `INSERT RLS WITH CHECK` policies, even though these are newly inserted rows. The proposer provided a SQL example demonstrating this bypass and suggested a patch to enforce `CMD_INSERT` RLS policies for such operations. A commenter, however, argued that skipping these `INSERT RLS` checks is the correct and intended behavior, consistent with how ACL checks are bypassed for leftovers. The commenter posited that leftover rows semantically preserve existing history rather than creating new data that would be subject to `INSERT` policies. The commenter offered to prepare a documentation patch to clarify this behavior, indicating a preference against the proposed functional change.
Recent Replies
The latest reply from a commenter argues against enforcing `INSERT RLS WITH CHECK` policies for "leftover" rows created by `UPDATE/DELETE FOR PORTION OF` commands. The commenter believes that skipping these checks is the correct and consistent behavior, as leftover rows are meant to preserve existing history rather than representing new data subject to `INSERT` policies. The commenter offers to update the documentation to explicitly state this behavior.
May 16, 2026 16:50
Refactor: allow pg_strncoll(), etc., to accept -1 length for NUL-terminated cstrings. Committed 4 msgs May 1, 2026 16:40
View on pgsql-hackers archive →
Summary
The thread discusses a proposal to refactor pg_strncoll(), pg_strnxfrm(), and pg_strnxfrm_prefix() to allow a -1 length argument to signify NUL-terminated strings, similar to ICU's API. The initial proposer intended this to simplify the API. However, a reviewer immediately raised concerns that this change would complicate compiler annotations for memory access (e.g., ubsan), making them less accurate. The reviewer also argued it would lead to more complex code with numerous conditional branches. The proposer accepted this feedback, acknowledging the interference with useful debugging tools. The proposer then submitted a revised patch that avoids the -1 length convention, which was positively received by the reviewer, who highlighted its benefits for instrument-ability and potential runtime performance. The proposer announced plans to commit the revised patch.
Recent Replies
The reviewer expressed gratitude for the revised patch, reaffirming the benefits for debugging tools and memory access analysis. The reviewer also suggested that removing the -1 length special cases could improve runtime performance by reducing conditional branching.
May 14, 2026 22:17
[PATCH] Preserve replication origin OIDs in pg_upgrade Patch Review 13 msgs Apr 28, 2026 11:19
View on pgsql-hackers archive →
Summary
This thread addresses a critical `pg_upgrade` problem concerning logical replication origins. When upgrading a subscriber, `pg_commit_ts` data (containing replication origin IDs or roidents) is copied directly. However, new subscription OIDs and roidents are assigned during upgrade, leading to mismatches and `update_origin_differs` conflicts. The proposer initially aimed to preserve roidents. Commenters suggested a more fundamental change: preserving subscription OIDs, which would stabilize origin names and, thus, simplify roident preservation. A rebased patch (v3) incorporated this, allowing all replication origins from the old cluster to be copied with matching names and IDs. The patch is now undergoing detailed review, with feedback on backward compatibility (supporting PG17+), code style, potential SQL injection, locking mechanisms, and catalog types. The proposer is actively addressing these comments and iterating on the patch.
Recent Replies
The proposer announces that the patch has been rebased to apply cleanly against the current `master` branch. This step is part of the ongoing development and refinement process, ensuring the proposed changes remain compatible with the latest codebase.
May 18, 2026 10:42
The proposer responded to a reviewer's feedback by making several fixes and clarifications. These include removing dead code, adding a truncation check for `ReplOriginId` arguments, refactoring a function to optimize locking, eliminating a redundant format check, and correctly identifying `pg_replication_origin` as a shared catalog. Additionally, the proposer changed a function's `proparallel` setting to 'u' to resolve a build failure on FreeBSD.
May 13, 2026 01:57
The latest reply from reviewer 4 offers further minor feedback on the updated patch. The reviewer points out that `binary_upgrade_replorigin_advance` appears to be dead code and notes a potential truncation issue with `ReplOriginId` when casting an OID. They also questioned redundant locking of `ReplicationOriginRelationId` and a superfluous format check. Additionally, the reviewer asked for clarification on whether `pg_replication_origin` is considered a shared catalog.
May 11, 2026 18:32
[PATCH] Fix overflow and underflow in regr_r2() Discussing 8 msgs Apr 27, 2026 11:18
View on pgsql-hackers archive →
Summary
This thread focuses on fixing overflow and underflow issues in PostgreSQL's statistical aggregate functions. The proposer initially submitted a patch to address `regr_r2()`'s direct computation of `(Sxy * Sxy) / (Sxx * Syy)`, which can lead to results like NaN due to extreme scale values. Reviewer 1 provided a refined patch, suggesting to keep the stabilization logic local to `float8_regr_r2()` and improve test cases, which was accepted by reviewer 2. The discussion then expanded to include `regr_intercept()`, which also exhibits similar computational vulnerabilities. Reviewer 1 proposed a more robust solution for `regr_intercept()` using `frexp()` and `ldexp()` to handle extreme values, which is currently under review.
Recent Replies
The latest reply presents a more complete patch for `regr_intercept()`, utilizing `frexp()` and `ldexp()` to prevent overflow and underflow. The proposer confirms this patch is designed to be applied on top of the `regr_r2()` fix and briefly explains why the final subtraction step is not expected to overflow.
May 17, 2026 09:16
The latest reply from the reviewer further analyzes the potential for overflow/underflow in `float8_regr_intercept()`. It proposes a new, more robust calculation method for the `Sx * Sxy / Sxx` term within this function. The suggested approach leverages the C99 functions `frexp()` and `ldexp()` to stabilize the computation, allowing for accurate results even when intermediate products or quotients are extremely large or small.
May 16, 2026 20:34
The latest reply from the reviewer responds to another reviewer's suggestion about improving `regr_intercept()`'s overflow/underflow handling. The reviewer demonstrates with an example that the proposed simplification to `regr_intercept()` could lead to new overflow issues, arguing that the current implementation is better in certain extreme cases and suggesting that a robust fix might require trying multiple computation orderings.
May 16, 2026 18:03
[PATCH] Fix ProcKill lock-group vs procLatch recycle race Patch Review 11 msgs Apr 27, 2026 08:14
View on pgsql-hackers archive →
Summary
This thread addresses a critical concurrency bug in the `ProcKill()` function, present in PostgreSQL versions since 9.6. The proposer identified a race condition where a lock-group leader's `PGPROC` can be returned to the freelist while its `procLatch` is still owned, leading to a `PANIC: latch already owned by PID ...` when the slot is recycled. The proposer detailed the specific interleaving causing the bug and provided initial patches. Reviewer 1 confirmed the issue's reality and severity, noting similar reports from other users, and helped rebase the patches for clarity. Reviewer 2 provided in-depth feedback on the core fix—ensuring `DisownLatch()` occurs earlier—and on the test infrastructure, including the handling of injection points. The discussion evolved around refining the test harness and the main fix, with the proposer submitting new patches to incorporate the review feedback.
Recent Replies
The proposer, in response to a reviewer's feedback, confirms that the test has been adjusted to use distinct injection points for the lock group leader and follower. This change aligns with the reviewer's clarification that `injection_points_wakeup()` is intended to wake only one process at a time.
May 18, 2026 10:11
Reviewer 2 confirmed that patch 0001, which creates `injection_point_condition.h`, has been applied. However, the reviewer rejected patch 0002, stating that the current behavior of `injection_points_wakeup()` waking only one process is intentional and changing this, especially for back-branches, is not advisable. The main bug fix remains under active review.
May 18, 2026 03:15
The proposer provides a new patch series (vVL2-) addressing previous review comments, particularly from reviewer 3. The creation of injection_point_condition.h has been moved into a separate commit (0001). A question is raised about the intended behavior of injection_points_wakeup() – whether it should wake only one process or multiple, with a proposed change in patch 0002. The proposer confirms that the race condition is now demonstrably fixed with an additional injection point in patch 0003.
May 15, 2026 12:29
Adding REPACK [concurrently] Rejected 22 msgs Apr 27, 2026 04:25
View on pgsql-hackers archive →
Summary
This thread discusses the implementation of 'REPACK CONCURRENTLY', particularly focusing on the use of database-specific snapshots within the logical decoding mechanism. Initial concerns were raised about a plugin's declaration of not using shared catalogs, which led to a broader discussion about potential indirect breakages. The proposer identified a critical issue where the snapshot builder's transaction processing could incorrectly consider committed transactions as running when using database-specific snapshots, leading to lost data effects. A reviewer provided a clear method to reproduce this WAL ordering problem. Further architectural concerns were raised by another commenter regarding the fundamental mismatch between database-specific snapshots and the cluster-wide design of logical decoding, citing inefficiencies and limitations, such as incompatibility with standby servers. Due to these significant architectural challenges and the limited time before beta 1, a core developer decided to revert the database-specific snapshot aspect of 'REPACK CONCURRENTLY' for the current release (PostgreSQL 19), with the intention to revisit and redesign the feature for a future release (PostgreSQL 20).
Recent Replies
The reviewer acknowledges the architectural concerns regarding the interaction between database-specific snapshots and the cluster-wide logical decoding machinery. Given the scarcity of time before beta 1, the reviewer agrees that it is prudent to revert the database-specific snapshot functionality for 'REPACK CONCURRENTLY' in the current release. The feature will be reconsidered for a future version after a more thorough architectural review.
May 19, 2026 18:52
The latest reply by reviewer 1 highlights fundamental architectural issues with the current implementation of database-specific snapshots in logical decoding. The reviewer pointed out inefficiencies like tracking cluster-wide XIDs for db-specific snapshots and the general mismatch with the cluster-wide design of logical decoding. Given these concerns and the time constraints, the reviewer reiterated the suggestion to revert this feature for the current release and re-evaluate its design in future development cycles.
May 14, 2026 07:02
The latest reply from reviewer 1 acknowledges the significant concerns raised by commenter 2 regarding db-specific snapshots in logical decoding, including its inefficiencies and limitations on standbys. The reviewer outlines two paths forward: either accept the current patch with further fixes for inefficiencies or revert the db-specific snapshots part for the current release and revisit it later. The reviewer also questions the practical impact of the standby limitation for the REPACK operation.
May 13, 2026 16:58
COPY ON_CONFLICT TABLE; save duplicated record to another table. Patch Review 9 msgs Apr 25, 2026 04:12
View on pgsql-hackers archive →
Summary
This thread proposes a new `ON_CONFLICT TABLE` clause for the `COPY FROM` command, enabling the redirection of duplicate rows to a specified error table instead of aborting the entire load. The proposer outlined an initial implementation using a fixed four-column structure for the conflict table and leveraging `INSERT ON CONFLICT` mechanisms. Reviewers identified several critical issues across multiple patch versions, including null pointer dereferences, data loss scenarios, crashes with partitioned tables and repeatable reads, and incorrect behavior in binary mode. Concerns were also raised about the firing of triggers on the `CONFLICT_TABLE` and the handling of exclusion constraints. The proposer refactored the implementation to use exported `ExecInsert` functionality for better integration with the executor. While many issues have been addressed incrementally through v1 to v3 patches, ongoing discussions persist regarding relation lifecycle management, trigger behavior, and clear documentation of exclusion constraint interactions.
Recent Replies
The latest reply from reviewer 2 highlights persistent issues with early closing of a relation (cstate->conflictRel), which can lead to crashes. The reviewer also questions the behavior of exclusion constraints, noting that `EXCLUDE USING gist` appears to work but triggers a generic unique constraint violation message. Additionally, concerns are raised about row-level triggers on the conflict table silently dropping rows, suggesting a need for more transparent behavior or documentation.
May 15, 2026 11:56
The latest reply from a reviewer offers further detailed feedback on the current patch (v3). The reviewer notes that a relation is being closed prematurely within the `BeginCopyFrom()` function and suggests relocating this operation to `EndCopyFrom()`. Additionally, the reviewer points out redundant `if` blocks in the code, identifies several typos in comments, and advises correcting a comment that references "on error" when it should refer to "on conflict".
May 12, 2026 13:27
The proposer, in their latest response, clarified several points raised by reviewer 2 regarding the v3 patch. They explained why supporting ON_CONFLICT in binary mode is challenging and arguably unnecessary. They detailed changes to the trigger firing logic for the conflict table, ensuring statement-level triggers fire unconditionally and row-level triggers fire for each inserted row. Additionally, the error message for incorrect conflict table column count was refined, and regression tests for permissions were added.
May 12, 2026 08:15
Add a guard against uninitialized default locale Patch Review 3 msgs Apr 24, 2026 22:44
View on pgsql-hackers archive →
Summary
This thread discusses a patch designed to add a guard against potential NULL pointer dereferences that could occur if `pg_newlocale_from_collation(DEFAULT_COLLATION_OID)` is called from `_PG_init()` when the default locale is uninitialized. The proposer notes that while this specific scenario might not be currently reachable, the patch serves as a robust defense against similar issues in the future, particularly for extensions. The proposer also indicated plans to commit and backport the patch through PostgreSQL 17, with a slightly different version for the 17 release. A reviewer has approved the patch, offering only a minor suggestion for improving a comment in the PG 17-specific patch for greater clarity.
Recent Replies
The reviewer provides positive feedback on the proposed patch, indicating it 'looks good'. The reviewer offers a minor suggestion for a comment in the PG 17 backport patch, proposing a more explicit explanation for the `\0` check, such as `/* provider unset; init_database_collation() not yet run */`, while acknowledging the proposer's preference for consistent commenting.
May 15, 2026 03:42
The proposer reiterated the intention to commit the patch shortly and backport it to relevant stable branches, confirming the proposed solution to prevent potential NULL pointer dereferences related to uninitialized default locales.
May 14, 2026 22:00
Startup process deadlock: WaitForProcSignalBarriers vs aux process Committed 11 msgs Apr 22, 2026 11:21
View on pgsql-hackers archive →
Summary
This thread investigates a deadlock encountered in the startup process, where it indefinitely waits for an auxiliary process (like the checkpointer) to acknowledge a ProcSignalBarrier. Initially, a reporter hypothesized the issue was due to signals being sent before the auxiliary process registered its handlers. However, a reviewer clarified that signals are blocked during child process startup, preventing this specific race. The reviewer then identified a different, more subtle race condition: EmitProcSignalBarrier() might skip signaling a process if its PID is not yet set in the shared memory slot, even if its barrier generation count is already initialized. This causes the waiting process to deadlock. Another reviewer confirmed this scenario with a test case and reproduced buildfarm failures. A patch was provided to address this race condition, which was successfully tested and confirmed to resolve the issue. The discussion concluded with the patch being committed and backported to versions 15 and newer, as the vulnerability, while more exposed by recent changes, existed in earlier versions with other operations like DROP DATABASE.
Recent Replies
The committer confirms that the patch addressing the startup process deadlock has been committed. The issue, identified as a race condition during ProcSignalInit() where EmitProcSignalBarrier() could miss processes, was confirmed to exist in versions 15 through master and is now resolved.
May 14, 2026 21:47
Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server Discussing 15 msgs Apr 22, 2026 01:51
View on pgsql-hackers archive →
Summary
The thread addresses a critical bug in PostgreSQL's logical replication, specifically with ALTER SUBSCRIPTION ... SERVER or ALTER SUBSCRIPTION ... CONNECTION commands. The proposer identified that these commands fail if the foreign server associated with the original subscription becomes unreachable or its user mapping is dropped, preventing recovery. The root cause was GetSubscription attempting to retrieve connection information from the broken server even when it wasn't strictly necessary for the alteration. Initial patches focused on lazy loading of connection info. A reviewer proposed a refactored approach introducing a conninfo_needed parameter, which was adopted. The discussion evolved to also cover DROP SUBSCRIPTION failures under similar conditions, leading to a multi-patch series that carefully manages connection string construction and cleanup. The latest versions of the patch use subtransactions and refined logic to handle cases where publisher connection is impossible during drop operations gracefully. Reviewers and the proposer are currently discussing the complexity, error messages, and further code organization.
Recent Replies
The latest reply from the proposer addresses concerns about the latest patch (v6-0003), confirming that the fix for an Assert condition is good. The proposer agrees that using a subtransaction for error handling during DROP SUBSCRIPTION isn't over-engineered. However, the proposer suggests improving code organization by extracting duplicated logic for foreign server retrieval and ACL checks into a helper function within construct_subserver_conninfo().
May 18, 2026 05:28
The latest reply from commenter 3 provides an updated v6-0003 patch, addressing an `Assert` condition in previous versions and making the logic for `orig_conninfo_needed` more robust in `ALTER SUBSCRIPTION` statements. The commenter also seeks feedback on whether the use of subtransactions in the v6-0003 patch for `DROP SUBSCRIPTION` cleanup is overly complex or if alternative solutions should be considered.
May 15, 2026 23:18
The latest reply (the proposer) reviews the v5 patch series, specifically focusing on patch 0002. The proposer questions whether an assertion firing in the `ALTER_SUBSCRIPTION_SERVER` and `ALTER_SUBSCRIPTION_CONNECTION` paths is intentional, given that `conninfo_needed` is explicitly set to false in those scenarios.
May 15, 2026 07:18
[PATCH] Fix null pointer dereference in PG19 Discussing 9 msgs Apr 21, 2026 13:40
View on pgsql-hackers archive →
Summary
The thread begins with a proposer reporting a null pointer dereference in PostgreSQL 19 when using VIEWS, FOR PORTION OF, and INSTEAD OF triggers. The initial proposal suggests a parse-time check to forbid these features together. A reviewer immediately criticizes this approach, arguing that checks related to FDWs, volatile functions, and opclasses should occur in later execution phases because relation properties can change. Commenter 1 then takes over, noting the bug was known and suggesting a fix where INSTEAD OF triggers cause `FOR PORTION OF` to skip temporal leftover insertion. Commenter 2 contributes by proposing methods for handling volatile function and FDW checks within the planner/executor, specifically in `ExecInitModifyTable` and `CheckValidResultRel`. The discussion highlights that the original parse-time check proposal is flawed. The thread concludes with Commenter 1 adopting Commenter 2's suggestions and announcing that further development and CommitFest tracking for the refined patches will continue in a new, dedicated thread.
Recent Replies
The latest reply from Commenter 1 expresses gratitude to Commenter 2 for their superior work on moving FDW checks into `CheckValidResultRel`. The commenter plans to integrate this approach with minor test revisions, including for partitioned FDWs. They also announce that the ongoing work for moving functionality checks out of analysis will transition to a new, dedicated thread with its own CommitFest entry.
May 15, 2026 21:21
[PATCH] Prevent repeated deadlock-check signals in standby buffer pin waits Patch Review 5 msgs Apr 19, 2026 05:46
View on pgsql-hackers archive →
Summary
This thread discusses a patch aimed at preventing repeated `RECOVERY_CONFLICT_BUFFERPIN_DEADLOCK` signals during standby buffer pin waits. The proposer observed that when `deadlock_timeout` fires in `ResolveRecoveryConflictWithBufferPin()`, the function repeatedly sends the deadlock-check signal without waiting, similar to a previously fixed issue in the lock-conflict path. The proposed solution involves resetting the `got_standby_deadlock_timeout` flag and calling `ProcWaitForSignal()` after the signal, allowing the startup process to wait for `UnpinBuffer()` instead of looping. Reviewer 1 and reviewer 2 generally approved the patch, classifying it as an improvement rather than a bug fix, suggesting it target the v20 release. Reviewer 1 also suggested a minor initialization for symmetry, which the proposer incorporated into a v2 patch, confirming its performance benefit by reducing signal broadcasts during testing. However, a commenter later questioned the classification as an 'improvement,' citing another report where a similar issue was considered a bug dating back to an earlier PostgreSQL version.
Recent Replies
The latest comment questions the classification of the proposed change as an "improvement" rather than a "bug fix." The commenter references another report that describes a similar issue as a bug existing in older PostgreSQL versions (pg15), suggesting that the current assessment of the patch's urgency or backpatching requirements might need reconsideration.
May 18, 2026 20:32
COPY FROM ON_ERROR SET_NULL bypasses domain NOT NULL with partial column list Committed 5 msgs Apr 16, 2026 17:09
View on pgsql-hackers archive →
Summary
This thread addresses a critical bug in the `COPY FROM ON_ERROR SET_NULL` command. The proposer identified that when a partial column list was used, particularly targeting higher-numbered columns, the system would incorrectly handle `NOT NULL` constraints on domain types. This led to an out-of-bounds read in `copyfromparse.c`, silently inserting `NULL` values into columns that should have enforced a `NOT NULL` constraint. The proposed solution involved correctly allocating the `domain_with_constraint[]` array using `num_phys_attrs` and indexing it with `attnum - 1`, ensuring consistency with other per-column arrays and proper constraint checking. A new test case was also included to cover the specific scenario. The fix was reviewed positively by multiple participants, with one reviewer noting they had independently found the same bug and developed a similar fix. The patch was subsequently committed.
Recent Replies
The committer acknowledged the positive review from a commenter, who had independently discovered the same bug. Following this, the committer confirmed that the patch addressing the incorrect `NOT NULL` bypass during `COPY FROM` operations has been successfully pushed, finalizing the resolution of the bug.
May 19, 2026 01:13
The commenter confirms that they had independently discovered and reported the same bug. They noted that the proposed patch's code changes are identical to their own solution, although the accompanying test case is slightly different but still effective.
May 18, 2026 22:27
The latest reply, from reviewer 2, affirms that the patch addresses the identified bug effectively. The reviewer confirms that the solution is sound and, without further objections, plans to commit the patch to the codebase.
May 18, 2026 13:22
PostgreSQL and OpenSSL 4.0.0 Patch Review 13 msgs Apr 16, 2026 13:32
View on pgsql-hackers archive →
Summary
The proposer initiated a thread announcing OpenSSL 4.0.0 release and the need to adapt PostgreSQL. The initial patch addressed compilation warnings arising from const changes in OpenSSL 4.0.0 APIs, ensuring libpq and sslinfo build without warnings across OpenSSL 1.1.1 to 4.0.0 and LibreSSL. Commenter 1 inquired about back-patching and compatibility with older OpenSSL versions. The proposer confirmed the need for back-patching and discussed the implications for older PostgreSQL branches (v14-master), initially suggesting to limit back-patching on v14 due to its older OpenSSL support. Commenter 2 tested the patch and found an issue with SSL tests failing due to OpenSSL 4.0 changing "ssl alert" to "tls alert" in error messages, which the proposer indicated might have been fixed in a later patchset. A core developer then weighed in, recommending back-patching to all branches, including v14, after the next minor releases, given that v14 still has two scheduled releases, allowing time to address any potential issues. The proposer accepted this plan and committed to preparing rebased patches for all branches.
Recent Replies
The proposer re-posted rebased versions of the patchset, which aim to address OpenSSL 4.0.0 compatibility, specifically for PostgreSQL versions 14 through master. This action aligns with the previously discussed plan to push the fix to all stable branches after the upcoming minor releases, ensuring broad compatibility.
May 19, 2026 21:18
Add psql tab completion support for FOR PORTION OF Committed 4 msgs Apr 15, 2026 03:52
View on pgsql-hackers archive →
Summary
This thread discusses adding tab completion support in psql for the `FOR PORTION OF` clause, which is used in `UPDATE` and `DELETE` statements with temporal tables. The proposer submitted an initial patch including the necessary changes and tests. A reviewer identified an issue where one of the completion rules did not function correctly during testing. Subsequently, the reviewer committed the patch to the codebase, but with the problematic rule removed to ensure the core functionality worked as intended. The proposer acknowledged the commit, expressed gratitude, and indicated plans to further explore and implement additional completion scenarios in the future.
Recent Replies
In the latest reply, the proposer expresses gratitude to the committer for committing the patch and addressing the identified issue. The proposer also states that the feedback received during the process has inspired new scenarios for tab completion, which they intend to investigate and implement in a forthcoming update.
May 15, 2026 05:08
The latest reply from the reviewer confirms the commitment of the patch. The reviewer noted that a specific completion rule that was previously found to be non-functional during testing was removed before the patch was integrated into the codebase, finalizing the feature's implementation.
May 12, 2026 15:30
First draft of PG 19 release notes Discussing 77 msgs Apr 15, 2026 01:18
View on pgsql-hackers archive →
Summary
The thread focuses on the review of the first draft of the PostgreSQL 19 release notes. The proposer shared the initial draft and sought feedback from the community. Discussions covered various aspects, including the precise wording for new features (e.g., clarifying CPU instruction usage), ensuring that all significant changes and new hooks were appropriately listed, and establishing clear criteria for what constitutes a relevant entry in the release notes for a general audience. Several participants offered specific suggestions for additions, removals, or rephrasing, and the proposer was actively incorporating these changes and explaining the rationale behind their decisions. The process aimed at refining the release notes to be comprehensive and accurate.
Recent Replies
The latest message from the proposer confirms the removal of an item from the release notes related to "fake LSN support to hash index AM." This decision was made after a reviewer pointed out that the feature does not offer user-visible benefits and was only preparation for an unreleased feature, aligning with the goal of keeping the release notes focused on user-facing enhancements.
May 15, 2026 17:27
The latest reply from the maintainer clarifies the criteria for inclusion in the release notes. The maintainer explains that the goal is to list items important for the general reading audience, rather than every single change (which is already in the git commit log). They state that if multiple people suggest a change, it is likely the right thing to do, and that miscategorizations happen but are hopefully caught by the review process.
May 12, 2026 20:31
The proposer, in the latest reply, responded to a query about the inclusion criteria for the release notes. The proposer reaffirmed that the primary objective is to highlight items important for the general user, distinct from the comprehensive git commit logs. The proposer invited a more detailed justification if a broader inclusion policy, encompassing all minor changes, is deemed more beneficial.
May 12, 2026 20:27
Support EXCEPT for TABLES IN SCHEMA publications Patch Review 34 msgs Apr 14, 2026 06:30
View on pgsql-hackers archive →
Summary
This thread proposes to extend the `EXCEPT` clause functionality to `TABLES IN SCHEMA` publications, similar to its existing use with `FOR ALL TABLES`. The goal is to provide users with a convenient way to exclude specific tables from schema-level publications without resorting to explicit `FOR TABLE` lists, which require manual updates. The proposer outlined a syntax for `CREATE`, `ALTER ADD`, and `ALTER SET` publication commands. Key rules include schema-qualification for excluded tables and ensuring they belong to the published schema. Early discussions focused on the syntax, particularly regarding 'mixed style' `EXCEPT` clauses (applying to multiple schemas in a single command). The proposer initially allowed this for convenience but later revised the approach to restrict `EXCEPT` to its adjacent schema clause to reduce complexity and confusion. The proposed changes are delivered in a series of three patches addressing different command types and related cleanup. Reviewers have provided detailed feedback on documentation, code logic, error messages, and `pg_dump` integration, to which the proposer has been responsive, providing updated patch versions.
Recent Replies
In the latest reply, the proposer addresses a reviewer's comments on the v5-0001 patch. The proposer clarifies the logic behind freeing `schemaRels` only in the `EXCEPT` case to prevent memory corruption. They also explain the design choice in `gram.y` for handling the `EXCEPT` clause in multi-schema continuation scenarios, emphasizing the intent to collect the `EXCEPT` list and explicitly raise an error if a table publication object contains an `EXCEPT` list, rather than silently ignoring it.
May 19, 2026 11:14
The latest reply from the proposer addresses recent review comments on patch v5-0001. The proposer clarifies why certain assertions did not fail in earlier patches, explaining that the relevant function was not yet being called. The proposer also agrees to incorporate a suggestion to use `GetExcludedPublicationTables` instead of `get_publication_relations` and to update an associated assertion in the first patch. The proposer confirms that all remaining comments will be addressed in the next patch iteration.
May 17, 2026 01:32
The proposer responded to the latest round of review comments for patch v5-0001, agreeing to most of the suggestions. These included updating an assert related to schema publications in `GetExcludedPublicationTables` and making other indicated changes to documentation, naming conventions, and error messages. The proposer also clarified that earlier patches did not call the function in question, which explained why certain tests passed without the assert being modified previously.
May 15, 2026 13:32
[BUG] Take a long time to reach consistent after pg_rewind Patch Review 3 msgs Apr 10, 2026 09:57
View on pgsql-hackers archive →
Summary
The proposer identified a bug in pg_rewind where a rewound standby node can take an unacceptably long time to reach a consistent state if the new primary is idle. This occurs because pg_rewind sets the minRecoveryPoint using pg_current_wal_insert_lsn(), which can point just past a WAL page header when the primary is idle. Consequently, the standby waits indefinitely for a new WAL record to be written by the primary to advance its lastReplayedEndRecPtr past this minRecoveryPoint. The proposer suggested using GetXLogInsertEndRecPtr() instead, or adjusting the minRecoveryPoint if it's just after a WAL page header. A reviewer reproduced the bug and confirmed the diagnosis, agreeing that fixing the producer (pg_rewind) by using GetXLogInsertEndRecPtr() is the cleaner solution to maintain consistency across how minRecoveryPoint is set and compared. The reviewer also suggested additional documentation and auditing for a defense-in-depth approach, and offered to provide a TAP test, emphasizing the liveness bug's importance for back-patching.
Recent Replies
The reviewer confirmed the bug on macOS, reproducing the described hang and LSN trace. The reviewer agreed with the underlying diagnosis that minRecoveryPoint is expected to be an end-LSN of a WAL record, a condition pg_rewind violates by using pg_current_wal_insert_lsn(). The reviewer recommended the original suggestion of using GetXLogInsertEndRecPtr() in pg_rewind as the primary fix and offered to create a TAP test.
May 19, 2026 21:20
Heads Up: cirrus-ci is shutting down June 1st Patch Review 18 msgs Apr 9, 2026 20:55
View on pgsql-hackers archive →
Summary
The proposer announced the imminent shutdown of Cirrus CI on June 1, 2026, which is used by cfbot and individual developers, necessitating an urgent replacement. The proposer outlined seven key considerations for a new CI system, including self-hosting, open-source nature, speed, multi-OS support, personal repository integration, and free access. Commenters largely agreed on the importance of enabling CI on personal repositories and the desirability of self-hosting and open-source solutions. There was also discussion about optimizing CI resource usage, particularly for small or inactive patches, while preserving the value of initial runs. Towards the deadline, one developer provided an initial GitHub Actions YAML file as a temporary solution to ensure CI continuity, acknowledging it's not the long-term goal. Another developer then offered to take over and refine this patch.
Recent Replies
The latest reply is from a reviewer who offered to take over and refine the proposed GitHub Actions patch. The reviewer attached their own work-in-progress version, noting differences in OS support and the use of helper scripts for future portability. The reviewer also reported success in enabling `io_uring` support, which was previously disabled, and plans to merge the two patches and address the absence of pre-built images.
May 18, 2026 22:27
Recognizing the urgent deadline of June 1st, the latest reply presents a functional GitHub Actions YAML file, developed with the help of an AI, which successfully achieves green builds across all systems previously supported by Cirrus CI. The proposer clarifies that this is an immediate, temporary solution, not a definitive long-term platform choice. They also highlight remaining tasks, such as re-enabling io_uring support, integrating pre-built images, and establishing CFBot integration, requesting community assistance to bring this 'patch' to a committable state.
May 18, 2026 21:22
Reduce timing overhead of EXPLAIN ANALYZE using rdtsc? Committed 10 msgs Apr 9, 2026 16:02
View on pgsql-hackers archive →
Summary
This thread discusses the accuracy and reporting of TSC (Timestamp Counter) frequency, particularly in virtualized environments where CPUID 0x15/0x16 might report incorrect frequencies. A fix was committed early in the thread to avoid trusting CPUID 0x15/0x16 under certain hypervisors. The discussion then evolved to enhance `pg_test_timing` to warn users if the calibrated TSC frequency deviates significantly (e.g., >10%) from the frequency in use, advising to switch to `timing_clock_source=system` or report a bug, and to return an error code for CI/buildfarm failures. Reviewers contributed with suggestions for refining the debug information and addressing potential unsafe calls to calibration functions. A Coverity warning for a potential divide-by-zero issue in `output()` was also identified and resolved by adding a check. The proposer provided several patch iterations incorporating these improvements, and a committer eventually pushed the consolidated patch.
Recent Replies
The committer acknowledged the proposer's latest patch, which incorporated earlier proposed changes, including enhanced TSC debug information for `pg_test_timing` and a fix for a Coverity warning. The committer agreed on the value of these additions for debugging and beta period issue investigation, confirming that the changes would not violate feature freeze guidelines, and announced that the patch had been pushed.
May 16, 2026 15:53
Add missing period to DETAIL messages Patch Review 12 msgs Apr 9, 2026 04:27
View on pgsql-hackers archive →
Summary
The thread addresses inconsistencies in PostgreSQL error messages, specifically focusing on DETAIL messages that do not end with a period or have incorrect capitalization, violating the project's error message style guide. The proposer submitted a patch to correct these issues. Several iterations of the patch were made based on feedback from reviewers. Discussions involved whether to add periods to DETAIL messages ending with substituted values (e.g., %s or %d), with the proposer deciding against it to avoid ambiguity. A key point of contention was whether simply adding a period to a non-sentence DETAIL message made it compliant or potentially more confusing. The latest patch version (v5) removed periods from non-sentence messages and those with uncontrolled initial capitalization. The thread has since gone quiet, and the proposer has pinged the list for further guidance to move the patch forward.
Recent Replies
The latest message is a "ping" from the proposer, inquiring why the thread has gone quiet for four weeks. The proposer asks if there's anything further they can do to help the patch, currently in v5, proceed towards being pushed. This indicates a desire to continue the review process and resolve any remaining issues.
May 18, 2026 05:52
bump minimum supported version of psql and pg_{dump,dumpall,upgrade} to v10 Committed 12 msgs Apr 8, 2026 15:47
View on pgsql-hackers archive →
Summary
The thread discusses a proposal to increase the minimum supported version for `psql`, `pg_dump`, `pg_dumpall`, and `pg_upgrade` to PostgreSQL v10 for the upcoming v20 release. The proposer highlighted the burden of supporting older versions (currently v9.2) and provided a patch. Reviewers generally agreed with the proposal, citing benefits like shorter buildfarm runs. Feedback included requests to separate the patch into logical changes and formatting updates, and discussions arose about `pg_restore`'s ability to read older archive formats and the need for documentation on multi-hop upgrades. The proposer provided updated patches addressing some of the feedback. There was a consensus that this change should occur approximately every five years. The buildfarm maintainer confirmed that buildfarm changes were being pushed in anticipation of this update, indicating a decision has been made to proceed.
Recent Replies
The latest reply from the buildfarm maintainer confirms that the necessary changes for the buildfarm, anticipating the bump in minimum supported versions, have been pushed. This action prevents breakage when the main patch is eventually applied and demonstrates the decision to proceed with the proposed version bump.
May 16, 2026 17:51
The latest message reinforces the community's general agreement to proceed with bumping the minimum supported version for v20. It confirms that the buildfarm changes can be prepared in anticipation of the patch being committed, signaling a clear path forward for the proposal.
May 16, 2026 13:44
Commenter 1 inquires whether a definitive decision has been reached regarding the proposal to bump the minimum supported version. This query is driven by Commenter 1's preparation of corresponding buildfarm changes, which are ready to be pushed to prevent any breakage once the proposed changes are committed.
May 16, 2026 12:00
DOCS: Describe some missing parameters on CREATE/ALTER PUBLICATION pages Patch Review 2 msgs Apr 8, 2026 05:10
View on pgsql-hackers archive →
Summary
The thread highlights an issue in the PostgreSQL documentation for CREATE PUBLICATION and ALTER PUBLICATION, where some parameters listed in the command synopses (e.g., column_name, table_name, schema_name) are not adequately defined or even mentioned elsewhere in the respective documentation pages. The proposer argues that this inconsistency makes the documentation ad-hoc and potentially confusing for users. A small patch was submitted to address these omissions by adding comprehensive descriptions for the missing parameters and ensuring consistency across both command pages. Additionally, the patch includes a fix for missing <varlistentry> "id" attributes on the ALTER PUBLICATION page. The patch has been awaiting review feedback for several weeks.
Recent Replies
The latest message is a "ping" from the proposer, noting that the patch, submitted five weeks prior, has received no feedback. The proposer is gently prompting the community for a review to move the documentation improvements forward.
May 18, 2026 05:42
Logical Replication - revisit `is_table_publication` function implementation Patch Review 8 msgs Apr 7, 2026 07:02
View on pgsql-hackers archive →
Summary
This thread discusses an optimization for the `is_table_publication` and `is_schema_publication` functions in logical replication. The proposer identified that publications using 'FOR TABLE', 'FOR TABLES IN SCHEMA', and 'FOR ALL TABLES' clauses are mutually exclusive. The initial patch (v1) aimed to simplify and improve efficiency by adding a quick `return false` if `puballtables` is true, thereby avoiding unnecessary catalog scans. Reviewer 1 questioned the completeness of these checks, particularly for `is_schema_publication` and `puballsequences`. Reviewer 2 then pointed out that 'FOR ALL SEQUENCES' and 'FOR TABLES IN SCHEMA' are also mutually exclusive. The proposer acknowledged this and submitted patch v2, which incorporated checks for `puballsequences` into the early exit logic for both functions. Reviewer 2 later provided a detailed analysis, confirming that the optimization, while primarily benefiting non-erroneous scenarios, is a valuable addition. The proposer is now requesting guidance on moving the patch forward.
Recent Replies
The latest message from the proposer highlights that the patch has received positive feedback in prior communications. The proposer notes that the thread has been inactive for about five weeks. The proposer is now asking for assistance in understanding the necessary steps to help progress the patch toward being committed.
May 18, 2026 04:49
Redundant/mis-use of _(x) gettext macro? Patch Review 11 msgs Apr 1, 2026 03:48
View on pgsql-hackers archive →
Summary
The thread initially explored a perceived misuse of the `_()` gettext macro. The proposer questioned its application with only a quoted format string. A reviewer clarified that this usage is intentional and necessary to allow translators control over quoting styles and other punctuation within localized messages. This clarification prompted the proposer to investigate the `GetPublicationsStr` function, which builds comma-separated lists, and found it lacked proper translation support for error messages. The proposer then submitted a patch to address this. After an initial iteration, a v2 patch was proposed. Reviewer 1 suggested a revised approach to include commas directly within the translated string to better accommodate linguistic variations. The proposer agreed with this, also proposing further code simplification regarding list iteration. The subsequent discussion briefly considered the stylistic choice of leading vs. trailing commas in translated elements, with both parties acknowledging it as minor. The proposer is now seeking to advance the patch.
Recent Replies
In the latest reply, the proposer notes that the thread has been inactive for approximately five weeks. The proposer indicates that general agreement was reached on the patch, with only minor stylistic preferences remaining regarding the placement of commas within translated format strings. The proposer reiterates the importance of translator-friendly solutions and requests guidance on the next steps to facilitate the patch's commitment.
May 18, 2026 05:26
Row pattern recognition Patch Review 41 msgs Mar 29, 2026 14:06
View on pgsql-hackers archive →
Summary
This thread centers on the development and review of Row Pattern Recognition (RPR) functionality, primarily focused on a substantial v47 patch set and subsequent incremental updates. The initial message from the proposer outlined design considerations for FIRST/LAST navigation within RPR, emphasizing its interaction with the NFA engine and dependencies on `match_start`. The discussion quickly evolved into an active patch review cycle. The proposer submitted multiple sets of patches, addressing items such as unifying DEFINE walkers, rejecting volatile callees, improving regression tests for empty-match paths, refining DEFINE qualifier checks, and adhering to specific coding style guidelines (e.g., trailing commas, `ereport()` parentheses). Reviewer 1 provided critical feedback, including a detailed analysis of the SQL standard to prohibit RPR in recursive CTEs and offered enhancements for the `README.rpr` documentation. The proposer diligently incorporated this feedback, updating patches to enforce the recursive query prohibition and refine documentation. Reviewer 1 also provided context on the extensive scope of the RPR feature and its future development trajectory, including planned features like MEASURES.
Recent Replies
In the latest reply, reviewer 1 responds to reviewer 2's concerns about the large size of the RPR patch set. Reviewer 1 explains that the complexity of the RPR feature necessitates a substantial patch, recommending the `README.rpr` and SQL standards as essential reading. Reviewer 1 also outlines future RPR developments, such as implementing MEASURES, and confirms that reviewer 2's coding style suggestions had already been incorporated into earlier patches.
May 17, 2026 10:00
The latest message from the proposer addresses two points raised in a reviewer's previous feedback regarding patch 0013. The proposer restored an existing comment that explains subsequent process not affected by the patch and moved a new ISO citation comment. Additionally, the proposer changed the error code from ERRCODE_FEATURE_NOT_SUPPORTED to ERRCODE_SYNTAX_ERROR for the case of RPR in recursive CTEs, aligning with the standard's explicit prohibition rather than an unimplemented feature.
May 13, 2026 04:15
The latest reply, from a reviewer, acknowledges the proposer's patches and confirms that patch 0013, which addresses the rejection of row pattern recognition in recursive queries, has been reviewed. The message indicates continued engagement with the patch set, implying that the review process is active and detailed feedback is being provided.
May 13, 2026 03:11
Track skipped tables during autovacuum and autoanalyze Patch Review 28 msgs Mar 24, 2026 06:11
View on pgsql-hackers archive →
Summary
The proposer introduced a patch to enhance pg_stat_all_tables by adding new fields to track tables skipped during autovacuum and autoanalyze due to lock acquisition failures. This aims to provide users with more direct insight into these events, which are currently only visible in server logs. The discussion involved several rounds of review and refinement. Key points addressed include improving the expand_vacuum_rel() logic, updating isolation tests, clarifying naming conventions, and, critically, resolving a race condition where concurrently dropped tables could lead to orphaned entries in the statistics. A solution mirroring pgstat_init_function_usage() for handling such entries has been implemented and refined across multiple patch versions.
Recent Replies
In the latest message, Reviewer 1 provides an updated patch (v9) in response to minor review comments. This version incorporates a renamed injection point for better clarity and removes a comment that inaccurately described the mirroring of another function's approach, indicating continued refinement of the proposed solution.
May 16, 2026 14:29
The reviewer provided minor feedback on the latest patch, suggesting a more descriptive name for an injection point and clarifying the comparison of the new orphaned statistics entry handling with `pgstat_init_function_usage()`. The reviewer notes that while the new approach is effective, its implementation details differ slightly from the existing function's conditional rechecking.
May 15, 2026 20:21
The latest message from a reviewer addresses a subtle race condition where concurrent table drops could lead to permanently leaked statistics entries. The reviewer proposes a fix (v8-0001) that involves performing a second syscache lookup after creating a statistics entry, ensuring it's dropped if the relation no longer exists. Additionally, new isolation tests (v8-0002) are provided to verify this fix in scenarios involving table drops with both rollbacks and commits, using internal functions to confirm no orphaned entries are left behind.
May 15, 2026 16:12
log_checkpoints: count WAL segment creations from all processes Discussing 8 msgs Mar 23, 2026 07:39
View on pgsql-hackers archive →
Summary
This thread discusses a patch aimed at improving the accuracy of WAL segment creation counts reported in `log_checkpoints` output. The proposer identified that the existing count is incomplete, only reflecting segments preallocated, and not those created by other processes. The proposed solution involves a new shared-memory atomic counter (`walSegmentsCreated`) that is incremented whenever a WAL segment is created, regardless of the source. The `ckpt_segs_added` metric would then accurately reflect all newly created segments since the last checkpoint. Initial feedback requested the addition of tests, which the proposer provided. Subsequent comments focused on minor textual and indentation fixes, and a question regarding potential integer overflow for the `ckpt_segs_added` field. Later, reviewer 1 suggested extending the functionality by exposing this counter in `pg_stat_checkpointer` for monitoring, raised questions about making `walSegsCreatedLastCheckpoint` atomic, clarified the integer type's overflow threshold, and proposed additional testing with `wal_level=minimal`.
Recent Replies
The latest reply, a reiteration of earlier comments by reviewer 1, suggests adding the `wal_segments_created` counter to the `pg_stat_checkpointer` view. It also asks if `walSegsCreatedLastCheckpoint` should be atomic, points out a potential discrepancy in the `ckpt_segs_added` integer overflow comment (2^32 vs 2^31 for signed int), and suggests testing with `wal_level` set to minimal. An auxiliary patch for the view change was also provided.
May 17, 2026 09:10
The latest reply from commenter 3 proposes extending the patch to expose the new `wal_segments_created` counter in the `pg_stat_checkpointer` view to aid capacity planning. Commenter 3 also inquired whether `walSegsCreatedLastCheckpoint` should be atomic, clarified integer overflow thresholds for `int` type, and suggested extending tests to include `wal_level` set to minimal, providing a helper patch for review.
May 16, 2026 17:22
Function scan FDW pushdown Patch Review 14 msgs Mar 18, 2026 12:08
View on pgsql-hackers archive →
Summary
The thread discusses a patch to enable function scan pushdown for Foreign Data Wrappers (FDW), specifically for PostgreSQL FDW. The initial patch was returned with feedback due to unresolved issues with `rte->functions` and an unfinished design. The proposer submitted an updated patch (v3), disallowing pushdown for functions returning complex types or with parameters. A reviewer tested v3 and v4, noting that pushdown was not observed in their tests due to planner cost estimation favoring local joins. The proposer explained the cost model, emphasizing that remote joins must be cheaper. Subsequent patch versions (v5, v6) addressed issues with deparsing whole-row variables for function RTEs and handling `postgresBeginForeignScan` for function RTEs. The discussion also involved restoring per-function metadata. The latest discussions focus on refining whole-row variable deparsing for nullable outer sides and correctly handling `fdw_private` data for base restrict infos, suggesting further complexity in the patch.
Recent Replies
The proposer identifies two new issues in the latest patch. First, it seems that `RTE RelOptInfo` is missing `fdw_private`, which impacts the classification of `baserestrictinfo` and might require passing `fpinfo` down to `foreign_expr_walker`. Second, the proposer highlights a suspicious plan where a function uses a parameter in its argument, which was previously forbidden. The proposer also points out a potentially redundant `rtekind` check.
May 20, 2026 10:17
The latest reply from commenter 2 addresses feedback on the revised patch. The commenter acknowledges and accepts a proposed fix for an issue in whole-row variable deparsing when dealing with nullable outer sides, which ensures correct handling of null values. Additionally, the commenter responds to a query about the possibility of `rtfuncdata` being NULL in `get_tupdesc_for_join_scan_tuples()`, indicating they believe it's not possible and suggesting an assertion for robustness, with an updated patch attached.
May 19, 2026 18:21
The proposer identifies two further issues in the latest patch. First, deparseColumnRef produces records from nulls instead of actual nulls when handling nullable outer sides for whole-row variables. Second, the proposer questions if get_tupdesc_for_join_scan_tuples() could receive NULL rtfuncdata when processing RTE_FUNCTION RTEs, indicating a potential gap in metadata handling for foreign function scan tuples.
May 19, 2026 15:25
Bug? pg_rewind produces unusable but starting database with standby recovery Patch Review 2 msgs Mar 18, 2026 11:59
View on pgsql-hackers archive →
Summary
The proposer identified a bug in `pg_rewind` where a target database could appear to start normally after a rewind operation but would actually be in an incomplete recovery state, leading to errors only upon user queries. This occurs when WAL segments are missing on the standby, preventing `minRecoveryPoint` from being reached. The initial patch aimed to relax recovery conditions to catch this earlier. A second, independent bug was later reported where `pg_rewind` could incorrectly set `minRecoveryPoint` beyond the available WAL, potentially due to the order of retrieving file lists and querying LSNs, which could add new segment files in between. This second issue, exposed by the first patch, is addressed by a separate patch (`0002`) that captures the expected `minRecoveryPoint` earlier to ensure consistency.
Recent Replies
The proposer submitted a second, independent patch (`0002`) to address a previously hidden bug where `pg_rewind` could output an inconsistent state with `minRecoveryPoint` set beyond available WAL. This patch aims to fix the issue by capturing the expected `minRecoveryPoint` earlier in the process, preventing discrepancies caused by new segment files appearing between list retrieval and LSN querying.
May 15, 2026 09:50
Dump statistic issue with index on expressions Discussing 3 msgs Feb 25, 2026 16:37
View on pgsql-hackers archive →
Summary
A bug was reported where `pg_dump --statistics-only` fails with an "could not find index attname" error when a table has multiple indexes, including an index on an expression. The proposer provided a simple patch, explaining that `pg_dump` can incorrectly use attribute names from a previously processed index on an expression for a subsequent regular index. A reviewer confirmed the underlying bug (incorrect inheritance of `indAttNames`), but couldn't reproduce the user-facing error on a vanilla PostgreSQL system. The proposer's latest reply clarified that the issue arises in their specific fork because it generates `pg_statistics` entries for all indexes, unlike vanilla PostgreSQL which only does so for expression indexes. This explains why the bug is not easily reproducible on vanilla, but the underlying issue of `pg_dump` misusing `indAttNames` after processing an expression index remains pertinent to the patch.
Recent Replies
The proposer clarifies that the reported bug is not reproducible on a vanilla PostgreSQL installation. The issue stems from a fork-specific behavior where `pg_statistics` records are generated for all indexes, not just those with expressions, leading to the `pg_dump` error described. This explains why the reviewer couldn't reproduce it and suggests the patch addresses a problem that is more visible in environments with extended `pg_statistics` data generation.
May 20, 2026 09:51
SQL Property Graph Queries (SQL/PGQ) Committed 80 msgs Feb 25, 2026 06:40
View on pgsql-hackers archive →
Summary
This thread discusses several patches for SQL Property Graph Queries (SQL/PGQ), primarily focusing on the correct handling of element variable references within `GRAPH_TABLE` clauses. The proposer submitted patches (0001 and 0002) to ensure that non-local cross-references between element variables in graph patterns are properly rejected, and to correctly resolve property references by prioritizing them over lateral table references when names conflict. A reviewer provided extensive testing, confirming that the patches functioned as expected across various complex scenarios. Discussions also clarified `GRAPH_TABLE`'s implicit `LATERAL` semantics as per the SQL standard. Both patches were ultimately committed. Later in the thread, a new commenter reported an internal error related to `GRAPH_TABLE` referencing outer tables, which was subsequently identified as being resolvable by a patch from a related, ongoing discussion.
Recent Replies
The latest reply from a commenter confirms that an internal error reported earlier, concerning `GRAPH_TABLE` referencing an outer table and leading to a plan error, is resolved by applying a specific patch from a linked, separate thread. This indicates that while the primary issues of this thread are committed, related bugs in the SQL/PGQ implementation are still being identified and addressed.
May 16, 2026 13:00
The proposer acknowledges Commenter 3's report of an internal error encountered with a `GRAPH_TABLE` query. The proposer suggests that a new thread should be initiated to track this specific SQL/PGQ issue, and wonders if it might be linked to a previously reported problem.
May 16, 2026 12:12
synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication Patch Review 77 msgs Feb 24, 2026 22:08
View on pgsql-hackers archive →
Summary
The thread discusses an inconsistency in PostgreSQL's `synchronized_standby_slots` where it requires all listed slots to catch up, even when `synchronous_standby_names` is configured for quorum (ANY M of N) replication. This leads to logical decoding blocking if a non-essential standby goes down. The proposer introduced a patch to extend `synchronized_standby_slots` with quorum-aware syntax (ANY M of N) and later proposed adding priority-based syntax (FIRST N). The discussion evolved to splitting the work into three patches: first, refactoring the synchronous replication parser to better distinguish syntax forms; second, implementing `ANY N` semantics; and third, implementing `FIRST N` semantics. Reviewers provided feedback, including identifying a bug where duplicate entries in priority configuration are not filtered, which the proposer has committed to addressing.
Recent Replies
The proposer acknowledges a bug reported by a reviewer regarding duplicate entries not being filtered in priority configurations for `synchronized_standby_slots`. The proposer confirms this is a valid issue and commits to addressing it in the next version of the patch.
May 21, 2026 09:12
The reviewer continues to examine the reordered patch set, specifically patch 001, which refactors the synchronous replication parser. The reviewer provides minor feedback on documentation formatting, suggesting the use of asterisks for bullet points. Additionally, the reviewer suggests a variable name change from `num_sync_standbys` to `num_sync_slots` for improved clarity within the context of the code.
May 15, 2026 03:58
The latest reply from reviewer 2 acknowledges the proposer's reordered patch set, which now begins with a parser refactoring. This restructuring addresses prior concerns about independent patch functionality. The reviewer also provided minor comments for the first patch, suggesting improvements to documentation clarity, specifically recommending the use of 'ANY N' instead of 'ANY 1' for better explanation and other minor code review points.
May 14, 2026 11:06
call for applications: hacker mentoring 2026 Committed 2 msgs Feb 20, 2026 00:16
View on pgsql-hackers archive →
Summary
This thread announces and provides an update on the 2026 PostgreSQL hacker mentoring program. The proposer, who runs the program, initiated a call for applications for potential mentees, detailing the program's success and target audience (active mailing list developers interested in committing significant time to hacking). The initial message included a signup form and a deadline for applications. A follow-up message reported that 23 applications were received, and 7 individuals were successfully matched with committers as mentors. The proposer expressed gratitude to the volunteering committers.
Recent Replies
The proposer provided an update on the 2026 hacker mentoring program. Out of 23 applications received, 7 individuals were successfully matched with committers for mentorship. The proposer thanked the mentors for their participation and expressed satisfaction with the outcome, despite not being able to match everyone.
May 14, 2026 19:51
BUG: Cascading standby fails to reconnect after falling back to archive recovery Patch Review 33 msgs Jan 28, 2026 17:03
View on pgsql-hackers archive →
Summary
This thread addresses a bug in PostgreSQL's streaming replication where cascading standbys fail to reconnect after falling back to archive recovery if their upstream is an archive-only standby. The core issue is that the cascading standby requests a WAL streaming position (start of the next segment) that is ahead of the upstream's reported WAL flush position (inside the current segment), leading to connection failures. Initially, the proposer attributed this to `RequestXLogStreaming` truncating the `recptr` upwards. However, a reviewer clarified that the actual cause is archive recovery's segment granularity: after both nodes replay a segment, the cascade's next read position advances to the start of the next segment, while the upstream's reported position remains within the previously replayed segment. The proposed fix involves the `walreceiver` polling and waiting for the upstream to catch up within a one-segment boundary, incorporating a `wal_receiver_timeout` check and resetting the catchup state. While polling is acknowledged as not ideal, it is considered a reasonable and backpatchable solution for the bug.
Recent Replies
The latest reply from a reviewer, while acknowledging that the proposed polling mechanism is not ideal, affirms that it is a worthwhile improvement over leaving the bug unfixed. The reviewer states an intention to further examine the solution, suggesting that the patch is in the final stages of review.
May 16, 2026 07:13
Fix the race condition for updating slot minimum LSN Patch Review 3 msgs Jan 27, 2026 06:32
View on pgsql-hackers archive →
Summary
This thread addresses a race condition in PostgreSQL's logical replication, specifically concerning the update of a replication slot's minimum LSN (Log Sequence Number). The race condition could lead to premature WAL segment removal and subsequent invalidation of newly created replication slots. The scenario arises when a new slot's `restart_lsn` is being initialized concurrently with other backends computing the global minimum LSN, potentially causing an older LSN to be recorded globally before the new slot's LSN is fully established. The proposer identified this issue and provided a patch that introduces an exclusive `ReplicationSlotControlLock` to protect updates to `slot.restart_lsn` during WAL reservation and also to `XLogSetReplicationSlotMinimumLSN()`. This synchronization mechanism ensures that updates and computations of the minimum LSN are serialized, thereby preventing the race. A reviewer confirmed the fix's correctness and clarified the safety of a similar code path in `copy_replication_slot()`. The patch has undergone successful testing.
Recent Replies
The latest reply from a reviewer confirms that the patch successfully applies, builds, and operates as expected during local debug testing, without any reported crashes or assertion failures. The reviewer also validated the proposed locking mechanism for `restart_lsn` updates and minimum LSN computation, finding it reasonable and consistent with existing synchronization logic, and concurred with a previous explanation regarding the `copy_replication_slot()` function's safety.
May 15, 2026 04:43
Implement waiting for wal lsn replay: reloaded Committed 41 msgs Jan 27, 2026 01:14
View on pgsql-hackers archive →
Summary
This thread discusses improvements and bug fixes related to the `WAIT FOR LSN` functionality, particularly concerning how replay waiters are woken up and memory barrier semantics. Initial patches addressed a misplaced wake-up call and memory barriers in `GetWalRcvWriteRecPtr()`. The discussion involved ensuring proper handling of `writtenUpto` with atomic operations and robust testing for various scenarios, including off-by-one errors and timeline boundaries. The proposer assembled a patchset, which underwent several revisions to incorporate feedback, improve test coverage, and address a newly discovered test failure in `wait_for_catchup()`. The thread concludes with the proposer reviewing a fix for this test failure and the initial patchset being committed.
Recent Replies
The reviewer confirms that they have added comments for new functions in patch 0006 and proposes to push the patchset, acknowledging that while some aspects might still be missing, the current version significantly improves many areas. The proposer then reviewed the patchset and identified a potential issue in a test for patch 5, which was subsequently fixed, with other parts of the patchset deemed acceptable.
May 20, 2026 12:16
The latest reply is an empty message from the proposer, implicitly acknowledging the newly reported test failure regarding a regression in the `wait_for_catchup()` implementation. This failure was identified by commenter 1 after the patchset had been committed, indicating a need for further investigation and resolution of the introduced bug.
May 20, 2026 05:18
The proposer acknowledged a new test failure reported by a commenter, which appears to be a regression caused by the recently committed `wait_for_catchup()` implementation. The failure occurs in `t/019_replslot_limit.pl`, specifically with checks for replication slot states, indicating that the states are not transitioning as expected.
May 20, 2026 03:30
meson: Make test output much more useful on failure (both in CI and locally) Patch Review 22 msgs Jan 26, 2026 10:13
View on pgsql-hackers archive →
Summary
The proposer initiated a thread to address the difficulty in debugging test failures due to unhelpful output from Meson, both in CI and locally. They submitted patches to improve test output by including relevant snippets from `regression.diffs` and clearer error messages. The initial patches were committed. However, reviewer 1 immediately raised concerns that the new diff output often exceeded terminal width, becoming garbled and obscuring important test summaries. They suggested limiting the output further or making it conditional. The committer then proposed an adjustment to make the diff output dependent on an environment variable, adding this to the CI configuration. Commenter 2 identified another problem: the new log processing removed crucial timing information for failed tests. The proposer has since submitted a new patch aiming to resolve the issues raised by reviewer 1, acknowledging that the timing information issue is a separate concern related to the use of `command_ok`.
Recent Replies
The latest reply from the proposer addresses commenter 2's observation regarding the loss of test timing information. The proposer clarifies that this issue is unrelated to the `pg_regress` changes but stems from a separate change involving `command_ok` in TAP tests. They are currently exploring ways to improve this, potentially by introducing an optional argument to `command_ok` that allows disabling output truncation in contexts where the output is expected to be concise.
May 18, 2026 15:26
The latest reply from the proposer addresses the suggestion of using an environment variable to control the diff output, explaining that this approach has limitations when `pg_regress` is called from TAP tests. Instead, the proposer provides a new patch intended to resolve the various problems encountered with the previously committed changes to test output.
May 17, 2026 20:15
pg_stat_io_histogram Patch Review 32 msgs Jan 26, 2026 09:40
View on pgsql-hackers archive →
Summary
This thread proposes a new feature, `pg_stat_io_histogram`, to track and display I/O latency profiles, aiming to help users identify I/O outliers quickly. The initial patch focused on avoiding overhead with fast bucket calculation. Much of the subsequent discussion revolved around optimizing memory usage, particularly in each backend and in shared memory, as early versions significantly increased `pgStatLocal` and `PendingIOStats` sizes. Reviewers raised concerns about wasting memory for unused statistics. The proposer developed several patch versions (v7, v9a, v9b, v10) exploring different memory optimization strategies, including dynamically allocating memory and using indirect offsets to reduce the footprint. Performance testing indicated negligible CPU impact. The debate also included histogram range and bucket width. The latest patch, v10, aims to address memory concerns using indirect offsets and dynamic shared memory allocation on startup, making the shared memory footprint acceptable.
Recent Replies
The proposer announces the submission of v10, which implements a reduced shared memory footprint using indirect offsets. This version incorporates the idea of sizing and allocating shared memory dynamically on startup. This iteration is a continuation of previous attempts (v9b) to optimize memory usage.
May 20, 2026 08:37
Deadlock detector fails to activate on a hot standby replica Patch Review 3 msgs Jan 19, 2026 12:43
View on pgsql-hackers archive →
Summary
This thread discusses a bug where the deadlock detection mechanism fails to activate on a hot standby replica, specifically when a deadlock occurs between startup and backend processes during XLOG_HEAP2_PRUNE_* message processing. This can lead to significant recovery delays, especially if `max_standby_streaming_delay` is disabled. The proposer identified that the root cause lies in `timeout.c` and `ResolveRecoveryConflictWithBufferPin`, where the `SIGALRM` handler can be triggered "spontaneously" due to an optimization in `setitimer` calls, prematurely waking up the process before an actual timeout. If `deadlock_timeout` is larger than `log_startup_progress_interval`, the deadlock detector may never trigger. The proposer submitted a patch aimed at ignoring these spontaneous `SIGALRM` signals. A reviewer then provided detailed feedback on the patch, suggesting improvements to include ordering, clarifying comments regarding `ProcWaitForSignal` wake-ups, explicitly checking the waiter state, and simplifying the control flow within the waiting loop.
Recent Replies
The latest reply from a reviewer provides constructive feedback on the proposed patch. The reviewer suggests reordering includes, rephrasing a comment about `ProcWaitForSignal` wake-ups for accuracy, recommending a more explicit check for the waiter status using `BM_PIN_COUNT_WAITER` and `wait_backend_pgprocno`, and proposing a simplified control flow for the main waiting loop to improve readability.
May 20, 2026 16:26
Add pg_get_publication_ddl function Patch Review 9 msgs Jan 11, 2026 11:20
View on pgsql-hackers archive →
Summary
This thread proposes and reviews a new function, `pg_get_publication_ddl`, designed to generate the DDL for PostgreSQL publication objects. The proposer initially submitted a patch (v1) and sought feedback, particularly on the implications of viewing publication details without explicit 'view' privileges and how to handle default values. Reviewers provided extensive feedback on v1, pointing out numerous typos, potential information leaks due to missing `ONLY` clauses, incorrect schema prefix handling, and suggesting various code and documentation improvements. The proposer then submitted v2, incorporating a new structure, adding `pretty` and `owner` options, improving string management, using cache instead of shared locks, addressing grammar, and enhancing test coverage, including support for the `EXCEPT` clause. Reviewers are now actively providing detailed feedback on the v2 patch, focusing on documentation clarity, parameter naming, and minor code style adjustments to further refine the proposal.
Recent Replies
The latest reply from reviewer 1 clarifies a previous comment regarding 'pretty' output containing '+' characters. The reviewer explains that these characters are artifacts added by `psql` to indicate line continuations and are not an issue with the patch's output, thus withdrawing that specific criticism of the v2 patch.
May 20, 2026 22:27
A reviewer is providing detailed feedback on the v2 patch, focusing on documentation and code style. They suggest renaming the first parameter in the function signature, making the documentation more concise by removing unnecessary details about clause reordering, and alphabetizing entries in a table. In the code, they suggest simplifying a tricky format string for "ALL SEQUENCES" and improving the placement of a comment.
May 20, 2026 10:00
The proposer submitted v2 of the patch, incorporating extensive changes. These include adopting a new structured approach, adding pretty printing and owner options with `ALTER OWNER` statements, refining string manipulation, switching to cache for object access, correcting grammar, expanding test cases for corner situations, and adding support for the `EXCEPT` clause.
May 17, 2026 21:27
[Patch] Add WHERE clause support to REFRESH MATERIALIZED VIEW Patch Review 10 msgs Dec 8, 2025 20:58
View on pgsql-hackers archive →
Summary
This thread discusses a patch to add `WHERE` clause support to `REFRESH MATERIALIZED VIEW`, enabling partial refreshes to improve performance by targeting only changed data. The proposer initially implemented a 'Prune + Upsert' strategy for non-concurrent refreshes. An early commenter highlighted a real-world need for this feature. Reviewers identified a bug in unique index handling and raised concerns about consistency gaps in the non-concurrent mode. The proposer considered using transaction-level advisory locks to address concurrency but abandoned it due to scalability issues. The revised approach for non-concurrent refreshes now uses `SELECT ... FOR UPDATE` followed by a single CTE for upsert/delete. Discussion also touched upon whether the `CONCURRENTLY` keyword's semantics might become inverted with a `WHERE` clause, and the need for clear documentation on concurrency guarantees for this feature.
Recent Replies
The latest commenter, a reviewer, provided feedback on the updated patch, questioning the safety of the `FOR UPDATE + single-CTE` approach for overlapping refreshes due to potential deadlocks. They also reiterated concerns about the potentially unintuitive behavior of the `CONCURRENTLY` keyword when combined with a `WHERE` clause. The reviewer emphasized the value of the feature for high-churn scenarios and requested clearer documentation of the concurrency guarantees.
May 21, 2026 05:17
Is there value in having optimizer stats for joins/foreignkeys? Patch Review 26 msgs Dec 1, 2025 20:10
View on pgsql-hackers archive →
Summary
The thread explores the implementation of optimizer statistics for joins and foreign keys, aiming to improve cardinality estimates. The initial discussion introduced the concept of collecting statistics for referenced rows and attributes in joined tables. A proposer presented a proof-of-concept and later, a more refined v1 patch, incorporating an index-based join sampling algorithm, a new catalog design to support N-way joins, and a full `CREATE STATISTICS` syntax. Benchmarking results using the Join Order Benchmark (JOB) indicated performance improvements with the new statistics. Subsequent patch versions (v2-v7) primarily focused on addressing continuous integration (CI) failures, minor error handling, and rebase issues. The proposer continues to seek feedback on the overall design and feasibility of the approach, rather than minor code polish.
Recent Replies
The latest message from the proposer delivers v7 of the patch, primarily aimed at fixing unstable tests in the continuous integration system. This update reflects ongoing work to stabilize the proposed join statistics feature. The proposer reiterated the desire for feedback on the overall design and approach, indicating that the patch is still in a developmental stage focused on core functionality rather than final polish.
May 15, 2026 15:30
The latest reply presents v6 of the patch, which aims to fix CI failures encountered on NetBSD/Windows platforms. This update modifies an ALTER TYPE invalidation test from a `text->varchar(100)` conversion to an `integer->numeric` conversion. This change is intended to avoid issues stemming from encoding-dependent width estimates, ensuring broader compatibility and stability for the proposed join statistics feature.
May 15, 2026 05:08
The latest reply from the proposer provides v5 of the patch, which includes a rebase and minor fixes addressing issues raised by a reviewer. These fixes include improved error detection for `ALTER COLUMN`, an error guard for whole-row variables, and rewording "equijoin" to "equality join" in an error message. The proposer reiterates the request for feedback on the fundamental design aspects: the catalog structure, the index-based sampling implementation, and the planner integration, signaling that the patch is still in a design review phase.
May 14, 2026 23:13
Fix typo 586/686 in atomics/arch-x86.h Committed 21 msgs Nov 28, 2025 08:44
View on pgsql-hackers archive →
Summary
This thread originated from the proposer identifying a typo in `src/include/port/atomics/arch-x86.h` (`__i568__`, `__i668__` instead of `__i586__`, `__i686__`). Initial discussions questioned whether to fix the typo or remove the code entirely, given its long-standing presence without issues. Investigation revealed inconsistent compiler behavior for 32-bit builds across different Linux distributions regarding these macros. Ultimately, the consensus shifted away from fixing the typo to removing the problematic 32-bit specific code altogether, as performance work for 32-bit builds was deemed a low priority. The committer agreed to apply the removal patch, with a separate fix for 64-bit MSVC detection to be addressed later.
Recent Replies
The latest message from the committer confirms that the patch has been committed. This signifies the successful resolution of the issue by removing the identified 32-bit specific code, concluding the discussion.
May 18, 2026 16:17
[PATCH] Expose checkpoint timestamp and duration in pg_stat_checkpointer Patch Review 8 msgs Nov 24, 2025 10:07
View on pgsql-hackers archive →
Summary
This thread discusses a proposed patch to expose the last checkpoint's duration and timestamp in pg_stat_checkpointer. The proposer believes this addition will significantly aid external monitoring tools in detecting sudden performance anomalies, such as unusually long or frequent checkpoints, which are hard to infer from existing cumulative statistics. Commenter 1 initially expressed skepticism about the utility of single-value gauges but provided detailed feedback, including a suggestion to split the patch and a request for concrete examples of how monitoring charts would improve. The proposer has since updated the patch, provided test observations, and offered detailed explanations on how the new metrics would enable clearer detection of checkpoint issues. Commenter 2 suggested looking at pgbadger for monitoring examples. The proposer is keen to rebase and continue development based on further feedback.
Recent Replies
The proposer is reviving the patch after a period of inactivity. They briefly restate the motivation for exposing the last checkpoint duration and timestamp: to provide direct signals of recent checkpoint behavior that are currently difficult to infer from cumulative statistics, especially when multiple checkpoints occur between monitoring intervals. The proposer offers to rebase the patch and incorporate any new feedback.
May 15, 2026 06:27
Optimize LISTEN/NOTIFY Committed 27 msgs Nov 13, 2025 06:36
View on pgsql-hackers archive →
Summary
This extensive thread focuses on optimizing `LISTEN/NOTIFY` functionality. The proposer introduced a new design for tracking `LISTEN` state using hash tables at three levels: per-transaction pending changes, per-backend committed state cache, and cluster-wide shared state. This aimed to reduce shared dshash operations by performing more work locally and deduplicating actions. Significant discussion revolved around the terminology and the handling of 'laggard' backends not interested in specific notifications, to avoid a 'thundering herd' problem. A reviewer proposed a revised patch (v35) incorporating cosmetic changes and bug fixes, including restoring the previous behavior for laggard backends. The latest messages indicate that v35 was committed, and a follow-up comment identified an inconsistency in the `async-notify.spec` test related to `ChannelHashAddListener()`, which was eliminated in an earlier patch version.
Recent Replies
The proposer acknowledges a reviewer's finding that a test case in `async-notify.spec` is obsolete due to changes in `ChannelHashAddListener()`. The proposer indicates they will prepare a separate patch to remove this outdated test.
May 20, 2026 11:47
[PATCH] Add pg_get_subscription_ddl() function Patch Review 21 msgs Oct 31, 2025 10:57
View on pgsql-hackers archive →
Summary
This thread focuses on the development of a new function, `pg_get_subscription_ddl()`, designed to retrieve the full DDL statement for a PostgreSQL subscription. The function aims to generate the `CREATE SUBSCRIPTION` statement, including all its options, given a subscription name. The discussion involved numerous review cycles and patch revisions (up to v8). Key topics debated included whether the function should always emit all options, even default values, or a more compact DDL. Security concerns regarding passwords in connection strings were addressed by limiting function access to privileged roles. There was also discussion on how to handle `create_slot` and `copy_data` options, which are not directly stored in the catalog, and whether generated options should follow documentation order. The latest messages indicate the patch has been thoroughly reviewed and tested, with its functionality confirmed, and is now ready for the committer's final approval.
Recent Replies
The latest reply provides a final review of the v8 patch, confirming its correct functionality after addressing minor merge conflicts. The reviewer verified all aspects, including function availability, DDL syntactic validity, handling of various inputs (invalid, NULL), permission enforcement, quoted identifier handling, and disabled subscription reconstruction. It also noted the patch emits all subscription options, including defaults, and aligns with `pg_dump` behavior. The overall assessment is positive, indicating readiness for commitment.
May 15, 2026 04:45
remove obsolete comment in AtEOXact_Inval Committed 4 msgs Oct 27, 2025 02:43
View on pgsql-hackers archive →
Summary
This thread concerns an obsolete comment in the `AtEOXact_Inval()` function, which inaccurately stated that the function "should be called as the last step in processing a transaction." The proposer identified this discrepancy, as several other transaction finalization steps now occur after `AtEOXact_Inval()`. Reviewer 1 confirmed the comment's historical origin and its current inaccuracy. The proposed patch to remove the comment was met with agreement.
Recent Replies
The latest message from the committer confirms that the patch to remove the obsolete comment in `AtEOXact_Inval()` has been committed. This action concludes the thread, addressing the identified inaccuracy.
May 18, 2026 15:50
misleading error message in ProcessUtilitySlow T_CreateStatsStmt Patch Review 29 msgs Aug 21, 2025 11:59
View on pgsql-hackers archive →
Summary
The thread began with a proposer highlighting a misleading error message and duplicated code related to `T_CreateStatsStmt` within `ProcessUtilitySlow`. The core aim was to refactor the code by moving parse analysis into `CreateStatistics()`, reducing redundant `RangeVar` lookups, and enhancing robustness against race conditions. Discussions involved various refinements, including simplifying related functions and ensuring proper handling of relation objects. A reviewer raised a point about a potential regression in error reporting context, which was noted. A significant discussion also centered on how the proposed changes would interact with hypothetical future support for extended statistics spanning multiple relations, a design consideration that remains open. The latest patches aim to address the code structure and race conditions while awaiting further input on the multi-relation aspect.
Recent Replies
The latest substantial message from the proposer detailed further polishing and rebasing of the patch. It reiterated the argument that for hypothetical multi-relation statistics, the `pg_statistic_ext` catalog should contain all associated relation OIDs to enable proper deparsing and handling of expressions, suggesting that the current patch's approach would need adaptation if such a feature were implemented.
May 15, 2026 14:04
Import Statistics in postgres_fdw before resorting to sampling. Committed 84 msgs Aug 12, 2025 17:02
View on pgsql-hackers archive →
Summary
This thread initially proposed enhancing `postgres_fdw` with new options to import statistics from a remote server, aiming to reduce the need for expensive local sampling. The `fetch_stats` option (defaulting to true) would attempt to retrieve remote relation and attribute statistics. A separate `remote_analyze` option (defaulting to false) was proposed to trigger a remote `ANALYZE` if attribute statistics weren't initially found. The `fetch_stats` functionality was reviewed, deemed committable, and subsequently pushed. Following this, a reviewer identified a potential buffer overflow issue with `strncpy` calls related to attribute names, flagged by Coverity, suggesting `strlcpy` or dynamic allocation. The proposer provided two solutions: one using `pg_mbcliplen+memcpy` and another dynamically allocating and freeing string buffers for attribute names. The dynamic allocation approach was preferred by a reviewer, who further refined the patch by removing unnecessary NULL checks. This refined patch addressing the `strncpy` issue was then also committed, while the `remote_analyze` feature was deferred to a new discussion.
Recent Replies
The latest reply confirms that the updated patch, which resolves the `strncpy` buffer overflow issue by adopting a solution that dynamically allocates and frees attribute name strings, has been successfully pushed to the repository. The related open item has been closed, marking the resolution of this specific bug.
May 16, 2026 09:10
The developer indicated their readiness to push an updated patch that addresses a `strncpy()` vulnerability identified by a reviewer. This patch refines a previous fix by the original proposer, specifically modifying the `free_remattrmap` function to remove redundant `NULL` checks for `local_attname` and `remote_attname`, as these fields are guaranteed to be non-NULL by the `build_remattrmap` function's definition.
May 14, 2026 11:35
The reviewer, after reviewing the proposer's two proposed fixes for a `strncpy` issue, prefers the second solution which eliminates string buffers and instead frees nested objects. The reviewer also suggests an optimization to remove redundant `if` checks for `NULL` pointers, as the `local_attname` and `remote_attname` cannot be `NULL` if the map itself isn't `NULL`. An updated patch incorporating this optimization is attached.
May 13, 2026 11:40
[(known) BUG] DELETE/UPDATE more than one row in partitioned foreign table Patch Review 8 msgs Jul 18, 2025 15:53
View on pgsql-hackers archive →
Summary
This thread addresses a long-standing bug in postgres_fdw where DELETE/UPDATE operations on partitioned foreign tables could corrupt data by incorrectly modifying or deleting rows not matching the WHERE clause. The proposer revived an old patch to restrict these operations, but commenter 1 demonstrated its inadequacy with a concrete example. Various solutions were discussed, including disallowing modifications on such tables entirely or using WHERE CURRENT OF with cursors, though the latter raised performance concerns. Commenter 3 introduced a new approach focusing on extending the copy slot/tuple machinery to handle remote OID attributes and pass them to the FDW engine for correct UPDATE/DELETE queries. A patch set implementing this more comprehensive solution has been submitted to Commitfest.
Recent Replies
The latest reply from commenter 3 provides an updated patch set after initial submission to Commitfest, addressing issues identified by CFbot. This revision continues the effort to modify Postgres's copy slot/tuple mechanics for differing attribute counts, introduce a remote table OID parameter, and enable the FDW engine to use this OID in UPDATE and DELETE queries on partitioned foreign tables.
May 14, 2026 17:22
The latest reply from commenter 1 announces the submission of a rebased patch set to CommitFest. This patch set extends copy slot/tuple mechanics to support an additional remote OID attribute, which is then passed through the executor and utilized by the FDW engine for accurate row identification in UPDATE and DELETE queries on foreign tables.
May 14, 2026 15:05
Avoid orphaned objects dependencies, take 3 Patch Review 18 msgs May 19, 2025 17:02
View on pgsql-hackers archive →
Summary
The thread discusses a long-standing issue of orphaned object dependencies, proposing a solution that involves acquiring heavyweight locks on referenced objects during DDL operations. The core idea is to prevent race conditions during concurrent DROP operations. Early in the discussion, a reviewer expressed concerns about the "subtle timing" of these locks and potential security implications, specifically distinguishing between cases where permissions are checked before (P1) or after (P2) a lock is acquired. The proposer then focused on identifying and addressing P1 cases, which are deemed more critical from a security standpoint. A new patch (v20/v21) has been submitted, which includes three sub-patches: one for general lock acquisition, one for ensuring locks are taken before permission checks in P1 cases, and an assertion-based mechanism to detect future regressions in this area. A commenter also noted customer interest in this fix. Discussion continues around the scope and safety of the proposed assertion mechanism, with the proposer defending its design and efficacy.
Recent Replies
The proposer responded to a reviewer's feedback on the assert mechanism. They confirmed that the assert has already proven useful by detecting a new bug, which was subsequently fixed. The proposer further clarified their stance on not requiring permission checks for all dependency recordings and explained why the assert mechanism should not be confused by user-defined functions executing DDL, as transaction-scoped locks would prevent false positives.
May 18, 2026 12:14
In the latest reply, Reviewer 1 appreciated the concept of the `ASSERT` guard (part of the v20 patch set) for detecting future coding errors. However, the reviewer questioned whether it should be considered an error to record a dependency without *any* associated permissions check. Additionally, the reviewer expressed concern that the proposed mechanism might become confused if user-defined functions were to execute further DDL commands within `ProcessUtility`.
May 13, 2026 20:20
amcheck support for BRIN indexes Patch Review 25 msgs Apr 22, 2025 09:05
View on pgsql-hackers archive →
Summary
The proposer initiated a thread to add `amcheck` support for BRIN indexes, outlining a patch with index structure checks (meta page, revmap, regular pages) and consistency checks between heap and index. Early discussions revolved around how to handle operator identification for the 'all consistent check', especially for opclasses that lack an equality operator, with commenter 1 suggesting leveraging existing primitives and the proposer exploring user-defined operators or a catalog mapping. Reviewer 1 provided detailed feedback, proposing an optional operator argument, requiring tests for multi-column indexes, suggesting improvements to the `CheckIndexCheckXMin` function, and requesting documentation updates. The proposer subsequently updated the patch to incorporate some of these suggestions, making the operator list optional and relocating `indcheckxmin`. More recently, the proposer reiterated the idea of an opclass-to-operator mapping to simplify user experience. Reviewer 2 successfully applied and built the updated patch, performing basic validation tests and noting a necessary `ALTER EXTENSION amcheck UPDATE` for existing `amcheck` installations, which the proposer confirmed as expected behavior for upgrades.
Recent Replies
The latest reply from the proposer acknowledges the successful testing report from reviewer 2. The proposer clarifies that the need to run `ALTER EXTENSION amcheck UPDATE` after applying the patch is expected when an existing `amcheck` installation is being updated, and does not indicate an issue with the patch itself.
May 20, 2026 17:55
A reviewer confirms that the patch applied successfully and built without issues. They verified that the `brin_index_check()` function became available and worked as expected after updating the `amcheck` extension, and that some basic BRIN index validation tests passed.
May 20, 2026 12:15
Fix bug with accessing to temporary tables of other sessions Committed 65 msgs Apr 14, 2025 05:36
View on pgsql-hackers archive →
Summary
This lengthy thread discusses and ultimately resolves a bug concerning superuser access to temporary tables of other sessions. Initially, PostgreSQL explicitly forbade such access for most operations, with `DROP` being a conscious exception. However, a specific commit later introduced a regression, allowing superusers to perform other operations like `SELECT` on another session's temporary table, particularly when empty. The proposer submitted a patch to restore the intended behavior, preventing erroneous access for operations other than `DROP`. The discussion involved considerations for backpatching, focusing on versions affected by the regression (PG17 onwards), and potential issues with older versions (PG14-16) where the bug manifested differently. After a brief delay due to the code freeze for minor releases, the committer pushed the fix, adapting tests for different versions. The original proposer also acknowledged a separate, related architectural issue concerning `relpersistence` that remains to be addressed.
Recent Replies
The committer announced that the patch, which resolves the bug preventing superusers from accessing temporary tables of other sessions, has been successfully pushed. The committer noted making slight revisions to the tests to ensure compatibility across PostgreSQL 17 and 18, accounting for variations in log messages and default `log_lock_waits` values. The original proposer also highlighted a further architectural issue concerning `relpersistence` for future consideration.
May 14, 2026 16:48
The latest reply from the main proposer confirms that the patch has been pushed to the repository. They noted a minor revision was required for the tests to run correctly on versions 18 and 17, specifically addressing differences in log messages and the default value of `log_lock_waits`.
May 14, 2026 13:39
The latest reply by reviewer 2 informs the proposer that they are unable to perform a detailed review of the patch set in the immediate future. The reviewer advised the proposer not to wait for their input and to proceed as they deem appropriate, suggesting that the patch is ready for the next steps towards commitment without requiring further review from this specific individual.
May 14, 2026 06:58
Adding pg_dump flag for parallel export to pipes Patch Review 24 msgs Apr 7, 2025 17:16
View on pgsql-hackers archive →
Summary
This thread proposes adding a new flag, initially `--pipe-command` and later renamed to `--pip`, to `pg_dump` and `pg_restore` for use with the directory output format (`-Fd`). The feature aims to enable piping individual dump files to external commands, offering flexibility for custom compression, streaming to cloud storage, or transferring data via SSH, which is currently not possible with the directory format. The proposer introduced a `%f` specifier for dynamic file naming within the pipe command. A reviewer provided extensive feedback, suggesting a shorter flag name, improved error handling, more comprehensive testing, and considering `pg_dumpall` support. The proposer has since rebased the patch multiple times, incorporated many suggestions including renaming the flag to `--pip`, enhancing error handling, adding numerous tests for various scenarios and parallelism, and specifically addressing Windows compatibility. Support for `pg_dumpall` has been deferred for a future patch.
Recent Replies
The latest reply from the proposer focuses on refining the patch for better compatibility, specifically addressing how pipe commands are quoted within the Windows test suite. This indicates an ongoing effort to ensure the robustness and cross-platform functionality of the proposed `--pip` feature for `pg_dump` and `pg_restore`.
May 21, 2026 09:56
The proposer provided another updated version of the patches. This latest revision primarily focuses on cleaning up the test files, specifically addressing and removing a 'split command' that was causing issues during Windows tests. This indicates continued effort to ensure the robustness and cross-platform compatibility of the proposed feature's test suite.
May 14, 2026 10:09
The latest reply from the proposer provides an updated patch version. This version includes minor changes to the test code specifically to accommodate Windows backslash paths, indicating continued efforts to ensure cross-platform compatibility and robustness. The code has also been rebased.
May 11, 2026 05:34
libpq: Process buffered SSL read bytes to support records >8kB on async API Patch Review 24 msgs Mar 16, 2025 13:13
View on pgsql-hackers archive →
Summary
This thread addresses a critical bug in libpq related to processing buffered SSL/GSSAPI read bytes, particularly for records larger than 8KB when using the async API, which could lead to deadlocks or hangs. The proposer submitted a patch series aiming to fix GSSAPI-specific issues and ensure `pqReadData()` drains transport buffers. Initial patches sparked extensive architectural discussions regarding buffering strategies and the interaction with OpenSSL readahead. Reviewers provided significant feedback, identifying issues like layering violations and a bug where a buffer pointer (`conn->inEnd`) was not advanced after draining, potentially leading to data loss. A reproducer script was shared, demonstrating the bug's occurrence and the patch's effectiveness. The latest version (V3) has undergone testing, with a reviewer confirming its successful application, build, and operation without regressions during async libpq tests and large `COPY TO STDOUT` operations over SSL.
Recent Replies
A reviewer tested the latest V3 patch series on PostgreSQL HEAD with SSL enabled. The reviewer confirmed that the patches applied cleanly, built successfully, and the server started without issues. During testing of async libpq and large `COPY TO STDOUT` operations over SSL, no hangs, crashes, or visible regressions were observed, indicating positive progress on the patch.
May 14, 2026 04:32
Random pg_upgrade 004_subscription test failure on drongo Discussing 10 msgs Mar 13, 2025 09:04
View on pgsql-hackers archive →
Summary
This thread discusses random `pg_upgrade` test failures on Windows buildfarm machines, specifically the `004_subscription` test, exhibiting a "File exists" error during schema restoration. The proposer suggests this is due to a `STATUS_DELETE_PENDING` issue on Windows, where `pgunlink()` succeeds but the file isn't immediately released, causing `mdcreate()` to fail. A potential fix involving `WaitForProcSignalBarrier` within `mdcreate()` for Windows-specific `STATUS_DELETE_PENDING` errors was proposed and a patch submitted. A reviewer raised concerns about adding more Windows-specific code and suggested alternative approaches or dedicated test modules for concurrent file operations. Subsequently, the discussion shifted to the critical problem that `pg_upgrade_output.d` logs, vital for debugging these failures, were not being collected by the buildfarm. The latest messages confirm that the buildfarm logging bug has been identified and fixed, allowing for proper diagnosis of future failures.
Recent Replies
The latest message announces that a bug in the buildfarm client code, which prevented the collection of `pg_upgrade_output.d` logs crucial for debugging these failures, has been found and fixed. The fix has been committed to the buildfarm client and deployed on the affected Windows machines (drongo and fairywren), unblocking future diagnostic efforts.
May 16, 2026 11:22
The latest reply from a reviewer indicates that they have adjusted parameters on the problematic buildfarm machines (drongo and fairywren) to improve the chances of capturing the pg_upgrade_output.d logs. They acknowledged that there are other issues with the 004 test's log collection logic that will be addressed later, but for now, the immediate focus is on gathering diagnostic information from future failures.
May 11, 2026 12:10
The latest message from a commenter reports that the mysterious `pg_upgrade` failures on Windows buildfarm machines continue to occur, impacting both `004_subscription` and `006_transfer_modes` tests. The critical `pg_upgrade_output.d` logs, which are essential for debugging, are still not being collected in the buildfarm environment, making it difficult to reproduce and diagnose the exact cause of the failures. The commenter requests further assistance.
May 10, 2026 15:00
Sequence Access Methods, round two Patch Review 44 msgs Feb 18, 2025 05:11
View on pgsql-hackers archive →
Summary
This thread discusses the implementation of Sequence Access Methods in PostgreSQL, allowing custom sequence generation. The proposer introduced several patch versions, with v11 being the first in the visible messages and v28/v29 later. A reviewer provided detailed feedback on v26, covering documentation clarity, header file ordering, handling of unlogged sequences, use of default constants, and macro design, to which the proposer largely responded. Another reviewer later rebased the patch set, offering comments on a snowflake sequence implementation and performance concerns related to function pointers. The proposer noted a lack of wider developer enthusiasm, leading to the patch being dropped from the commitfest, though he still supports the design. The latest exchanges include the second reviewer providing benchmark results for v29, indicating a slight performance improvement over the baseline, and suggestions for further optimization regarding cache lookups. The core idea is to enable extensible sequence generation, which is seen as crucial for distributed applications.
Recent Replies
The latest reply from reviewer 1 presents benchmark results for patch v29. Using both a simple `generate_series` count and `pgbench` for unlogged table insertions, the reviewer found a slight performance improvement (around +0.79% mean tps for pgbench) with the patched version compared to the baseline. The reviewer notes that their hardware might not be sensitive enough for detecting overhead and provides scripts for exact test restoration.
May 19, 2026 13:11
The latest reply from reviewer 2 acknowledges the proposer's stance regarding the lack of enthusiasm from other core developers for the patch set. Despite this, reviewer 2 reiterates a previous suggestion about optimizing the code by avoiding unnecessary cache lookups, implying potential performance improvements could still be explored for the proposed feature.
May 18, 2026 18:42
The proposer reaffirmed that the patch set was withdrawn from the commit fest due to an explicit lack of feedback and enthusiasm from other core developers, suggesting a general disinterest in the proposal. The proposer also acknowledged the importance of benchmarking for worst-case scenarios in performance-critical code paths.
May 17, 2026 22:43
Truncate logs by max_log_size Patch Review 22 msgs Jan 31, 2025 10:46
View on pgsql-hackers archive →
Summary
The thread discusses a patch to introduce a new configuration parameter, initially named `max_log_size`, to truncate long statements in PostgreSQL logs. The proposer submitted several iterations of the patch, addressing feedback regarding indentation, trailing whitespace, and making it session-wise configurable. Early reviews confirmed its functionality for basic statement logging. A committer raised several concerns, including the misleading parameter name (suggesting `log_statement_max_length`), issues with empty STATEMENT lines in logs, the applicability to replication commands, and the need to extend truncation to other logging contexts like `exec_parse_message`, `exec_bind_message`, `exec_execute_message`, and CONTEXT lines. The parameter name was changed to `log_statement_max_length`, the default value to -1, and `strlen()` calls were optimized. The proposer later extended the truncation logic to cover `exec_execute_message`, `exec_parse_message`, and `exec_bind_message`. A recent comment highlighted that statements with errors were still logged in full, suggesting a companion parameter like `log_statement_max_length_on_error`, which the committer suggested handling in a separate patch. The latest message is a rebase due to recent changes in `src/test/modules/test_misc/meson.build`.
Recent Replies
The latest message is a rebase of the patch. The proposer rebased the patch to accommodate recent changes in `src/test/modules/test_misc/meson.build`, ensuring its compatibility with the current development branch.
May 15, 2026 10:48
Bypassing cursors in postgres_fdw to enable parallel plans Patch Review 25 msgs Jan 6, 2025 08:52
View on pgsql-hackers archive →
Summary
This thread proposes a mechanism to bypass cursors in `postgres_fdw` to enable parallel query plans on the remote server, addressing a limitation where parallel plans fail due to cursor usage. The initial approach introduced a GUC `postgres_fdw.use_cursor` and used `PQsetChunkedRowsMode` in non-cursor mode. A challenge arose with simultaneous queries, leading to the development of a mechanism to store fetched data in a Tuplestore when a cursor switch occurs. The patch underwent significant refactoring based on reviewer feedback, including adding a Tuplestore to `PgFdwScanState`, renaming flags, and improving `postgresReScanForeignScan` logic. Discussions highlighted issues like unnecessary code, flag naming, `active_scan` pointer management, and `ExprContext` usage. The latest version of the patch split the changes into two, the first renaming `cursor_exists` to `scan_in_progress` and the second implementing the fetch mechanism, and introduced a new GUC `streaming_fetch`.
Recent Replies
The proposer acknowledges the reviewer's detailed feedback, agreeing with the analysis of the `ExprContext` problem and the underlying `active_scan` pointer issue. The proposer confirms their intention to implement the suggested solution, which involves ensuring the `active_scan` pointer is only non-NULL when results are actively being drained.
May 20, 2026 10:40
relfilenode statistics Patch Review 25 msgs Jan 3, 2025 16:18
View on pgsql-hackers archive →
Summary
This thread discusses an improvement to PostgreSQL's statistics system, aiming to address inaccuracies in statistics after a crash recovery or failover. The core proposal is to key statistics by `relfilenode` instead of relation OID, which can change. Earlier ideas, such as storing OID to buffertag mapping, were dismissed due to recovery limitations. The main debate focuses on the design of the `PgStat_StatTabEntry` structure. Reviewer 1 suggested splitting it into table, index, and relfilenode specific fields from the outset to avoid complexity, particularly concerning partitioned tables and unnecessary data for autovacuum. The proposer, supported by reviewer 2, argues for an incremental approach, advocating for a unified structure initially and considering a split later, once WAL-replay-based stat population is implemented. The proposer believes the current patch (v16) adequately addresses technical concerns and is a necessary step that doesn't hinder future architectural changes, and is seeking a committer to drive it forward.
Recent Replies
The latest message from the proposer summarizes the current state of the patch (v16), addressing previous concerns from reviewer 1 regarding stat copying and structure splitting. The proposer reiterates support for an incremental design, explaining it unblocks future work and allows for better-informed decisions on a split. The message explicitly asks reviewer 2 about committing the patch and reviewer 1 about continued review.
May 18, 2026 16:28
RFC: Allow EXPLAIN to Output Page Fault Information Patch Review 42 msgs Dec 24, 2024 08:53
View on pgsql-hackers archive →
Summary
This thread proposes a new `PAGEFAULTS` option for `EXPLAIN (ANALYZE)` to report minor and major page fault counts during query planning and execution. The goal is to provide deeper insights into storage I/O activity beyond what `BUFFERS` currently offers, aiding in diagnosing slow queries. Early discussions covered platform limitations (Windows `getrusage()`) and the performance impact of per-node reporting. A key ongoing concern is the accuracy of `getrusage()` with asynchronous I/O methods, particularly bgworker-based AIO, which could lead to undercounting. The proposer adapted the patch to suppress output when `io_method=worker`. Reviewers have provided detailed feedback on output format, naming, documentation, and test coverage, leading to iterative patch revisions. The thread is still active, with a reviewer recently reiterating concerns about the interpretability of the reported I/O statistics.
Recent Replies
The latest reply from reviewer 2 acknowledges the usefulness of the EXPLAIN storage I/O patch but raises continued concerns about the potential for misleading values when I/O is handled asynchronously or by worker processes, as `getrusage()` may not capture all activity. Reviewer 2 suggests that the documentation should clarify that the reported numbers represent "backend-observed synchronous storage I/O" rather than total query I/O to prevent misinterpretation, indicating that further refinements are needed.
May 21, 2026 05:38
Bug: mdunlinkfiletag unlinks mainfork seg.0 instead of indicated fork+segment Patch Review 6 msgs Dec 20, 2024 22:41
View on pgsql-hackers archive →
Summary
The thread discusses a bug in PostgreSQL's `mdunlinkfiletag` function where it incorrectly unlinks segment 0 of the main fork instead of the specified fork and segment. This issue was identified as affecting PG16+ for forks and PG12+ for segments, potentially leading to incorrect file deletion during recovery. The proposer initially provided a patch to correct this by enabling the function to unlink the exact requested files. However, a reviewer suggested an alternative: instead of generalizing the function, restrict its scope. Given that its only known use case within the core system is for "tombstone" files, the reviewer proposed renaming `register_unlink_segment()` to `register_unlink_tombstone()` and removing the fork/segment arguments to clarify its limited purpose. This approach was adopted in a subsequent patch version. Later reviewers praised this direction, noting it clarifies intent and adds an `Assert()` for safety. The patch is now considered in good shape, with a minor comment suggestion agreed upon.
Recent Replies
The commenter, having previously reviewed the patch, thanked another reviewer for their testing and confirmation of the patch's functionality. The commenter also agreed with a suggestion made by the reviewer for a minor comment to be added near an `Assert()` statement, further refining the patch.
May 18, 2026 16:42
Reviewer 2 confirms the bug's original behavior (ignoring forknum/segno) and expresses strong support for the v2 patch. They specifically highlight that renaming the function to `register_unlink_tombstone()` clarifies its specific intent. The added `Assert()` is seen as a valuable safeguard. The reviewer suggests a minor comment improvement for further clarity and confirms the patch applies and tests successfully.
May 17, 2026 14:50
SQL/JSON json_table plan clause Patch Review 14 msgs Dec 17, 2024 15:11
View on pgsql-hackers archive →
Summary
This thread concerns the implementation of the `PLAN` clause for `JSON_TABLE`, a feature from the SQL/JSON standard. The proposer initiated the work, adapting the clause to recent `JSON_TABLE` changes and correcting existing tests, noting that some code had to be reverted. An early comment supported the feature despite Oracle's non-adoption. Over several patch iterations, reviewers provided extensive feedback, highlighting issues such as missing documentation, a mixture of refactoring and new code, incomplete comments, and incorrect `IsA()` macro usage. Concerns were also raised about the default behavior of `JSON_BEHAVIOR_EMPTY` in deparsing versus `JSON_BEHAVIOR_EMPTY_ARRAY` in parsing, and the unnecessary emission of the `PLAN` clause during deparsing. The proposer has consistently addressed this feedback, re-partitioning the patch into distinct code, test, and documentation components for easier review.
Recent Replies
The proposer has rebased the patch and, based on recent reviewer feedback, split it into three parts: main code changes, test cases, and documentation. They have corrected the `IsA()` macro usage, aligned default behaviors for parsing and deparsing, ensured the `PLAN` clause is only emitted when user-specified, and removed unused typedefs and an empty comment. The proposer noted that `pgindent` formatting is still pending for a future version.
May 15, 2026 11:53
The latest reply is from the proposer, acknowledging the detailed feedback provided by reviewer 2 on the updated patch. The proposer indicates an intention to correct all the noted points as soon as possible, signaling a continued commitment to addressing the identified issues and progressing the patch.
May 11, 2026 20:12
The latest reply from a reviewer provides a detailed review of the v22 patch. The reviewer points out several issues including incorrect usage of `IsA`, inconsistencies in default deparsing values for `get_json_table()`, undesired emission of the PLAN clause during deparsing, unused typedefs, an unaddressed empty comment, naming inconsistencies, missing documentation, and a need for `pgindent` formatting.
May 11, 2026 12:42
on_error table, saving error info to a table Patch Review 20 msgs Dec 11, 2024 11:41
View on pgsql-hackers archive →
Summary
This thread details the development of a feature to allow COPY FROM to save error information into a designated table rather than stopping or ignoring errors. The evolution of the patch, through multiple versions, shows a progression from direct memory manipulation to a more robust executor-based approach using ExecInsert(). The current design leverages a built-in composite type, copy_error_saving, for the error table schema, which simplifies validation. The feature introduces new syntax COPY FROM ... ON_ERROR TABLE, ERROR_TABLE err_tbl. Initial reviews focused on minor code style and the idea of auto-creating the error table. Later versions significantly refactored the implementation to integrate with the executor's ModifyTableState and ResultRelInfo nodes, which was praised for its cleanliness. However, subsequent reviews identified several critical issues in version 11, including premature closing of a relation leading to crashes, incorrect ordering of trigger handling, potential miscounting of errors when BEFORE INSERT triggers return NULL, missing null checks, and redundancy in permission checks. The proposer acknowledged some of these issues and proposed fixes, while further discussions on the clarity of error messages and documentation for trigger behavior are ongoing.
Recent Replies
Reviewer 3 follows up on the error counting and trigger interaction. They highlight that silently dropping rows due to a BEFORE trigger returning NULL without explicit output is problematic, especially when a NOTICE states "saving error information" while no rows are ultimately saved. The reviewer suggests adding clear documentation on how triggers function on the error table, including the behavior of BEFORE INSERT FOR EACH ROW triggers returning NULL. Additionally, questions are raised regarding the necessity of RegisterSnapshot for the estate->es_snapshot, the redundancy of a permission check, the repetition of a REJECT_LIMIT check, and the appropriateness of using ExecGetReturningSlot.
May 15, 2026 11:32
The latest reply from the proposer clarified the intended behavior of triggers on the error-saving table, responding to a reviewer's query. The proposer stated that statement-level triggers will fire unconditionally, and for each inserted error row, both `BEFORE INSERT FOR EACH ROW` and `AFTER INSERT FOR EACH ROW` triggers will execute, aligning the implementation with the proposed design.
May 15, 2026 09:05
The latest reply from reviewer 2 identifies several critical bugs in the current patch. These include a premature table_close call leading to 'OID 0' errors, an incorrect method for counting errors that doesn't account for BEFORE triggers returning NULL, and issues with AFTER statement triggers causing server crashes. The reviewer also suggests a missing OidIsValid check for the composite type lookup, indicating the patch needs further attention before committing.
May 14, 2026 17:14