diff options
Diffstat (limited to 'src/backend/utils/time/snapmgr.c')
-rw-r--r-- | src/backend/utils/time/snapmgr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 331c91044f2..2a3d915e1f9 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -1401,3 +1401,17 @@ HistoricSnapshotGetTupleCids(void) Assert(HistoricSnapshotActive()); return tuplecid_data; } + +void +PrintSnapMgrStatus(const char *context) +{ + int asdepth = 0; + ActiveSnapshotElt *active; + + for (active = ActiveSnapshot; active != NULL; active = active->as_next) + asdepth++; + + elog(LOG, "%s: %d reg snaps, %d active snaps, cat snap %p, xmin %u", + context, RegisteredSnapshots, asdepth, + CatalogSnapshot, MyPgXact->xmin); +} |