git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 7d00a6b) | patch
In pg_restore's dump_lo_buf(), work a little harder on error handling.
2020年10月18日 16:26:02 +0000 (12:26 -0400)
2020年10月18日 16:26:02 +0000 (12:26 -0400)
commit 929c69aa1970b3ae30bbb5a159b9dc530ec34d5c
In pg_restore's dump_lo_buf(), work a little harder on error handling.

Failure to write data to a large object during restore led to an ugly
and uninformative error message. To add insult to injury, it then
fatal'd out, where other SQL-level errors usually result in pressing on.

Report the underlying error condition, rather than just giving not-very-
useful byte counts, and use warn_or_exit_horribly() so as to adhere to
pg_restore's general policy about whether to continue or not.

Also recognize that lo_write() returns int not size_t.

Per report from Justin Pryzby, though I didn't use his patch.
Given the lack of comparable complaints, I'm not sure this is
worth back-patching.

Discussion: https://postgr.es/m/20201018010232.GF9241@telsasoft.com
src/bin/pg_dump/pg_backup_archiver.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /