Re: Add pg_file_sync() to adminpack
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>, Fujii Masao <masao.fujii@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-01-09T17:51:06Z
Lists: pgsql-hackers
Julien Rouhaud <rjuju123@gmail.com> writes: > On Thu, Jan 9, 2020 at 6:16 PM Stephen Frost <sfrost@snowman.net> wrote: >> Why would you expect that when it isn't the case for the filesystem >> itself..? > Just a usual habit with durable property. I tend to agree with Stephen on this, mainly because the point of these adminpack functions is to expose filesystem access. If these functions were more "database-y" and less "filesystem-y", I'd agree with trying to impose database-like consistency requirements. We don't have to expose every wart of the filesystem semantics --- for example, it would be reasonable to make pg_file_sync() Do The Right Thing when applied to a directory, even if the particular platform we're on doesn't behave sanely for that. But having fsync separated from write is a pretty fundamental part of most filesystems' semantics, so we ought not try to hide that. regards, tom lane
Commits
-
Add pg_file_sync() to adminpack extension.
- d694e0bb793e 13.0 landed