Re: BUG #18322: pg_dump fails with "incorrect version found" (with no good reason)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #18322: pg_dump fails with "incorrect version found" (with no good reason)
Дата
Msg-id 3021957.1706826869@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #18322: pg_dump fails with "incorrect version found" (with no good reason)  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> The scenario:

> - Clean Ubuntu 22.04 install, with postgresql from the ubunto repos (apt
> install postgresql)
> - copy over the data directory from a PostgreSQL 12 server
> - Installed PostgresSQL 12 (from the PGDG repo as Ubuntu only provide one
> version)
> - attempt to upgrade the database from 12 to 14 using pg_upgrade.

> pg_upgrade fails with:

> check for "/usr/lib/postgresql/14/bin/pg_dump" failed: incorrect version:
> found "pg_dump (PostgreSQL) 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1)", expected
> "pg_dump (PostgreSQL) 14.10 (Ubuntu 14.10-1.pgdg22.04+1)"

> It would appear that 14.10 is not 14.10 and that pg_dump is including the
> build annotation in its comparison and call 14.10 (Ubuntu
> 14.10-0ubuntu0.22.04.1) not equal to 14.10 (Ubuntu 14.10-1.pgdg22.04+1).

Yeah, it's just comparing the whole output line.

> It is hard to imagine that level of precision having any utility.

I dunno.  The intent is to be sure that pg_dump and pg_upgrade are
from the same build.  If they are not, it's hard to be sure what
might go wrong.  I don't believe your implied position that "any
build that calls itself 14.10 ought to work", because there are
various build options that could conceivably have an effect.
We don't test combinations of build options for this and are not
likely to start doing so.

I think it would've worked if you'd copied both pg_dump and
pg_upgrade, but you seemingly grabbed only one of them from the
PGDG repo.

            regards, tom lane



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

Предыдущее
От: "Callahan, Drew"
Дата:
Сообщение: Potential data loss due to race condition during logical replication slot creation
Следующее
От: Noah Misch
Дата:
Сообщение: Re: STRATEGY=WAL_LOG missing checkpoint interlocks and sync