Re: Add pg_file_sync() to adminpack - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: Add pg_file_sync() to adminpack
Date
Msg-id CAOBaU_a42xtefSExpKqoxRwbGav6J7_nr-sR+gE5Phr=L6CFvA@mail.gmail.com
Whole thread Raw
In response to Re: Add pg_file_sync() to adminpack  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Add pg_file_sync() to adminpack  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Mon, Jan 13, 2020 at 2:46 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Sat, Jan 11, 2020 at 02:12:15AM +0900, Fujii Masao wrote:
> > I'm not sure if returning false with WARNING only in some error cases
> > is really good idea or not. At least for me, it's more intuitive to
> > return true on success and emit an ERROR otherwise. I'd like to hear
> > more opinions about this. Also if returning true on success is rather
> > confusing, we can change its return type to void.
>
> An advantage of not issuing an ERROR if that when working on a list of
> files (for example a WITH RECURSIVE on the whole data directory?), you
> can then know which files could not be synced instead of seeing one
> ERROR about one file, while being unsure about the state of the
> others.

Actually, can't it create a security hazard, for instance if you call
pg_file_sync() on a heap file and the calls errors out, since it's
bypassing data_sync_retry?



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add FOREIGN to ALTER TABLE in pg_dump
Next
From: Thomas Kellerer
Date:
Subject: Re: [PATCH] distinct aggregates within a window function WIP