Andres Freund writes:
> On 2020-04-01 19:57:32 -0400, Tom Lane wrote:
>> Agreed, but just knowing what the oldest xmin is doesn't help you
>> find *where* it is. Maybe what we need is a view showing all of
>> these potential sources of an old xmin.
> +1. This would be extermely useful. It's a v
Hi,
On 2020-04-01 19:57:32 -0400, Tom Lane wrote:
> Alvaro Herrera writes:
> > On 2020-Apr-01, Tom Lane wrote:
> >> The fact that I had to use max(age(...)) in that sample query
> >> hints at one reason: it's really hard to do arithmetic correctly
> >> on raw XIDs. Dealing with wraparound is a p
On Thu, Apr 2, 2020 at 12:13 AM Craig Ringer wrote:
>
>
>
>
> On Thu, 2 Apr 2020 at 07:57, Tom Lane wrote:
>>
>> Alvaro Herrera writes:
>> > On 2020-Apr-01, Tom Lane wrote:
>> >> The fact that I had to use max(age(...)) in that sample query
>> >> hints at one reason: it's really hard to do arith
On Thu, 2 Apr 2020 at 07:57, Tom Lane wrote:
> Alvaro Herrera writes:
> > On 2020-Apr-01, Tom Lane wrote:
> >> The fact that I had to use max(age(...)) in that sample query
> >> hints at one reason: it's really hard to do arithmetic correctly
> >> on raw XIDs. Dealing with wraparound is a probl
Alvaro Herrera writes:
> On 2020-Apr-01, Tom Lane wrote:
>> The fact that I had to use max(age(...)) in that sample query
>> hints at one reason: it's really hard to do arithmetic correctly
>> on raw XIDs. Dealing with wraparound is a problem, and knowing
>> what's past or future is even harder.
On Wed, Apr 1, 2020 at 5:58 PM Alvaro Herrera wrote:
>
> On 2020-Apr-01, Tom Lane wrote:
>
> > James Coleman writes:
> > > To my knowledge the current oldest xmin (GetOldestXmin() if I'm not
> > > mistaken) isn't exposed directly in any view or function by Postgres.
> >
> > You could do something
On 2020-Apr-01, Tom Lane wrote:
> James Coleman writes:
> > To my knowledge the current oldest xmin (GetOldestXmin() if I'm not
> > mistaken) isn't exposed directly in any view or function by Postgres.
>
> You could do something like
>
> select max(age(backend_xmin)) from pg_stat_activity;
>
>
James Coleman writes:
> To my knowledge the current oldest xmin (GetOldestXmin() if I'm not
> mistaken) isn't exposed directly in any view or function by Postgres.
You could do something like
select max(age(backend_xmin)) from pg_stat_activity;
though I'm not sure whether that accounts for abso