Re: pgsql: Code cleanup for toast_fetch_datum and toast_fetch_datum_slice. - Mailing list pgsql-committers

From Robert Haas
Subject Re: pgsql: Code cleanup for toast_fetch_datum and toast_fetch_datum_slice.
Date
Msg-id CA+Tgmoap5WvGXSPdgRpYbmc7-6m7n_mF6J9K0iE=O+M5F6y7EA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Code cleanup for toast_fetch_datum and toast_fetch_datum_slice.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Tue, Dec 17, 2019 at 3:54 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Tue, Dec 17, 2019 at 2:52 PM Robert Haas <rhaas@postgresql.org> wrote:
> >> Code cleanup for toast_fetch_datum and toast_fetch_datum_slice.
>
> > florican seems unhappy with this. Looking at it now.
>
> lapwing as well; maybe some 64-bit-ish assumptions in there?

It actually seems to be due to the fact that the 32-bit machine has a
different TOAST chunk size (2000) than the 64-bit machine (1996).
There is no test which uses an amount of data that is a multiple of
the latter value, but there was a test which used data that is a
multiple of the former value, so it worked OK for me locally, but
failed (mostly by luck) with the different TOAST size.

Possibly we should add some more tests here...

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Fix bad formula in previous commit.
Next
From: Tom Lane
Date:
Subject: pgsql: Fix error reporting for index expressions of prohibited types.