Re: Allow "snapshot too old" error, to prevent bloat

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow "snapshot too old" error, to prevent bloat
Date: 2015-02-24 13:17:34
Message-ID: 126750886.2716764.1424783854878.JavaMail.yahoo@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:

> Could you please explain in slightly more detail why can't it work> if we use timestamp instead of snapshot->xmin in your patch in

> function TestForOldSnapshot()?

It works fine for the additional visibility checking in scans, but
it doesn't cover the vacuuming -- that needs to use a transaction ID
for its cutoff.
> How exactly will this allow to return "snapshot old" error, do we
> need a check for page (page lsn) as in your current patch?

The change to the part where it actually throws the error is very
small, just checking time instead of xmin.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey Shchukin 2015-02-24 13:42:06 Issue with a hanging apply process on the replica db after vacuum works on primary
Previous Message Dave Page 2015-02-24 12:47:23 Re: contrib/fuzzystrmatch/dmetaphone.c license