Re: pg_restore error message during ENOSPC with largeobj

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org, Peter Eisentraut <peter_e@gmx.net>
Date: 2020-10-18T02:41:43Z
Lists: pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes:
> I overflowed my homedir while testing with pg_reload, and got:
> |pg_restore: error: could not write to large object (result: 18446744073709551615, expected: 30)

Bleah.

> I guess casting to long was the best option c. 2002 (commit 6faf8024f) but I
> gather the modern way is with %z.

Isn't the real problem that lo_write returns int, not size_t?

AFAICT, every other call site stores the result in an int,
it's just this one that's out in left field.

			regards, tom lane



Commits

  1. In pg_restore's dump_lo_buf(), work a little harder on error handling.

  2. Enable large file support.