Re: pgsql: Log remote NOTICE, WARNING, and similar messages using ereport()
В списке pgsql-committers по дате отправления:
| От | Andrei Lepikhov |
|---|---|
| Тема | Re: pgsql: Log remote NOTICE, WARNING, and similar messages using ereport() |
| Дата | |
| Msg-id | 39ac724e-58c8-4661-9e88-cb4ee97cb00e@gmail.com обсуждение |
| Ответ на | pgsql: Log remote NOTICE, WARNING, and similar messages using ereport() (Fujii Masao <fujii@postgresql.org>) |
| Ответы |
Re: pgsql: Log remote NOTICE, WARNING, and similar messages using ereport()
|
| Список | pgsql-committers |
On 22/7/2025 07:22, Fujii Masao wrote:
> Log remote NOTICE, WARNING, and similar messages using ereport().
>
> Previously, NOTICE, WARNING, and similar messages received from remote
> servers over replication, postgres_fdw, or dblink connections were printed
> directly to stderr on the local server (e.g., the subscriber). As a result,
> these messages lacked log prefixes (e.g., timestamp), making them harder
> to trace and correlate with other log entries.
>
> This commit addresses the issue by introducing a custom notice receiver
> for replication, postgres_fdw, and dblink connections. These messages
> are now logged via ereport(), ensuring they appear in the logs with proper
> formatting and context, which improves clarity and aids in debugging.
Perhaps I'm wrong, but it seems to me that you also need to add the
libintl link to the Makefile of each module that uses the
libpqsrv_notice_receiver routine.
At least, without this patch, I can't build master under MacOS:
Undefined symbols for architecture x86_64:
"_libintl_gettext", referenced from:
_libpqsrv_notice_receiver in dblink.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
--
regards, Andrei Lepikhov
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера