Re: Vacuum dead tuples that are "between" transactions - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Vacuum dead tuples that are "between" transactions
Date
Msg-id 20060228162859.GR82012@pervasive.com
Whole thread Raw
In response to Re: Vacuum dead tuples that are "between" transactions  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


pgsql-hackers by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: character encoding in StartupMessage
Next
From: Tom Lane
Date:
Subject: Re: new feature: LDAP database name resolution