From: Bruce Momjian <bruce@momjian.us>
To: Debraj Manna <subharaj.manna@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: pg_upgrade failing with error pg_resetxlog no such file
Date: Tue, 14 Aug 2018 16:24:03 -0400
Message-ID: <20180814202403.GB3447@momjian.us> (raw)
In-Reply-To: <CAF6DVKPU-G7o_cT_NzhbQh48o+iRhUPOZPkJb0EygFeH-ci10w@mail.gmail.com>
References: <CAF6DVKPU-G7o_cT_NzhbQh48o+iRhUPOZPkJb0EygFeH-ci10w@mail.gmail.com>
On Wed, Aug 15, 2018 at 12:20:27AM +0530, Debraj Manna wrote:
> Hi
>
> I am trying to upgrade to postgres 10 from postgresĀ 9.5.4. But on trying to run
> pg_upgrade I am getting the below error
>
> ubuntu@vrni-platform:/tmp$ sudo -H -u postgres /usr/lib/postgresql/10/bin/
> pg_upgrade -b /usr/lib/postgresql/9.5/bin -B /usr/lib/postgresql/10/bin -d /var
> /lib/postgresql/data/postgresql0 -D /var/lib/postgresql/10/data/postgresql0 -o
> ' -c config_file=/etc/postgresql/9.5/main/postgresql.conf' -O ' -c config_file=
> /etc/postgresql/10/main/postgresql.conf' --check -k
>
> check for "/usr/lib/postgresql/10/bin/pg_resetxlog" failed: No such file or
> directory
> Failure, exiting
>
> Can someone let me know what is going wrong and how can I use the pg_upgrade?
Uh, that is an unusual error. What PG 10 version is that, exactly?
10.4? 10.5? We added new code to test for proper server shutdown in PG
10.5, but that used pg_controldata, so I don't think that is the cause.
I think the problem is suggested in this part of the code:
/* pg_resetxlog has been renamed to pg_resetwal in version 10 */
if (GET_MAJOR_VERSION(cluster->bin_version) < 1000)
validate_exec(cluster->bindir, "pg_resetxlog");
else
validate_exec(cluster->bindir, "pg_resetwal");
It should be looking for /usr/lib/postgresql/10/bin/pg_resetwal
---
which I bet does exist. I have no idea why this would be testing for
pg_resetxlog in a path that expect PG 10. Maybe some of the directories
are not the PG versions you think they are.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: bruce@momjian.us, subharaj.manna@gmail.com
Subject: Re: pg_upgrade failing with error pg_resetxlog no such file
In-Reply-To: <20180814202403.GB3447@momjian.us>
References: <CAF6DVKPU-G7o_cT_NzhbQh48o+iRhUPOZPkJb0EygFeH-ci10w@mail.gmail.com> <20180814202403.GB3447@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox