pgsql: Report the correct is_temporary flag for column defaults.

2025-09-12 Thread Tom Lane
Report the correct is_temporary flag for column defaults. pg_event_trigger_dropped_objects() would report a column default object with is_temporary = false, even if it belongs to a temporary table. This seems clearly wrong, so adjust it to report the table's temp-ness. While here, refactor Event

pgsql: ci: openbsd: Increase RAM disk's size

2025-09-12 Thread Andres Freund
ci: openbsd: Increase RAM disk's size Its size was ~3.8GB before, which sometimes was not enough. OpenBSD CI task often were failing due to no space left on device. Increase the RAM disk size to ~4.6 GB. Author: Nazir Bilal Yavuz Discussion: https://postgr.es/m/CAN55FZ2XVVPJRJmGB2DsL3gOrOinWh=H

pgsql: Avoid unexpected changes of CurrentResourceOwner and CurrentMemo

2025-09-12 Thread Álvaro Herrera
Avoid unexpected changes of CurrentResourceOwner and CurrentMemoryContext Users of logical decoding can encounter an unexpected change of CurrentResourceOwner and CurrentMemoryContext. The problem is that, unlike other call sites of RollbackAndReleaseCurrentSubTransaction(), in reorderbuffer.c we

pgsql: Always commute strategy when preprocessing DESC keys.

2025-09-12 Thread Peter Geoghegan
Always commute strategy when preprocessing DESC keys. A recently added nbtree preprocessing step failed to account for the fact that DESC columns already had their B-Tree strategy number commuted at this point in preprocessing. As a result, preprocessing could output a set of scan keys where one

pgsql: Replace tests of ALTER DATABASE RESET TABLESPACE.

2025-09-12 Thread Noah Misch
Replace tests of ALTER DATABASE RESET TABLESPACE. This unblocks rejection of that syntax. One copy was a misspelling of "SET TABLESPACE pg_default" that instead made no persistent changes. The other copy just needed to populate a DATABASEOID syscache entry. This slightly raises database.sql test

pgsql: Fix oversights in pg_event_trigger_dropped_objects() fixes.

2025-09-12 Thread Tom Lane
Fix oversights in pg_event_trigger_dropped_objects() fixes. Commit a0b99fc12 caused pg_event_trigger_dropped_objects() to not fill the object_name field for schemas, which it should have; and caused it to fill the object_name field for default values, which it should not have. In addition, trigge

pgsql: Fix oversights in pg_event_trigger_dropped_objects() fixes.

2025-09-12 Thread Tom Lane
Fix oversights in pg_event_trigger_dropped_objects() fixes. Commit a0b99fc12 caused pg_event_trigger_dropped_objects() to not fill the object_name field for schemas, which it should have; and caused it to fill the object_name field for default values, which it should not have. In addition, trigge

pgsql: Reject "ALTER DATABASE/USER ... RESET foo" with invalid GUC name

2025-09-12 Thread Tom Lane
Reject "ALTER DATABASE/USER ... RESET foo" with invalid GUC name. If the database or user had no entry in pg_db_role_setting, RESET silently did nothing --- including not checking the validity of the given GUC name. This is quite inconsistent and surprising, because you *would* get such an error

pgsql: Fix oversights in pg_event_trigger_dropped_objects() fixes.

2025-09-12 Thread Tom Lane
Fix oversights in pg_event_trigger_dropped_objects() fixes. Commit a0b99fc12 caused pg_event_trigger_dropped_objects() to not fill the object_name field for schemas, which it should have; and caused it to fill the object_name field for default values, which it should not have. In addition, trigge