| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: fd.c: flush data problems on osx |
| Date: | 2016-04-13 21:48:19 |
| Message-ID: | 20160413214819.c3qho6gmrdm6mxre@alap3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2016-04-13 17:44:41 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)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.
Ok, fair enough. (And no, it should currently be never called that way)
Andres
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2016-04-13 22:09:18 | Re: fd.c: flush data problems on osx |
| Previous Message | Tom Lane | 2016-04-13 21:44:41 | Re: fd.c: flush data problems on osx |