aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2022-07-29 11:20:07 -0400
committerRobert Haas <rhaas@postgresql.org>2022-07-29 11:20:07 -0400
commit80d690721973f6a031143a24a34b78a0225101a2 (patch)
tree62f1a0996a04a19e682aa0b2659b9aa76768d9c1 /src
parent59be1c942a47f6c8a4c47d242200fbbf4be59b88 (diff)
downloadpostgresql-80d690721973f6a031143a24a34b78a0225101a2.tar.gz
postgresql-80d690721973f6a031143a24a34b78a0225101a2.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 25742a0e2ad..320bf51e4d5 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));
relfilenumber = atooid(PQgetvalue(lo_res, i, i_relfilenode));