Re: [HACKERS] pg_background contrib module proposal - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] pg_background contrib module proposal
Date
Msg-id CAMsr+YG_pY6UJ6C=+H70C7Lh47H1qrDg1WML2xd3eCUwPt2pvg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] pg_background contrib module proposal  (amul sul <sulamul@gmail.com>)
List pgsql-hackers
On 13 Dec. 2016 20:54, "amul sul" <sulamul@gmail.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.

pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: [HACKERS] [OSSTEST PATCH 0/1] PostgreSQL db: Retry on constraint violation
Next
From: Venkata B Nagothi
Date:
Subject: Re: [HACKERS] Declarative partitioning - another take