Re: Using condition variables to wait for checkpoints

2019-04-05 Thread Thomas Munro
On Thu, Mar 14, 2019 at 11:05 AM Thomas Munro wrote: > I renamed the CVs because the names I had used before broke the > convention that variables named ckpt_* are protected by ckpt_lck, and > pushed. Erm... this made successful checkpoints slightly faster but failed checkpoints infinitely slower

Re: Using condition variables to wait for checkpoints

2019-03-13 Thread Thomas Munro
On Thu, Mar 14, 2019 at 1:15 AM Robert Haas wrote: > On Tue, Mar 12, 2019 at 7:12 PM Andres Freund wrote: > > Having useful infrastructure is sure cool. > > Yay! +1 I renamed the CVs because the names I had used before broke the convention that variables named ckpt_* are protected by ckpt_lck,

Re: Using condition variables to wait for checkpoints

2019-03-13 Thread Robert Haas
On Tue, Mar 12, 2019 at 7:12 PM Andres Freund wrote: > Having useful infrastructure is sure cool. Yay! -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: Using condition variables to wait for checkpoints

2019-03-12 Thread Andres Freund
Hi, On 2019-03-13 11:56:19 +1300, Thomas Munro wrote: > A user complained about CREATE DATABASE taking > 200ms even with fsync > set to off. Andres pointed out that that'd be the clunky poll/sleep > loops in checkpointer.c. > > Here's a draft patch to use condition variables instead. > > Unpatc

Using condition variables to wait for checkpoints

2019-03-12 Thread Thomas Munro
Hello hackers, A user complained about CREATE DATABASE taking > 200ms even with fsync set to off. Andres pointed out that that'd be the clunky poll/sleep loops in checkpointer.c. Here's a draft patch to use condition variables instead. Unpatched: postgres=# checkpoint; CHECKPOINT Time: 101.848