Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ueC91-006GPc-7q for pgsql-committers@arkaria.postgresql.org; Tue, 22 Jul 2025 12:30:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ueC90-007Qzk-BJ for pgsql-committers@arkaria.postgresql.org; Tue, 22 Jul 2025 12:30:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ueC90-007Qza-47 for pgsql-committers@lists.postgresql.org; Tue, 22 Jul 2025 12:30:54 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ueC8w-000E06-2y for pgsql-committers@lists.postgresql.org; Tue, 22 Jul 2025 12:30:54 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4560d176f97so58553275e9.0 for ; Tue, 22 Jul 2025 05:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753187450; x=1753792250; darn=lists.postgresql.org; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=7b7tkw/ZZesBog/QAQaCc9nQDmKxcqfBnzwNXlKtpwg=; b=Xj4zbRB7Z0rb40JxPKjVRHUDuQQ/FAFVU51qSqWue3pTW/poQxQ5WN6if5INiOY9JQ U/JtcB/UbaMTbC7wKEfQja45NiSpz8KojC2WEOkwJM1vq/I18HrbQi8wtaHjIjZ+FNYm Li8otcSy72QobkQdLh0ys89plD2kkhOHvXsAltR977+hwXj514hBG9zkDBN2OOUOiBlr daIph0gCevckFoFo2Md7yCWDo3v0Hkay/SRzlj6ntW0VNGITbUBG/msqYRdtpkSFwyas 5VHFNIRsPvzZ3ii0l4aI8KuR+7X0J1N0DRRK5B1pw5+NeIaKUxe67u1MxWwqzJgP98Ab wbCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753187450; x=1753792250; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=7b7tkw/ZZesBog/QAQaCc9nQDmKxcqfBnzwNXlKtpwg=; b=R8A2Hjms6aNuokvLtqwQ/MC+Ht21PbJAzBOrpS3AUZ+aj8t0wQ52n3mGZ3U85GWf5M J8PyhuJti2nniUCYJ0rx0TICXlgyw0brjtSfwPPmZO8viD0qgCRYbI9602nwXcXS3kxc cb3BZj+xx9cemeyRDai5ykNeWLDS/pLVxypBrOlRDqDKT3Fy2SM1H8+tJYE6Dgj/ppLZ U5SaSrGI+O64hScbqYowCi5pD7ohFoVy9gd5H5LRU63iHpGLohqgxa4nzXlEF+/+A3v0 xasXBsIw9WrumU4mWI9n0AblJj3AH6p7N2PbEpnLDwKtXf8CQUp4+LXHqcfBEhFv348f N6FQ== X-Forwarded-Encrypted: i=1; AJvYcCXvYbnjmaiyR3SwaRL2uN3b3Mj5D0P8XcVnZRhq5vnnD86yp8PLVxBIr8+U305UK4goy+HPIiFe/uwq+jVCJA1K@lists.postgresql.org X-Gm-Message-State: AOJu0YymXEuaxktpYdWuONn48+fDlxJs4ZbMREFQjMk7bbhyGIR9AWkf ERqMeWPoM0xPwEUMh71TBQu4dd4lh0xMqsZ/gfIhjSejbBVia9YHTN2E4rRvXKCl X-Gm-Gg: ASbGncthn9HqFFFXfHeg7OILVPrg6c9ePVxHHMjK6XSdSrtJeR4/vX6ntzAzfg0gce4 Kg+b0vFsRRtG/GeTB/guFbGWfhStdyHss79wpyQP68etMpQ5ovJZJD9LuG05+u1ZbXnxYWdymOW 574Qx+iPLs3G+/Jurh/JR8OTtrrfHMXDGBRIl1Kcq9BcGXnCYVXtWznJ/9ryafIiA5LAwFZHLeU P27wNC3Nbi6hwA+gW6BhwW+HVApUZGX/Rc+e7wCjmA/RrcXXEfp6e5cpSAqvEJBOH34qk8v5MoC bifcL9e/hRlKlnm13OcOpGiiaEl7MA/HcTta+oqM7cJJQl1YddXc0Xgbt+OlB6HhjNdhpFWKogE 482+OUID07I7ZYYgR1ELxDEBlckWVXnQWwQ== X-Google-Smtp-Source: AGHT+IGrEiceEg7P4xA/N1wQR2I8PdzRPoZDucGEhLnH+g/GP4AGD+662nw1ui7cZ5x1VEAC7COBJg== X-Received: by 2002:a05:600c:4f85:b0:456:43d:1198 with SMTP id 5b1f17b1804b1-4562e3801ddmr210902675e9.32.1753187449978; Tue, 22 Jul 2025 05:30:49 -0700 (PDT) Received: from [192.168.15.242] ([80.251.191.198]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45630ec9129sm178000285e9.29.2025.07.22.05.30.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Jul 2025 05:30:49 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------SjwsQnkpJ0ZvWsM0rZr6SNLe" Message-ID: <39ac724e-58c8-4661-9e88-cb4ee97cb00e@gmail.com> Date: Tue, 22 Jul 2025 14:30:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pgsql: Log remote NOTICE, WARNING, and similar messages using ereport() To: Fujii Masao , pgsql-committers@lists.postgresql.org References: Content-Language: en-US From: Andrei Lepikhov In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------SjwsQnkpJ0ZvWsM0rZr6SNLe Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------SjwsQnkpJ0ZvWsM0rZr6SNLe Content-Type: text/plain; charset=UTF-8; name="v0-0001-Fix-Makefile-in-modules-employing-the-libpqsrv_no.patch" Content-Disposition: attachment; filename*0="v0-0001-Fix-Makefile-in-modules-employing-the-libpqsrv_no.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSA2YTU3Nzg2MGMwYTdlYWFkZDQzZDkzMWY3MzdmZjVmMmE5NTRiNTk3IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiAiQW5kcmVpIFYuIExlcGlraG92IiA8bGVwaWhvdkBn bWFpbC5jb20+CkRhdGU6IFR1ZSwgMjIgSnVsIDIwMjUgMTQ6MjU6NDggKzAyMDAKU3ViamVj dDogW1BBVENIIHYwXSBGaXggTWFrZWZpbGUgaW4gbW9kdWxlcyBlbXBsb3lpbmcgdGhlCiBs aWJwcXNydl9ub3RpY2VfcmVjZWl2ZXIgZnVuY3Rpb24KCi0tLQogY29udHJpYi9kYmxpbmsv TWFrZWZpbGUgICAgICAgfCAxICsKIGNvbnRyaWIvcG9zdGdyZXNfZ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