]> granicus.if.org Git - postgresql/commit
Avoid setup work for invalidation messages at start-of-(sub)xact.
authorRobert Haas <rhaas@postgresql.org>
Wed, 29 Oct 2014 16:35:19 +0000 (12:35 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 29 Oct 2014 16:35:19 +0000 (12:35 -0400)
commit6cb4afff33ba0b6f88cca2967904ad501d648e2f
treed5e34a8844cb3c6df5f8d97ed803ced5f851634b
parent8f8314b56003877185fb817c847c7c9609621d0c
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.
src/backend/access/transam/xact.c
src/backend/utils/cache/inval.c
src/include/utils/inval.h