pgsql: psql: Improve tab completion for large objects.

2025-10-23 Thread Fujii Masao
psql: Improve tab completion for large objects. This commit enhances psql's tab completion support for large objects: - Completes \lo_export with a file name - Completes GRANT/REVOKE ... LARGE with OBJECT - Completes ALTER DEFAULT PRIVILEGES GRANT/REVOKE ... LARGE with OBJECTS Author: Dagfinn Il

pgsql: Update expected output for contrib/sepgsql's regression tests.

2025-10-23 Thread Tom Lane
Update expected output for contrib/sepgsql's regression tests. Commit 65281391a caused some additional error context lines to appear in the output of one test case. That's fine, but we missed updating the expected output. Do it now. While here, add some missing test-output subdirectories to con

pgsql: Update expected output for contrib/sepgsql's regression tests.

2025-10-23 Thread Tom Lane
Update expected output for contrib/sepgsql's regression tests. Commit 65281391a caused some additional error context lines to appear in the output of one test case. That's fine, but we missed updating the expected output. Do it now. While here, add some missing test-output subdirectories to con

pgsql: doc: Remove mention of Git protocol support

2025-10-23 Thread Daniel Gustafsson
doc: Remove mention of Git protocol support The project Git server hasn't supported cloning with the Git protocol in a very long time, but the documentation never got the memo. Remove the mention of using the Git protocol, and while there wrap a mention of Git in tags. Backpatch down to all supp

pgsql: Avoid memory leak in validation of a PL/Python trigger function.

2025-10-23 Thread Tom Lane
Avoid memory leak in validation of a PL/Python trigger function. If we're trying to perform check_function_bodies validation of a PL/Python trigger function, we create a new PLyProcedure, but we don't put it into the PLy_procedure_cache hash table. (Doing so would be useless, since we don't have t

pgsql: Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf.

2025-10-23 Thread Tom Lane
Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf. These two functions expect there to be room to insert another item in the FreePageBtree's array, but their assertions were too weak to guarantee that. This has little practical effect granting that the callers are not buggy, but it seems

pgsql: Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf.

2025-10-23 Thread Tom Lane
Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf. These two functions expect there to be room to insert another item in the FreePageBtree's array, but their assertions were too weak to guarantee that. This has little practical effect granting that the callers are not buggy, but it seems

pgsql: Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf.

2025-10-23 Thread Tom Lane
Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf. These two functions expect there to be room to insert another item in the FreePageBtree's array, but their assertions were too weak to guarantee that. This has little practical effect granting that the callers are not buggy, but it seems

pgsql: Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf.

2025-10-23 Thread Tom Lane
Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf. These two functions expect there to be room to insert another item in the FreePageBtree's array, but their assertions were too weak to guarantee that. This has little practical effect granting that the callers are not buggy, but it seems

pgsql: Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf.

2025-10-23 Thread Tom Lane
Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf. These two functions expect there to be room to insert another item in the FreePageBtree's array, but their assertions were too weak to guarantee that. This has little practical effect granting that the callers are not buggy, but it seems

pgsql: Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf.

2025-10-23 Thread Tom Lane
Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf. These two functions expect there to be room to insert another item in the FreePageBtree's array, but their assertions were too weak to guarantee that. This has little practical effect granting that the callers are not buggy, but it seems

pgsql: Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf.

2025-10-23 Thread Tom Lane
Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf. These two functions expect there to be room to insert another item in the FreePageBtree's array, but their assertions were too weak to guarantee that. This has little practical effect granting that the callers are not buggy, but it seems

pgsql: Fix resource leaks in PL/Python error reporting, redux.

2025-10-23 Thread Tom Lane
Fix resource leaks in PL/Python error reporting, redux. Commit c6f7f11d8 intended to prevent leaking any PyObject reference counts in edge cases (such as out-of-memory during string construction), but actually it introduced a leak in the normal case. Repeating an error-trapping operation often eno

pgsql: Fix resource leaks in PL/Python error reporting, redux.

2025-10-23 Thread Tom Lane
Fix resource leaks in PL/Python error reporting, redux. Commit c6f7f11d8 intended to prevent leaking any PyObject reference counts in edge cases (such as out-of-memory during string construction), but actually it introduced a leak in the normal case. Repeating an error-trapping operation often eno

pgsql: Fix resource leaks in PL/Python error reporting, redux.

2025-10-23 Thread Tom Lane
Fix resource leaks in PL/Python error reporting, redux. Commit c6f7f11d8 intended to prevent leaking any PyObject reference counts in edge cases (such as out-of-memory during string construction), but actually it introduced a leak in the normal case. Repeating an error-trapping operation often eno

pgsql: Fix resource leaks in PL/Python error reporting, redux.

2025-10-23 Thread Tom Lane
Fix resource leaks in PL/Python error reporting, redux. Commit c6f7f11d8 intended to prevent leaking any PyObject reference counts in edge cases (such as out-of-memory during string construction), but actually it introduced a leak in the normal case. Repeating an error-trapping operation often eno

pgsql: Fix resource leaks in PL/Python error reporting, redux.

2025-10-23 Thread Tom Lane
Fix resource leaks in PL/Python error reporting, redux. Commit c6f7f11d8 intended to prevent leaking any PyObject reference counts in edge cases (such as out-of-memory during string construction), but actually it introduced a leak in the normal case. Repeating an error-trapping operation often eno

pgsql: Fix resource leaks in PL/Python error reporting, redux.

2025-10-23 Thread Tom Lane
Fix resource leaks in PL/Python error reporting, redux. Commit c6f7f11d8 intended to prevent leaking any PyObject reference counts in edge cases (such as out-of-memory during string construction), but actually it introduced a leak in the normal case. Repeating an error-trapping operation often eno

pgsql: Fix resource leaks in PL/Python error reporting, redux.

2025-10-23 Thread Tom Lane
Fix resource leaks in PL/Python error reporting, redux. Commit c6f7f11d8 intended to prevent leaking any PyObject reference counts in edge cases (such as out-of-memory during string construction), but actually it introduced a leak in the normal case. Repeating an error-trapping operation often eno

pgsql: Introduce "REFRESH SEQUENCES" for subscriptions.

2025-10-23 Thread Amit Kapila
Introduce "REFRESH SEQUENCES" for subscriptions. This patch adds support for a new SQL command: ALTER SUBSCRIPTION ... REFRESH SEQUENCES This command updates the sequence entries present in the pg_subscription_rel catalog table with the INIT state to trigger resynchronization. In addition to the

pgsql: pg_rewind: Extend code detecting relation files to work with WAL

2025-10-23 Thread Michael Paquier
pg_rewind: Extend code detecting relation files to work with WAL files isRelDataFile() is renamed to getFileContentType(), extended so as it becomes able to detect more file patterns than only relation files. The new file name pattern that can be detected is WAL files. This refactoring has been