Re: pg_restore error message during ENOSPC with largeobj

2020-10-18 Thread Tom Lane
I wrote: > Isn't the real problem that lo_write returns int, not size_t? After looking at it some more, I decided that we'd just been lazy to begin with: we should be handling this as a regular SQL error condition. Pushed at 929c69aa19. regards, tom lane

Re: pg_restore error message during ENOSPC with largeobj

2020-10-17 Thread Tom Lane
Justin Pryzby 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

pg_restore error message during ENOSPC with largeobj

2020-10-17 Thread Justin Pryzby
I overflowed my homedir while testing with pg_reload, and got: |pg_restore: error: could not write to large object (result: 18446744073709551615, expected: 30) src/bin/pg_dump/pg_backup_archiver.c f (res != AH->lo_buf_used) fatal("could not write to large object (result: %lu,

Re: pg_restore error message

2020-05-09 Thread Michael Paquier
On Fri, May 08, 2020 at 07:45:16PM -0400, Alvaro Herrera wrote: > Yeah, there's a lot of frontend code that uses free() instead of > pg_free(). There are too many of these that worrying about a single one > would not improve things much. I guess we could convert them all, but I > don't see much

Re: pg_restore error message

2020-05-08 Thread Alvaro Herrera
On 2020-May-07, Ranier Vilela wrote: > Can suggest improvements? > > 1. free (398 line) must be pg_free(buf)'; Yeah, there's a lot of frontend code that uses free() instead of pg_free(). There are too many of these that worrying about a single one would not improve things much. I guess we

Re: pg_restore error message

2020-05-08 Thread Alvaro Herrera
On 2020-May-07, Euler Taveira wrote: > While investigating a pg_restore error, I stumbled upon a message that is > not so useful. > > pg_restore: error: could not close data file: No such file or directory > > Which file? File name should be printed too like in the error check for > cfopen_read

Re: pg_restore error message

2020-05-07 Thread Ranier Vilela
Em qui., 7 de mai. de 2020 às 18:54, Euler Taveira < euler.tave...@2ndquadrant.com> escreveu: > Hi, > > While investigating a pg_restore error, I stumbled upon a message that is > not so useful. > > pg_restore: error: could not close data file: No such file or directory > > Which file? File name

pg_restore error message

2020-05-07 Thread Euler Taveira
Hi, While investigating a pg_restore error, I stumbled upon a message that is not so useful. pg_restore: error: could not close data file: No such file or directory Which file? File name should be printed too like in the error check for cfopen_read a few lines above. Regards, -- Euler