Re: Why does the WAL writer sit on completed segments (on Windows)?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christian Ullrich <chris(at)chrullrich(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Why does the WAL writer sit on completed segments (on Windows)?
Date: 2017-04-17 16:06:44
Message-ID: 28442.1492445204@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Christian Ullrich <chris(at)chrullrich(dot)net> writes:
> So, just to be sure, you're saying that when the ".ready" file is
> created, it is guaranteed that no process will write to a location
> within that segment anymore even if it happens to have the file open?
> (That's actually completely obvious, but bear with me, please.)

Right.

> And further, that each such process will close the open file as soon as
> it, intending to write WAL, finds out that the next available location
> is not within the file?

Yes, I believe it will typically hold the file open until that happens.
(If short of file descriptors, it might close it sooner, but that's
probably not common.)

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Magnus Hagander 2017-04-17 16:38:39 Re: Why does the WAL writer sit on completed segments (on Windows)?
Previous Message Christian Ullrich 2017-04-17 15:44:53 Re: Why does the WAL writer sit on completed segments (on Windows)?