Run-time posix_fallocate failures
Run-time posix_fallocate failures
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Buildfarm member "rover_firefly" has been failing like this since 269e780 went in: creating template1 database in /export/home/postgres/HEAD/pgsql.47842/src/test/regress/./tmp_check/data/base/1 ... FATAL: could not allocate space for file "pg_xlog/xlogtemp.60072" using posix_fallocate: Invalid argument Apparently OmniOS has a version of posix_fallocate that doesn't actually work, or at least doesn't work on the specific filesystem rover_firefly is using. The Single Unix Spec says that that is the correct error to return if the filesystem doesn't provide support: [EINVAL]The len argument is less than zero, or the offset argument is less than zero, or the underlying file system does not support this operation. I think you'd better rejigger that patch so that it falls through to the old implementation if posix_fallocate() fails. regards, tom lane
Re: Run-time posix_fallocate failures
От:
Jeff Davis <pgsql@j-davis.com>
Дата:
On Sat, 2013-07-06 at 10:33 -0400, Tom Lane wrote: > Apparently OmniOS has a version of posix_fallocate that doesn't actually > work, or at least doesn't work on the specific filesystem rover_firefly > is using. The Single Unix Spec says that that is the correct error to > return if the filesystem doesn't provide support: Thank you. > I think you'd better rejigger that patch so that it falls through to the > old implementation if posix_fallocate() fails. Do you mean "fails at all" or "fails with EINVAL"? Regards,Jeff Davis
Re: Run-time posix_fallocate failures
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Jeff Davis writes: > On Sat, 2013-07-06 at 10:33 -0400, Tom Lane wrote: >> I think you'd better rejigger that patch so that it falls through to the >> old implementation if posix_fallocate() fails. > Do you mean "fails at all" or "fails with EINVAL"? I'd be inclined to ignore the specific error code and just do it the hard way for any failure. Less code, and I see no particular advantage to being pickier than that. regards, tom lane