Re: max freeze age query in docs

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: max freeze age query in docs
Date: 2013-09-02 18:45:29
Message-ID: 5224DCC9.2090903@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 09/02/2013 02:26 PM, Andres Freund wrote:
> On 2013-09-02 14:20:57 -0400, Andrew Dunstan wrote:
>> On 09/02/2013 01:30 PM, Tom Lane wrote:
>>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>>> Yes, possibly, but we can't do that now, but I would like to fix the
>>>> docs now.
>>> If you want this in 9.3.0 it needs to be committed in the next couple of
>>> hours.
>>>
>>> FWIW, the idea seemed generally sane to me, but I'd suggest not depending
>>> on reltoastrelid being zero when and only when there's no match.
>>> Why not test whether t.oid IS NULL, instead?
>>>
>>> Or actually, code it like this
>>>
>>> GREATEST(age(c.relfrozenxid), age(t.relfrozenxid))
>>>
>>> and be done, as well as not having an ugly direct use of int4larger.
>>>
>>>
>>
>> OK, I'll do it that way. Working on it now.
> I'd vote for c.relkind != 't' AND NOT c.relfrozenxid = 0; instead of
> relkind = 'r' for the main relation, that way you'd include materialized
> views and stuff.
>

See what was just committed - the matview case is included for 9.3+ (as
it was in fact in the original - I must have been looking at older docs
when saw it wasn't there.)

I'll be back in an hour or so if any final tweeks are needed.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2013-09-02 19:13:56 Re: Next CFM?
Previous Message Andres Freund 2013-09-02 18:26:57 Re: max freeze age query in docs