pg_upgrade fails if vacuum_defer_cleanup_age > 0

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: pg_upgrade fails if vacuum_defer_cleanup_age > 0
Date: 2020-06-10 14:07:05
Message-ID: 7d6f6c22ba05ce0c526e9e8b7bfa8105e7da45e6.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

A customer's upgrade failed, and it took me a while to
figure out that the problem was that they had set
"vacuum_defer_cleanup_age=10000" on the new cluster.

The consequence was that the "vacuumdb --freeze" that
takes place before copying commit log files failed to
freeze "pg_database".
That caused later updates to the table to fail with
"Could not open file "pg_xact/0000": No such file or directory."

I think it would increase the robustness of pg_upgrade to
force "vacuum_defer_cleanup_age" to 0 on the new cluster.

Suggested patch attached.

Yours,
Laurenz Albe

Attachment Content-Type Size
0001-Force-vacuum_defer_cleanup_age-0-during-pg_upgrade.patch text/x-patch 1.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-06-10 14:13:40 Re: Recording test runtimes with the buildfarm
Previous Message Andrew Dunstan 2020-06-10 13:57:29 Re: Recording test runtimes with the buildfarm