Re: Use procsignal_sigusr1_handler and RecoveryConflictInterrupt() from walsender?

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Use procsignal_sigusr1_handler and RecoveryConflictInterrupt() from walsender?
Дата
Msg-id CAMsr+YHTd8U+sipRDfxhpOrB77soojzNhBFD0ySp2i4os+RyBA@mail.gmail.com
обсуждение исходный текст
Ответ на Use procsignal_sigusr1_handler and RecoveryConflictInterrupt() from walsender?  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: Re: Use procsignal_sigusr1_handler and RecoveryConflictInterrupt() from walsender?
Список pgsql-hackers
On 18 November 2016 at 10:57, Craig Ringer <craig@2ndquadrant.com> wrote:
> Hi all
>
> While adding support for logical decoding on standby I noticed that
> the walsender doesn't respect
> SIGUSR1 with PROCSIG_RECOVERY_CONFLICT_DATABASE set.

I have an update on this after further study.

Surprisingly I haven't found a way to crash the walsender with it, but
as expected it is also not really correct as-is.

It's fine for terminating walsender sessions on database drop, or for
holding a lock on an object too long. Termination due to conflict with
vacuum is more problematic because:

* it'll try to terminate a logical decoding walsender even if there's
no real conflict, since only normal relation blocks were affected, not
user catalogs or system catalogs; and

* most of the time its attempts to terminate won't do anything because
there's no xact running on the walsender at the time it checks for
termination.

So that's definitely going to need more work.

I'm still interested in hearing comments from experienced folks about
whether it's sane to do this at all, rather than have similar
duplicate signal handling for the walsender.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Logical decoding on standby
Следующее
От: Kouhei Kaigai
Дата:
Сообщение: Re: PassDownLimitBound for ForeignScan/CustomScan [take-2]