Re: fd.c: flush data problems on osx - Mailing list pgsql-hackers

From Tom Lane
Subject Re: fd.c: flush data problems on osx
Date
Msg-id 27703.1460583881@sss.pgh.pa.us
Whole thread Raw
In response to Re: fd.c: flush data problems on osx  (Andres Freund <andres@anarazel.de>)
Responses Re: fd.c: flush data problems on osx  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> I'm not entirely sure what

> +   /*
> +    * Caution: do not call pg_flush_data with amount = 0, it could trash the
> +    * file's seek position.
> +    */
> +   if (amount <= 0)
> +       return;
> +

> is about?

fd.c tracks seek position for open files.  I'm not sure that that
function can get called with amount == 0, but if it did, the caller
would certainly not be expecting the file position to change.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: fd.c: flush data problems on osx
Next
From: Andres Freund
Date:
Subject: Re: fd.c: flush data problems on osx