Subject: Re: pgsql: Fix overread in JSON parsing errors for incomplete byte sequence

From: Peter Eisentraut <[email-masked]>
Date: Tue, 14 May 2024 10:39:36 +0200

On 10.05.24 14:23, Alvaro Herrera wrote:
> On 2024-May-10, Alvaro Herrera wrote:
> 
>> Not sure what's going on here, or why it fails for me while the
>> buildfarm is all happy.
> 
> Ah, I ran 'git clean -dfx' and now it works correctly.  I must have had
> an incomplete rebuild.

I saw the same thing.  The problem is that there is incomplete 
dependency information in the makefiles (not meson) between src/common/ 
and what is using it.  So whenever anything changes in src/common/, you 
pretty much have to do a forced rebuild of everything.

---

From: Michael Paquier <[email-masked]>
Date: Wed, 15 May 2024 09:00:01 +0900

On Tue, May 14, 2024 at 10:39:36AM +0200, Peter Eisentraut wrote:
> I saw the same thing.  The problem is that there is incomplete dependency
> information in the makefiles (not meson) between src/common/ and what is
> using it.  So whenever anything changes in src/common/, you pretty much have
> to do a forced rebuild of everything.

Is that a recent regression?  I have some blurry memories from
working on these areas that changing src/common/ reflected on the
compiled pieces effectively at some point.
--
Michael

---

From: Peter Eisentraut <[email-masked]>
Date: Wed, 15 May 2024 08:15:37 +0200

> compiled pieces effectively at some point.

One instance of this problem that I can reproduce at least back to PG12 is

1. touch src/common/exec.c
2. make -C src/bin/pg_dump

This will rebuild libpgcommon, but it will not relink pg_dump.

---

From: Jacob Champion <[email-masked]>
Date: Wed, 15 May 2024 11:22:58 -0700

> This will rebuild libpgcommon, but it will not relink pg_dump.

I remember src/common/unicode changes having similar trouble, as well [1].

--Jacob

[1] https://www.postgresql.org/message-id/CAFBsxsGZTwzDnTs=TVM38CCTPP3Y0D3=[email-masked]