pgstat: Prepare to use mechanism for truncated rels also for droppped rels.
authorAndres Freund <[email protected]>
Sun, 4 Apr 2021 00:39:54 +0000 (17:39 -0700)
committerAndres Freund <[email protected]>
Mon, 20 Sep 2021 21:02:48 +0000 (14:02 -0700)
commit6b9501660c9384476ca9a04918f5cf94379e419e
tree9fb72402e13c05bd0c99ed955b53525166c4c8c1
parente1f958d759ff71a264973d13e9bc86c7db822928
pgstat: Prepare to use mechanism for truncated rels also for droppped rels.

The upcoming shared memory stats patch drops stats for dropped objects in a
transactional manner, rather than removing them later as part of vacuum. This
means that stats for DROP inside a transaction needs to handle aborted
(sub-)transactions similar to TRUNCATE: The stats up to the DROP should be
restored.

Rename the existing infrastructure in preparation.

Author: Andres Freund <[email protected]>
Discussion: https://postgr.es/m/20210405092914[email protected]
src/backend/postmaster/pgstat.c
src/include/pgstat.h