mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Avoid setup work for invalidation messages at start-of-(sub)xact.
Instead of initializing a new TransInvalidationInfo for every transaction or subtransaction, we can just do it for those transactions or subtransactions that actually need to queue invalidation messages. That also avoids needing to free those entries at the end of a transaction or subtransaction that does not generate any invalidation messages, which is by far the common case. Patch by me. Review by Simon Riggs and Andres Freund.
This commit is contained in:
@ -1838,7 +1838,6 @@ StartTransaction(void)
|
||||
* initialize other subsystems for new transaction
|
||||
*/
|
||||
AtStart_GUC();
|
||||
AtStart_Inval();
|
||||
AtStart_Cache();
|
||||
AfterTriggerBeginXact();
|
||||
|
||||
@ -4151,7 +4150,6 @@ StartSubTransaction(void)
|
||||
*/
|
||||
AtSubStart_Memory();
|
||||
AtSubStart_ResourceOwner();
|
||||
AtSubStart_Inval();
|
||||
AtSubStart_Notify();
|
||||
AfterTriggerBeginSubXact();
|
||||
|
||||
|
Reference in New Issue
Block a user