Re: Get rid of redundant StringInfo accumulation - Mailing list pgsql-hackers

From Daniil Davydov
Subject Re: Get rid of redundant StringInfo accumulation
Date
Msg-id CAJDiXgjXmU9jKKsyRCMuQu25NiRDLJch6-r7LzK1=3FFZA=sMQ@mail.gmail.com
Whole thread
In response to Re: Get rid of redundant StringInfo accumulation  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
Hi,

On Mon, Mar 30, 2026 at 4:52 AM Peter Smith <smithpb2250@gmail.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

pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Bug: wrong relname in RemoveSubscriptionRel() error detail
Next
From: John Naylor
Date:
Subject: clang bug affecting greenfly