Re: slow get_actual_variable_range with long running transactions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marc Cousin <cousinmarc(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: slow get_actual_variable_range with long running transactions
Date: 2020-06-16 15:51:22
Message-ID: 1334071.1592322682@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marc Cousin <cousinmarc(at)gmail(dot)com> writes:
> Of course, what happens here is that the histogram says that max(a) is 1000000, and get_actual_variable_range verifies the real upper bound. And has to read quite a few dead index records.

We've revised that logic several times to reduce the scope of the
problem. Since you didn't say which PG version you're using exactly,
it's hard to offer any concrete suggestions. But I fear there's
not a lot you can do about it, other than upgrading if you're on a
pre-v11 release.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc Cousin 2020-06-16 16:28:01 Re: slow get_actual_variable_range with long running transactions
Previous Message Fujii Masao 2020-06-16 15:46:38 Re: Review for GetWALAvailability()