Re: pg_background (and more parallelism infrastructure patches)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_background (and more parallelism infrastructure patches)
Date: 2014-09-08 21:02:17
Message-ID: CA+Tgmoat=Wrr9hUs9Y3ZauFSUUmbMXMOo+c1AZAx4JYV=B6u8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 8, 2014 at 2:05 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>> Another point about error handling is that to execute the sql in
>> function pg_background_worker_main(), it starts the transaction
>> which I think doesn't get aborted if error occurs
>
> For this I was just referring error handling code of
> StartBackgroundWorker(), however during shutdown of process, it
> will call AbortOutOfAnyTransaction() which will take care of aborting
> transaction.

Yeah.

>> and similarly handling
>> for timeout seems to be missing in error path.
>
> As we are anyway going to exit on error, so not sure, if this will be
> required, however having it for clean exit seems to be better.

Can you be more specific?

I'm generally of the view that there's little point in spending time
cleaning things up that will go away anyway when the process exits.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-09-08 21:20:11 Re: proposal: plpgsql - Assert statement
Previous Message Robert Haas 2014-09-08 21:01:26 Re: pg_background (and more parallelism infrastructure patches)