On Mon, Jul 3, 2017 at 11:26 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> My understanding is that you can't start on a new file until the old file is
> completely synced, because the book keeping can currently only handle one
> file at a time. So if you signal the wal writer to do the sync, you would
> just end up immediately blocking on it to finish. Getting around that would
> require substantially more changes; we would need to implement a queue of
> full log files not yet synced so that we could move on without waiting.
Yeah. I bet that effort would be reasonably worthwhile. I believe
that the forced end-of-segment syncs are costing us a noticeable
amount of performance. Once or twice I took a very half-hearted run
at doing what you describe here, but gave up pretty quickly; it seems
like a somewhat tricky problem.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company