pgsql: Stop creating constraints during DETACH CONCURRENTLY

2025-10-11 Thread Álvaro Herrera
Stop creating constraints during DETACH CONCURRENTLY Commit 71f4c8c6f74b (which implemented DETACH CONCURRENTLY) added code to create a separate table constraint when a table is detached concurrently, identical to the partition constraint, on the theory that such a constraint was needed in case th

pgsql: Stop creating constraints during DETACH CONCURRENTLY

2025-10-11 Thread Álvaro Herrera
Stop creating constraints during DETACH CONCURRENTLY Commit 71f4c8c6f74b (which implemented DETACH CONCURRENTLY) added code to create a separate table constraint when a table is detached concurrently, identical to the partition constraint, on the theory that such a constraint was needed in case th

pgsql: Eliminate COPY FREEZE use of XLOG_HEAP2_VISIBLE

2025-10-11 Thread Melanie Plageman
Eliminate COPY FREEZE use of XLOG_HEAP2_VISIBLE Instead of emitting a separate WAL XLOG_HEAP2_VISIBLE record for setting bits in the VM, specify the VM block changes in the XLOG_HEAP2_MULTI_INSERT record. This halves the number of WAL records emitted by COPY FREEZE. Author: Melanie Plageman Rev

pgsql: dbase_redo: Fix Valgrind-reported memory leak

2025-10-11 Thread Álvaro Herrera
dbase_redo: Fix Valgrind-reported memory leak Introduced by my (Álvaro's) commit 9e4f914b5eba, which was itself backpatched to pg10, though only pg15 and up contain the problem because of commit 9c08aea6a309. This isn't a particularly significant leak, but given the fix is trivial, we might as we

pgsql: dbase_redo: Fix Valgrind-reported memory leak

2025-10-11 Thread Álvaro Herrera
dbase_redo: Fix Valgrind-reported memory leak Introduced by my (Álvaro's) commit 9e4f914b5eba, which was itself backpatched to pg10, though only pg15 and up contain the problem because of commit 9c08aea6a309. This isn't a particularly significant leak, but given the fix is trivial, we might as we

pgsql: dbase_redo: Fix Valgrind-reported memory leak

2025-10-11 Thread Álvaro Herrera
dbase_redo: Fix Valgrind-reported memory leak Introduced by my (Álvaro's) commit 9e4f914b5eba, which was itself backpatched to pg10, though only pg15 and up contain the problem because of commit 9c08aea6a309. This isn't a particularly significant leak, but given the fix is trivial, we might as we

pgsql: Restore test coverage of LZ4Stream_gets().

2025-10-11 Thread Tom Lane
Restore test coverage of LZ4Stream_gets(). In commit a45c78e32 I removed the only regression test case that reaches this function, because it turns out that we only use it if reading an LZ4-compressed blobs.toc file in a directory dump, and that is a state that has to be created manually. That se