Re: pg_background contrib module proposal

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Andrey Borodin <amborodin(at)acm(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, amul sul <sulamul(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_background contrib module proposal
Date: 2016-12-13 01:23:16
Message-ID: CAMsr+YFrmWPpVOD8wyBvfKK9haDXFbfKd_SEzXXT_MovP=0HPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 13 December 2016 at 01:17, Andrew Borodin <borodin(at)octonica(dot)com> wrote:

> 6. Cancelation: a way to signal to background query that it's time to
> quit gracefully.

That at least should be fuss-free. SIGTERM it, and make sure the
worker does CHECK_FOR_INTERRUPTS() in regularly-hit places and loops.
Ensure the worker waits on latches rather than pg_usleep()ing.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-12-13 01:26:24 Re: jsonb problematic operators
Previous Message Petr Jelinek 2016-12-13 01:21:27 Re: pgsql: Add support for temporary replication slots