Re: Vacuum threshold and non-serializable read-only transaction - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Vacuum threshold and non-serializable read-only transaction
Date
Msg-id 18203.1201499363@sss.pgh.pa.us
Whole thread Raw
In response to Vacuum threshold and non-serializable read-only transaction  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: Vacuum threshold and non-serializable read-only transaction  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-hackers
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> I think we can remove recently dead tuples even if non-serializable read-only
> transactions are still alive, because those transactions will not see older
> versions of tuples.

Surely this'd require having those transactions display exactly what
their current oldest-xmin is.  We've talked about that before, and it
seems a good idea, but it requires a bit more infrastructure than is
there now --- we'd need some snapshot-management code that could keep
track of all live snapshots within each backend.

> Is it proper behavior? I worry about too conservative estimation
> in incrementing ShmemVariableCache->latestCompletedXid.

Too conservative is much better than too liberal, in this case
(and I'm as bleeding-heart liberal as they come ;-))
        regards, tom lane


pgsql-hackers by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Vacuum threshold and non-serializable read-only transaction
Next
From: Neil Conway
Date:
Subject: RFC: array_agg() per SQL:200n