Re: background sessions

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Borodin <amborodin(at)acm(dot)org>, amul sul <sulamul(at)gmail(dot)com>
Subject: Re: background sessions
Date: 2017-03-09 13:52:27
Message-ID: 7e3d0f47-ebe6-7e06-04df-f4cc3ec1d8e2@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/8/17 14:22, Pavel Stehule wrote:
> 1. will be background session process closed automatically when parent
> process is closed?

If the communications queue goes away the process will eventually die.
This is similar to how a backend process will eventually die if the
client goes away. Some more testing would be good here.

> 2. what timeouts are valid for this process - statement timeout, idle in
> transaction timeout

Those should work the same way. It's the same code that runs the
queries, starts/stops transactions, etc.

> I see significant risk on leaking sessions.

Yeah, that's a valid concern. But I think it works ok.

> There can be more doc and examples in plpython doc. It will be main
> interface for this feature. Mainly about session processing.

OK, I'll look into that again.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2017-03-09 13:52:57 Re: [PATCH] kNN for SP-GiST
Previous Message Peter Eisentraut 2017-03-09 13:43:15 Re: Enabling replication connections by default in pg_hba.conf