From: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Bosco Rama <postgres(at)boscorama(dot)com> |
Subject: | pg_restore logging inconsistency |
Date: | 2012-05-30 18:55:12 |
Message-ID: | CAK3UJRGeNKmi1fJNivm-vQCJ4WJwBa1PnoEqkAdU0oOAaNr+Qw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
Bosco Rama recently complained[1] about not seeing a message printed
by pg_restore for each LO to be restored. The culprit seems to be the
different level passed to ahlog() for this status message:
pg_backup_archiver.c: ahlog(AH, 2, "restoring large object with OID %u\n", oid);
pg_backup_tar.c: ahlog(AH, 1, "restoring large object OID %u\n", oid);
depending on whether one is restoring a tar-format or custom-format
dump. I think these messages should be logged at the same level, to
avoid this inconsistency. The attached patch logs them both with
level=1, and makes the message texts identical. Note, as of 9.0 there
is already a line like this printed for each LO:
pg_restore: executing BLOB 135004
so I could see the argument for instead wanting to hide the "restoring
large object" messages. However, the OP was interested in seeing
something like a status indicator for the lo_write() calls which may
take a long time, and the above message isn't really helpful for that
purpose as it is printed earlier in the restore process. Plus it seems
reasonable to make verbose mode, well, verbose.
Josh
[1] http://archives.postgresql.org/pgsql-general/2012-05/msg00456.php
Attachment | Content-Type | Size |
---|---|---|
pg_restore_lo_message.diff | application/octet-stream | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2012-05-30 19:21:14 | GiST subsplit question |
Previous Message | Robert Haas | 2012-05-30 18:52:46 | Re: FailedAssertion("!(PrivateRefCount[i] == 0)", File: "bufmgr.c", Line: 1741 |