postgres.git / summary / log / commit / refs
commit 665ca54c551c27ec77f133cd72fbc0f7be7aa845
Author: Robert Haas <rhaas@postgresql.org>
Date: Fri Jul 29 15:20:07 2022 +0000
First released in: 16.0, 15.0
Fix mistake in bbe08b8869bd29d587f24ef18eb45c7d4d14afca.
The earlier commit used pg_class.relfilenode where it should have
used pg_class.oid. This could lead to emitting an UPDATE statement
into the dump that would update nothing (or the wrong thing) when
executed in the new cluster, resulting in relfrozenxid and
relminmxid being improperly carried forward for pg_largeobject.
Noticed by Dilip Kumar.
Discussion: http://postgr.es/m/CAFiTN-ty1Gzs6stk2vt9BJiq0m0hzf=aPnh3a-4Z3Tk5GzoENw@mail.gmail.com
src/bin/pg_dump/pg_dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 360da3973e1..e00ee5b288f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -3180,7 +3180,7 @@ dumpDatabase(Archive *fout)
"WHERE oid = %u;\n",
atooid(PQgetvalue(lo_res, i, i_relfrozenxid)),
atooid(PQgetvalue(lo_res, i, i_relminmxid)),
- atooid(PQgetvalue(lo_res, i, i_relfilenode)));
+ atooid(PQgetvalue(lo_res, i, i_oid)));
oid = atooid(PQgetvalue(lo_res, i, i_oid));
relfilenode = atooid(PQgetvalue(lo_res, i, i_relfilenode));
[parent: 798d64488ca9]