From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | pg_sleep() doesn't work well with recovery conflict interrupts. |
Date: | 2014-05-28 15:23:31 |
Message-ID: | 20140528152331.GB25431@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Since a64ca63e59c11d8fe6db24eee3d82b61db7c2c83 pg_sleep() uses
WaitLatch() to wait. That's fine in itself. But
procsignal_sigusr1_handler, which is used e.g. when resolving recovery
conflicts, doesn't unconditionally do a SetLatch().
That means that we'll we'll currently not be able to cancel conflicting
backends during recovery for 10min. Now, I don't think that'll happen
too often in practice, but it's still annoying.
As an alternative to doing the PG_TRY/save set_latch_on_sigusr1/set
set_latch_on_sigusr1/PG_CATCH/reset set_latch_on_sigusr1/ dance in
pg_sleep() we could also have RecoveryConflictInterrupt() do an
unconditional SetLatch()?
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2014-05-28 15:35:53 | Re: Re: popen and pclose redefinitions causing many warning in Windows build |
Previous Message | Simon Riggs | 2014-05-28 15:04:13 | Re: Compression of full-page-writes |