Re: pg_sleep() doesn't work well with recovery conflict interrupts. - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: pg_sleep() doesn't work well with recovery conflict interrupts.
Date
Msg-id CAA4eK1JZP+RGgG2ZnrYYXQRVKbWfVkfUnrGv5=_3hEsz_k=yAA@mail.gmail.com
Whole thread Raw
In response to pg_sleep() doesn't work well with recovery conflict interrupts.  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: pg_sleep() doesn't work well with recovery conflict interrupts.
List pgsql-hackers
On Wed, May 28, 2014 at 8:53 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> 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.

How will such a situation occur, aren't we using pg_usleep during
RecoveryConflict functions
(ex. in ResolveRecoveryConflictWithVirtualXIDs)?


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: postgres_fdw and connection management
Next
From: Heikki Linnakangas
Date:
Subject: Re: Extended Prefetching using Asynchronous IO - proposal and patch