pgsql: pgstat: Prepare to use mechanism for truncated rels also for dro

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pgstat: Prepare to use mechanism for truncated rels also for dro
Date: 2021-09-20 21:22:25
Message-ID: E1mSQk5-0006uQ-Cb@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 <andres(at)anarazel(dot)de>
Discussion: https://postgr.es/m/20210405092914.mmxqe7j56lsjfsej@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6b9501660c9384476ca9a04918f5cf94379e419e

Modified Files
--------------
src/backend/postmaster/pgstat.c | 93 ++++++++++++++++++++++-------------------
src/include/pgstat.h | 12 +++---
2 files changed, 57 insertions(+), 48 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2021-09-20 21:29:31 pgsql: Remove overzealous index deletion assertion.
Previous Message Andres Freund 2021-09-20 20:56:51 pgsql: pgstat: Split out relation stats handling from AtEO[Sub]Xact_PgS