Re: advance local xmin more aggressively - Mailing list pgsql-hackers

From Tom Lane
Subject Re: advance local xmin more aggressively
Date
Msg-id 24445.1234300287@sss.pgh.pa.us
Whole thread Raw
In response to Re: advance local xmin more aggressively  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: advance local xmin more aggressively
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> For example, maybe we could keep track of counts of snapshots removed
> since the last xmin calculation, and only run this routine if the number
> is different from zero (or some small positive integer).

I think most of the callers of SnapshotResetXmin already know they
removed something.

It might be interesting for FreeSnapshot or something nearby to note
whether the snapshot being killed has xmin = proc's xmin, and only do
the update calculation if so.

I still dislike the assumption that all resource owners are children of
a known owner.  I suspect in fact that it's demonstrably wrong right
now, let alone in future (cf comments in PortalRun).  If we're going to
do this then snapmgr.c needs to track the snapshots for itself.  Of
course that's going to make the "is it worth it" question even more
pressing.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: advance local xmin more aggressively
Next
From: "David Rowley"
Date:
Subject: Bug #4284