Re: XX000: tuple concurrently deleted during DROP STATISTICS

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: XX000: tuple concurrently deleted during DROP STATISTICS
Дата
Msg-id 683594.1699458748@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: XX000: tuple concurrently deleted during DROP STATISTICS  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: XX000: tuple concurrently deleted during DROP STATISTICS  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
Tomas Vondra <tomas.vondra@enterprisedb.com> writes:
> On 11/8/23 16:10, Justin Pryzby wrote:
>> I found this in our logs, and reproduced it under v11-v16.
>> 
>> CREATE TABLE t(a int, b int);
>> INSERT INTO t SELECT generate_series(1,999);
>> CREATE STATISTICS t_stats ON a,b FROM t;
>> 
>> while :; do psql postgres -qtxc "ANALYZE t"; done &
>> while :; do psql postgres -qtxc "begin; DROP STATISTICS t_stats"; done &
>> 
>> It's known that concurrent DDL can hit elog().  But in this case,
>> there's only one DDL operation.

> AFAICS this happens because store_statext (after ANALYZE builds the new
> statistics) does this:

Shouldn't DROP STATISTICS be taking a lock on the associated table
that is strong enough to lock out ANALYZE?

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: XX000: tuple concurrently deleted during DROP STATISTICS
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: meson documentation build open issues