| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
| Cc: | pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pgsql: Use TRUNCATE to preserve relfilenode for pg_largeobject + index. |
| Date: | 2022-07-29 12:23:36 |
| Message-ID: | CA+TgmoasMX_9esbBTzi7Cio0Ghc7C6eNs12DwAmDEzzxSQymPA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
On Fri, Jul 29, 2022 at 7:00 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> @ -3167,15 +3168,36 @@ dumpDatabase(Archive *fout)
>
> ....
> appendPQExpBuffer(loOutQry, "UPDATE pg_catalog.pg_class\n"
> - "SET relfrozenxid = '%u', relminmxid = '%u', relfilenode = '%u'\n"
> + "SET relfrozenxid = '%u', relminmxid = '%u'\n"
> "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)));
> + atooid(PQgetvalue(lo_res, i, i_relfilenode)));
>
> Is this correct? I mean why are we updating only those tuples where
> oid= i_relfilenode? I think it should use
> atooid(PQgetvalue(lo_res, i, i_oid) in where clause not
> atooid(PQgetvalue(lo_res, i, i_relfilenode)? Or am I missing
> something?
No, that's definitely not correct. Thanks for catching it.
--
Robert Haas
EDB: http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2022-07-29 15:27:33 | pgsql: Fix mistake in bbe08b8869bd29d587f24ef18eb45c7d4d14afca. |
| Previous Message | Dilip Kumar | 2022-07-29 11:00:22 | Re: pgsql: Use TRUNCATE to preserve relfilenode for pg_largeobject + index. |