Re: RangeTblEntry jumble omissions

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: RangeTblEntry jumble omissions
Дата
Msg-id 202402232200.msal7gqyyexg@alvherre.pgsql
обсуждение исходный текст
Ответ на RangeTblEntry jumble omissions  (Peter Eisentraut <peter@eisentraut.org>)
Ответы Re: RangeTblEntry jumble omissions  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
On 2024-Feb-23, Peter Eisentraut wrote:

> - alias
> 
> Currently, two queries like
> 
> SELECT * FROM t1 AS foo
> SELECT * FROM t1 AS bar
> 
> are counted together by pg_stat_statements -- that might be ok, but they
> both get listed under whichever one is run first, so here if you are looking
> for the "AS bar" query, you won't find it.

Another, similar but not quite: if you do

SET search_path TO foo;
SELECT * FROM t1;
SET search_path TO bar;
SELECT * FROM t1;

and you have both foo.t1 and bar.t1, you'll get two identical-looking
queries in pg_stat_statements with different jumble IDs, with no way to
know which is which.  Not sure if the jumbling of the RTE (which
includes the OID of the table in question) itself is to blame, or
whether we want to store the relevant schemas with the entry somehow, or
what.  Obviously, failing to differentiate them would not be an
improvement.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: cleanup patches for dshash
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Running the fdw test from the terminal crashes into the core-dump