Re: cleanup temporary files after crash

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: cleanup temporary files after crash
Дата
Msg-id 4030089.1616124234@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: cleanup temporary files after crash  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: cleanup temporary files after crash  ("Euler Taveira" <euler@eulerto.com>)
Список pgsql-hackers
[ reads code... ]
... no, I think the problem is the test is still full of race conditions.

In the first place, waiting till you see the output of a SELECT that's
before the useful query is not enough to guarantee that the useful query
is done, or even started.  That's broken on both sessions.

In the second place, even if the second INSERT has started, you don't know
that it's reached the point of blocking on the tuple conflict yet.
Which in turn means that it might not've filled its tuplestore yet.

In short, this script is designed to ensure that the test query can't
finish too soon, but that proves nothing about whether the test query
has even started.  And since you also haven't really guaranteed that the
intended-to-be-blocking query is done, I don't think that the first
condition really holds either.

            regards, tom lane



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Logical Replication vs. 2PC