Hi, I found another couple of fields that are assigned but never read. Looks like leftovers of 0ed707e9b7e and d8c05aff56b both from 2016. Here is the patch.
-- Best regards, Aleksander Alekseev
From 1c598302cfcce9a9cebed6325b5c9341063b6e75 Mon Sep 17 00:00:00 2001 From: Aleksander Alekseev <[email protected]> Date: Tue, 1 Sep 2026 17:22:17 +0300 Subject: [PATCH v1] pg_dump: remove write-only TableInfo.numTriggers and .triggers Both fields are assigned in getTriggers() but never read. Remove them. Author: Aleksander Alekseev <[email protected]> Reviewed-by: TODO FIXME Discussion: TODO FIXME --- src/bin/pg_dump/pg_dump.c | 4 ---- src/bin/pg_dump/pg_dump.h | 2 -- 2 files changed, 6 deletions(-) diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index db14834e430..8c36c630d77 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -8796,10 +8796,6 @@ getTriggers(Archive *fout, TableInfo tblinfo[], int numTables) if (curtblindx >= numTables) pg_fatal("unrecognized table OID %u", tgrelid); - /* Save data for this table */ - tbinfo->triggers = tginfo + j; - tbinfo->numTriggers = numtrigs; - for (int c = 0; c < numtrigs; c++, j++) { tginfo[j].dobj.objType = DO_TRIGGER; diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h index e6eefa98460..2bbb5d5773b 100644 --- a/src/bin/pg_dump/pg_dump.h +++ b/src/bin/pg_dump/pg_dump.h @@ -388,8 +388,6 @@ typedef struct _tableInfo int numIndexes; /* number of indexes */ struct _indxInfo *indexes; /* indexes */ struct _tableDataInfo *dataObj; /* TableDataInfo, if dumping its data */ - int numTriggers; /* number of triggers for table */ - struct _triggerInfo *triggers; /* array of TriggerInfo structs */ } TableInfo; typedef struct _tableAttachInfo -- 2.43.0
