Simplify set of flags used by MyXactFlags
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-01-18T05:31:26Z
Lists: pgsql-hackers
Attachments
- 0001-Simplify-2PC-restriction-handling-for-temporary-obje.patch (text/x-diff) patch 0001
Hi all, c5660e0 has introduced a new flag for MyXactFlags to restrict two-phase commit from working with temporary objects, and as a matter of fact XACT_FLAGS_ACCESSEDTEMPREL has been kept around to keep the error handling message compatible with past versions, still it is weird to keep both ACCESSEDTEMPNAMESPACE and ACCESSEDTEMPREL as the former implies the latter, so attached is a cleanup patch for HEAD. Keeping both messages makes the error handling at PREPARE time perhaps a bit cleaner to make the difference about schema-level access or table-level access, still I'd rather simplify the code and just only keep the schema-level change as something we complain about. Another thing is that ACCESSEDTEMPREL is used in PreCommit_on_commit_actions() to avoid the truncates of ON COMMIT DELETE ROWS if no temporary tables have been accessed, still it would just mean that truncation would be tried on empty tables for nothing even if say a function is created in pg_temp. Thoughts? -- Michael
Commits
-
Simplify restriction handling of two-phase commit for temporary objects
- c9b75c5838fe 12.0 landed