Re: Fixes a trivial bug in dumped parse/query/plan trees - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fixes a trivial bug in dumped parse/query/plan trees
Date
Msg-id 594270.1756829307@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixes a trivial bug in dumped parse/query/plan trees  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes:
>> On 25 Aug 2025, at 02:54, Chao Li <li.evan.chao@gmail.com> wrote:
>> This patch fixes a trivial bug where an extra whitespace was added
>> when dumping an array, for example:
>> ...
>> The unnecessary whitespace is now removed.

> What about external parsers written for this format which might now break?
> (Judging by the commitlog I believe this format is intentional and not a bug.)

Yeah, I'm inclined to reject this patch.  This is by no stretch of the
imagination a "bug"; a more accurate characterization is that it's a
minor optimization that the original author did not think was worth
troubling with.  While our existing nodeRead code wouldn't have a
problem with removing the extra whitespace, I share your fear that
we could introduce bugs into some third-party code somewhere.
So the cost/benefit ratio of making the change doesn't look very good
to me.

I do have interest in trying to aggressively reduce the stored size
of view/rule parsetrees, and would be willing to break such
hypothetical third-party code in pursuit of a sufficiently large
improvement (say, 2X or better).  But a change like this one,
in isolation, isn't going to move that needle.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Use bool with synced field (src/include/replication/slot.h)
Next
From: Andres Freund
Date:
Subject: Re: Get rid of pgstat_count_backend_io_op*() functions