Re: pg_upgrade failing with error pg_resetxlog no such file

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_upgrade failing with error pg_resetxlog no such file
Дата
Msg-id 20180814202403.GB3447@momjian.us
обсуждение исходный текст
Ответ на pg_upgrade failing with error pg_resetxlog no such file  (Debraj Manna <subharaj.manna@gmail.com>)
Ответы Re: pg_upgrade failing with error pg_resetxlog no such file  (Debraj Manna <subharaj.manna@gmail.com>)
Список pgsql-admin
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 +


В списке pgsql-admin по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: How to revoke privileged from PostgreSQL's superuser
Следующее
От: dangal
Дата:
Сообщение: Re: How to revoke privileged from PostgreSQL's superuser