Re: pg_background contrib module proposal

From: Craig Ringer <craig(dot)ringer(at)2ndquadrant(dot)com>
To: amul sul <sulamul(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andrey Borodin <amborodin(at)acm(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: pg_background contrib module proposal
Date: 2016-12-14 02:44:22
Message-ID: CAMsr+YG_pY6UJ6C=+H70C7Lh47H1qrDg1WML2xd3eCUwPt2pvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 13 Dec. 2016 20:54, "amul sul" <sulamul(at)gmail(dot)com> wrote:

postgres=> select * from pg_background_result(67069) as (x text);
ERROR: terminating connection due to administrator command
CONTEXT: background worker, pid 67069
postgres=>

It'll also want to handle cancellation due to conflict with recovery if you
intend it to be used on a standby, probably by making use
of procsignal_sigusr1_handler. The rest of the work is done by
CHECK_FOR_INTERRUPTS() .

This only matters if it's meant to work on standbys of course. I haven't
checked if you write to catalogs or otherwise do non-standby-friendly
things.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Venkata B Nagothi 2016-12-14 03:14:31 Re: Declarative partitioning - another take
Previous Message Kevin Grittner 2016-12-14 01:44:02 Re: [OSSTEST PATCH 0/1] PostgreSQL db: Retry on constraint violation