From: | David Steele <david(at)pgmasters(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Joe Conway <mail(at)joeconway(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Request: pg_cancel_backend variant that handles 'idle in transaction' sessions |
Date: | 2015-11-05 20:28:05 |
Message-ID: | 563BBBD5.1060207@pgmasters.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/5/15 10:10 AM, Alvaro Herrera wrote:
> David Steele wrote:
>
>> The important thing about this implementation was that nothing was
>> terminated unless it had exceed a timeout AND was blocking another
>> process.
>
> This seems a nice idea, but you need to take the effect on vacuum of
> idle-in-xact sessions too. If the operator left for the day and their
> session doesn't block any other process, the next day you could find
> some tables bloated to such extreme as to cause problems later on.
> Surely the operator can review their terminal to re-do the work, in case
> it was valuable. (If it was valuable, why didn't they commit the
> transaction?)
These particular databases were not subject to bloat since they were
partitioned and append-only - no inserts or deletes whatsoever except to
tiny dimension tables. In general, though, you are correct.
An absolute transaction timeout would be a good first step but a
blocking timeout would also be very handy. It would be very applicable
to data warehouse scenarios where bloat is controlled by other means and
long transactions are the norm (and idle-in-transactions times can also
be long).
--
-David
david(at)pgmasters(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2015-11-05 20:29:30 | Re: Note about comparation PL/SQL packages and our schema/extensions |
Previous Message | Oleg Bartunov | 2015-11-05 20:05:15 | Re: Note about comparation PL/SQL packages and our schema/extensions |