Re: visibility map corruption - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: visibility map corruption
Date
Msg-id 20210708135147.GA11707@momjian.us
Whole thread Raw
In response to Re: visibility map corruption  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: visibility map corruption  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Thu, Jul  8, 2021 at 08:11:14AM -0500, Justin Pryzby wrote:
> Also, the pg_upgrade status message still seems to be misplaced:
> 
> In 20210706190612.GM22043@telsasoft.com, Justin Pryzby wrote:
> > I re-arranged the pg_upgrade output of that patch: it was in the middle of the
> > two halves: "Setting next transaction ID and epoch for new cluster"
> 
> +++ b/src/bin/pg_upgrade/pg_upgrade.c
> @@ -473,6 +473,12 @@ copy_xact_xlog_xid(void)
>                           "\"%s/pg_resetwal\" -f -x %u \"%s\"",
>                           new_cluster.bindir, old_cluster.controldata.chkpnt_nxtxid,
>                           new_cluster.pgdata);
> +       check_ok();
> +       prep_status("Setting oldest XID for new cluster");
> +       exec_prog(UTILITY_LOG_FILE, NULL, true, true,
> +                         "\"%s/pg_resetwal\" -f -u %u \"%s\"",
> +                         new_cluster.bindir, old_cluster.controldata.chkpnt_oldstxid,
> +                         new_cluster.pgdata);
>         exec_prog(UTILITY_LOG_FILE, NULL, true, true,
>                           "\"%s/pg_resetwal\" -f -e %u \"%s\"",
>                           new_cluster.bindir, old_cluster.controldata.chkpnt_nxtepoch,

Wow, you are 100% correct.  Updated patch attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.


Attachment

pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum
Next
From: Alvaro Herrera
Date:
Subject: Re: Pipeline mode and PQpipelineSync()