Hi Alvaro,

> Add CONCURRENTLY option to REPACK
>
> [...]

I noticed that restore_tuple() checks for an insufficient number of
attributes stored separately, but doesn't check for an unlikely event
when there are too many attributes. I don't think this is intentional.
Any chance we want to fix this?

-- 
Best regards,
Aleksander Alekseev
From 7c0151e1bc272b67306801b287d1546309f4f422 Mon Sep 17 00:00:00 2001
From: Aleksander Alekseev <[email protected]>
Date: Tue, 7 Apr 2026 18:13:30 +0300
Subject: [PATCH v1] Use stricter checks in restore_tuple()

---
 src/backend/commands/repack.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 20dad22c4b7..6919c6c8536 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -2741,6 +2741,11 @@ restore_tuple(BufFile *file, Relation relation, TupleTableSlot *slot)
 						errcode(ERRCODE_DATA_CORRUPTED),
 						errmsg("insufficient number of attributes stored separately"));
 		}
+
+		if (natt_ext != 0)
+			ereport(ERROR,
+					errcode(ERRCODE_DATA_CORRUPTED),
+					errmsg("unexpected number of attributes stored separately"));
 	}
 }
 
-- 
2.43.0

Reply via email to