Skip to content

Commit eef1a60

Browse files
committed
Add more temporary debug logging, in 9.4 branch only.
Last night's results were inconclusive, but after more staring at the code I've thought of some more data to gather. Discussion: https://postgr.es/m/6744.1523833660@sss.pgh.pa.us
1 parent 608d1f9 commit eef1a60

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/backend/commands/indexcmds.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,8 @@ DefineIndex(Oid relationId,
773773

774774
PopActiveSnapshot();
775775
PrintSnapMgrStatus("concurrent index build, after PopActiveSnapshot");
776+
elog(LOG, "concurrent index build: releasing snap %p with regd_count %d, active_count %d",
777+
snapshot, snapshot->regd_count, snapshot->active_count);
776778
UnregisterSnapshot(snapshot);
777779
PrintSnapMgrStatus("concurrent index build, after UnregisterSnapshot");
778780
InvalidateCatalogSnapshot();

src/backend/utils/time/snapmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ PrintSnapMgrStatus(const char *context)
14111411
for (active = ActiveSnapshot; active != NULL; active = active->as_next)
14121412
asdepth++;
14131413

1414-
elog(LOG, "%s: %d reg snaps, %d active snaps, cat snap %p, xmin %u",
1414+
elog(LOG, "%s: %d reg snaps, %d active snaps, first snap %p, cat snap %p, xmin %u",
14151415
context, RegisteredSnapshots, asdepth,
1416-
CatalogSnapshot, MyPgXact->xmin);
1416+
FirstXactSnapshot, CatalogSnapshot, MyPgXact->xmin);
14171417
}

0 commit comments

Comments
 (0)