pgsql: Add tests for logging of temporary file removal and statement

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Add tests for logging of temporary file removal and statement
Дата
Msg-id E1v9BTO-001tYg-1U@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Add tests for logging of temporary file removal and statement

Temporary file usage is sometimes attributed to the wrong query in the logs
output.  One identified reason is that unnamed portal cleanup (and
consequently temp file logging) happens during the next BIND message as
a, after debug_query_string has already been updated to the new query.

Dropping an unnamed portal in the next BIND message is a rather old
protocol behavior (fe19e56c572f, also mentioned in the docs).
log_temp_files is a bit newer than that, as of be8a4318815.

This commit adds tests to track which query is displayed next to the
temporary file(s) removed when a portal is dropped, and in some cases if
a query is displayed or not.  We have not concluded how to improve the
situation yet; these tests will at least help in checking what changes
in the logs depending on the proposal discussed and how it affects the
scenarios tracked by this new test.

Author: Sami Imseih <samimseih@gmail.com>
Author: Frédéric Yhuel <frederic.yhuel@dalibo.com>
Reviewed-by: Mircea Cadariu <cadariu.mircea@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/3d07ee43-8855-42db-97e0-bad5db82d972@dalibo.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/76bba033128acd8bde70f532383f80b26cc9baae

Modified Files
--------------
src/test/modules/test_misc/meson.build             |   1 +
src/test/modules/test_misc/t/009_log_temp_files.pl | 141 +++++++++++++++++++++
2 files changed, 142 insertions(+)


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