a.diff

text/plain

Filename: a.diff
Type: text/plain
Part: 0
Message: Re: SSI bug?

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/backend/storage/lmgr/predicate.c 18 0
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 722d0f8..3e1a3e2 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -2350,7 +2350,25 @@ PredicateLockTupleRowVersionLink(const Relation relation,
 			newtarget->nextVersionOfRow = NULL;
 		}
 		else
+		{
 			Assert(newtarget->priorVersionOfRow == NULL);
+#if 0
+			Assert(newtarget->nextVersionOfRow == NULL);
+#endif
+			if (newtarget->nextVersionOfRow != NULL) {
+				PREDICATELOCKTARGET *t;
+
+				elog(WARNING, "new %p has next %p\n",
+					newtarget, newtarget->nextVersionOfRow);
+				for (t = newtarget->nextVersionOfRow; t != NULL;
+					t = t->nextVersionOfRow) {
+					if (oldtarget != t) {
+						elog(WARNING, "creating a loop new=%p old=%p\n",
+							newtarget, oldtarget);
+					}
+				}
+			}
+		}
 
 		newtarget->priorVersionOfRow = oldtarget;
 		oldtarget->nextVersionOfRow = newtarget;