Re: [HACKERS] Race condition in pg_database_size()

2007-03-10 Thread Alvaro Herrera
Michael Fuhr wrote: > On Sat, Mar 10, 2007 at 05:39:37PM -0500, Tom Lane wrote: > > Michael Fuhr <[EMAIL PROTECTED]> writes: > > > I'll submit a patch -- any preferences for silent continuation vs. > > > continuation with a notice or warning? > > > > I think silent is fine for ENOENT cases. We kn

Re: [HACKERS] Race condition in pg_database_size()

2007-03-10 Thread Michael Fuhr
On Sat, Mar 10, 2007 at 05:39:37PM -0500, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > I'll submit a patch -- any preferences for silent continuation vs. > > continuation with a notice or warning? > > I think silent is fine for ENOENT cases. We know the file had been > there at

Re: [HACKERS] Race condition in pg_database_size()

2007-03-10 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > I'll submit a patch -- any preferences for silent continuation vs. > continuation with a notice or warning? I think silent is fine for ENOENT cases. We know the file had been there at ReadDir time, so the only possible conclusion is that it was just unli

Re: [HACKERS] Race condition in pg_database_size()

2007-03-10 Thread Michael Fuhr
On Sat, Mar 10, 2007 at 12:32:04PM -0500, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > I'm wondering if the code should check for ENOENT if stat() fails > > and either skip this entry silently under the assumption that the > > file had been deleted since the call to ReadDir(), >

Re: [HACKERS] Race condition in pg_database_size()

2007-03-10 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > I'm wondering if the code should check for ENOENT if stat() fails > and either skip this entry silently under the assumption that the > file had been deleted since the call to ReadDir(), Probably. Want to look through the rest of that module for similar