Re: What is the meaning of pg_restore output? - Mailing list pgsql-general

From Alexandru Lazarev
Subject Re: What is the meaning of pg_restore output?
Date
Msg-id CAL93h0H2kx8Nhp7FwsKkYGR16KcCokLTZrrEqQerh4mFRBo5Wg@mail.gmail.com
Whole thread Raw
In response to Re: What is the meaning of pg_restore output?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: What is the meaning of pg_restore output?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
client_min_messages GUC didn't change

Commands are:
pg_dump --host 127.0.0.1 --port 5432 --username postgres --format custom --blobs --file /tmp/postgresql.backup -Z9 my_db

pg_restore  -h 127.0.0.1 -p 5432 -U postgres -Fc -v -j$(nproc) -d my_db /tmp/postgresql.backup 2>&1 | tee /tmp/restore.txt


Virus-free. www.avast.com

On Thu, Mar 8, 2018 at 5:30 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 03/08/2018 01:49 AM, Alexandru Lazarev wrote:
Hi PG community,
I have questions about pg_restore output.

At some point of time in pg_restore output was such phrase "*/pg_restore: setting owner and privileges for <RELATION_NAME>/*", then it disappeared, it seems, when upgraded from PG 9.6.2 to 9.6.6
Other phrases "pg_restore: processing /*item */3615 DEFAULT id
pg_restore: creating DEFAULT "public.id <http://public.id>"
are observed if pg_restore is executed with flag -j N (where N > 1)
and aren't present when -j 1 (or without -j)

So main questions are:
1. What is the meaning of this phrases?
2. Are they documented somewhere?
3. Is it possible that output change from version to version?

I do not see any change in the release notes:
https://www.postgresql.org/docs/9.6/static/release.html

I would look at what at client_min_messages (enum) in:
https://www.postgresql.org/docs/9.6/static/runtime-config-logging.html

It would also helpful to see the complete pg_dump and pg_restore commands you are working with.


Why I am asking?
I saw a script which does pg_restore and grep some of this phrases as SUCCESS indicator that pg_restore passed OK (+ something like grep -iv "error").
script doesn't use pg_restore exit code because, as I understood from the authors, in the past were situations that pg_restore returned 0 code but didn't restore of db.

Any answers, hints are welcome :).
Thanks

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>     Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


--
Adrian Klaver
adrian.klaver@aklaver.com

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Crash and core on 10.1 and 10.2
Next
From: Blair Boadway
Date:
Subject: Troubleshooting a segfault and instance crash