Re: pg_upgrade failing with error pg_resetxlog no such file

From: Debraj Manna <subharaj(dot)manna(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_upgrade failing with error pg_resetxlog no such file
Date: 2018-08-15 03:40:51
Message-ID: CAF6DVKOzq9j60SQUcfZZA7nS9kXZifS=65Fe3G_mu4jw5-TYtQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

My bluff please ignore. I set wrong pg directory in PATH.

On Wed 15 Aug, 2018, 1:54 AM Bruce Momjian, <bruce(at)momjian(dot)us> wrote:

> 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(at)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(at)momjian(dot)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 +
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message dangal 2018-08-15 03:44:19 Re: How to revoke privileged from PostgreSQL's superuser
Previous Message Evan Bauer 2018-08-15 02:45:41 Re: How to revoke privileged from PostgreSQL's superuser