Differentiate MERGE queries with different structures

Поиск
Список
Период
Сортировка
От bt22nakamorit
Тема Differentiate MERGE queries with different structures
Дата
Msg-id d87e391694db75a038abc3b2597828e8@oss.nttdata.com
обсуждение исходный текст
Ответы Re: Differentiate MERGE queries with different structures  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
Hi,

pg_stat_statements module distinguishes queries with different 
structures, but some visibly different MERGE queries were combined as 
one pg_stat_statements entry.
For example,
MERGE INTO test1 USING test2 ON test1.id = test2.id WHEN MATCHED THEN 
UPDATE var = 1;
MERGE INTO test1 USING test2 ON test1.id = test2.id WHEN MATCHED THEN 
DELETE;
These two queries have different command types after WHEN (UPDATE and 
DELETE), but they were regarded as one entry in pg_stat_statements.
I think that they should be sampled as distinct queries.

I attached a patch file that adds information about MERGE queries on the 
documentation of pg_stat_statements, and lines of code that helps with 
the calculation of queryid hash value to differentiate MERGE queries.
Any kind of feedback is appreciated.

Tatsu
Вложения

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

Предыдущее
От: Xiaoran Wang
Дата:
Сообщение: Add an assert to the length of shared hashtable name
Следующее
От: "wangw.fnst@fujitsu.com"
Дата:
Сообщение: RE: [RFC] building postgres with meson - v13