pg_restore: warning: could not find where to insert IF EXISTS in statement "-- *not* dropping schema, since initdb creates it

Поиск
Список
Период
Сортировка
От Samo Dadela
Тема pg_restore: warning: could not find where to insert IF EXISTS in statement "-- *not* dropping schema, since initdb creates it
Дата
Msg-id CAFuecfNL96=mKTq71Q6h3297u15+1RnD2D7kmj3+ak++79k1bA@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_restore: warning: could not find where to insert IF EXISTS in statement "-- *not* dropping schema, since initdb creates it  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi,

Can you please take a look at the following?

It's just a warning - the restore succeeded anyway.

pg_restore is emitting the following:

pg_restore: warning: could not find where to insert IF EXISTS in statement "-- *not* dropping schema, since initdb creates it

The restore is done with:
pg_restore --username=user --host=localhost --port=5432 --dbname=db3 --format=d db-3.20230217102426/db3.pg_dump --clean --if-exists

The backup was done with:
pg_dump --username=user --host=db-3.com --port=5432 --dbname=db3 --file=db-3.20230217102426/db3.pg_dump --format=d --clean --if-exists --no-blobs --jobs=4 --verbose

It seems that the string pg_restore complains about is created by db_restore. I suspect pg_restore wrongly parsed the comment as a
statement that should be prefixed with IF EXISTS.

# pg_restore --version
pg_restore (PostgreSQL) 15.1
# pg_dump --version
pg_dump (PostgreSQL) 15.1
# uname -a
Linux aura 6.0.19-4-MANJARO #1 SMP PREEMPT_DYNAMIC Mon Feb 6 11:26:13 UTC 2023 x86_64 GNU/Linux


Best regards,

Samo

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore: warning: could not find where to insert IF EXISTS in statement "-- *not* dropping schema, since initdb creates it