Skip site navigation (1) Skip section navigation (2)

Re: Vacuum dead tuples that are "between" transactions

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Paul Tillotson <spam1011(at)adelphia(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Vacuum dead tuples that are "between" transactions
Date: 2006-02-28 16:28:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, Feb 28, 2006 at 01:32:19AM -0500, Tom Lane wrote:
> To do that requires not just that you have access to a backend's oldest
> snapshot, but that you have access to *all* its active snapshots;
> because such a transient tuple might be visible in some newer snap even
> though it's too new for the oldest snap.  Doing that will create very
> significant problems of shared memory management, as well as performance
> and locking issues.
> There's been some talk of distinguishing "global" and "within database"
> xmin values, so that a long-lived transaction wouldn't interfere with
> vacuuming tables in other databases that that xact couldn't possibly
> access.  That seems doable to me, but I think any finer-grained analysis
> is probably going to be a net loss because of the distributed overhead
> it'd impose on every transaction.

True, but we don't need this for every transaction, only long-running
ones. And in most cases, it'd probably be safe to define 'long-running'
in terms of minutes. Presumably, a mechanism similar to
statement_timeout could be used to 'publish' the required state
information after a given period of time.
Jim C. Nasby, Sr. Engineering Consultant      jnasby(at)pervasive(dot)com
Pervasive Software    work: 512-231-6117
vcard:       cell: 512-569-9461

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-02-28 16:37:53
Subject: Re: new feature: LDAP database name resolution
Previous:From: Jim C. NasbyDate: 2006-02-28 16:22:00
Subject: Re: Vacuum dead tuples that are "between" transactions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group