Re: background sessions

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(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-08 19:22:55
Message-ID: CAFj8pRBBC1r1jHhfz2kApW-m+aa4SgKqXUjhiFNDj4H5D_71TQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

2017-03-01 3:35 GMT+01:00 Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com
>:

> > For additional entertainment, I include patches that integrate
> > background sessions into dblink. So dblink can open a connection to a
> > background session, and then you can use the existing dblink functions
> > to send queries, read results, etc. People use dblink to make
> > self-connections to get autonomous subsessions, so this would directly
> > address that use case. The 0001 patch is some prerequisite refactoring
> > to remove an ugly macro mess, which is useful independent of this. 0002
> > is the actual patch.
>
> Updated patch, mainly with improved error handling and some tidying up.
>

I am checking this patch. I have few questions ( I didn't find a reply in
doc)

1. will be background session process closed automatically when parent
process is closed?

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

I see significant risk on leaking sessions.

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

Regards

Pavel

p.s. It is great functionality and patch looks very well.

> Related to this is also the patch in
> <https://www.postgresql.org/message-id/d100f62a-0606-accc-
> 693b-cdc6d16b9296(at)2ndquadrant(dot)com>
> as a resource control mechanism.
>
> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-03-08 19:30:38 Re: Patch: Write Amplification Reduction Method (WARM)
Previous Message Robert Haas 2017-03-08 18:55:44 Re: Write Ahead Logging for Hash Indexes