| From: | Daniil Davydov <3danissimo(at)gmail(dot)com> |
|---|---|
| To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
| Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Get rid of redundant StringInfo accumulation |
| Date: | 2026-03-30 06:36:35 |
| Message-ID: | CAJDiXgjXmU9jKKsyRCMuQu25NiRDLJch6-r7LzK1=3FFZA=sMQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Mon, Mar 30, 2026 at 4:52 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> 1.
> @@ -108,6 +108,9 @@ ReportApplyConflict(EState *estate, ResultRelInfo
> *relinfo, int elevel,
> Relation localrel = relinfo->ri_RelationDesc;
> StringInfoData err_detail;
>
> + if (!message_level_is_interesting(elevel))
> + return;
> +
>
> AFAICT, this change will also cause the
> pgstat_report_subscription_conflict() to be skipped. But that call was
> not associated with the log level.
>
Thank you for looking into it!
Yeah, now the report_subscription_conflict call may be mistakenly skipped.
Since it just adds pgstat pending entry and does not depend on the log level,
I'll move this call above the log level check. I think this is OK, because
pgstat accumulation has nothing common with logging that we are trying to skip.
Please, see the updated patch.
--
Best regards,
Daniil Davydov
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Get-rid-of-redundant-calculations.patch | text/x-patch | 3.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John Naylor | 2026-03-30 06:39:23 | clang bug affecting greenfly |
| Previous Message | Chao Li | 2026-03-30 06:33:00 | Re: Bug: wrong relname in RemoveSubscriptionRel() error detail |