Re: pgsql: tableam: New callback relation_fetch_toast_slice.

Michael Paquier <[email protected]> Wed, 8 Jan 2020 12:26:48 +0900
Newsgroups gmane.comp.db.postgresql.devel.cvs
Message-ID <[email protected]>
--m0vRWufqUC70IDnR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Robert,

On Tue, Jan 07, 2020 at 07:37:20PM +0000, Robert Haas wrote:
> tableam: New callback relation_fetch_toast_slice.
>=20
> Instead of always calling heap_fetch_toast_slice during detoasting,
> invoke a table AM callback which, when the toast table is a heap
> table, will be heap_fetch_toast_slice.
>=20
> This makes it possible for a table AM other than heap to be used
> as a TOAST table. It also completes the series of commits intended
> to improve the interaction of tableam with TOAST that began with
> commit 8b94dab06617ef80a0901ab103ebd8754427ef5a; detoast.c is
> now, hopefully, fully AM-independent.
>=20
> Patch by me, reviewed by Andres Freund and Peter Eisentraut.

anole does not compile after this commit:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Danole&dt=3D2020-0=
1-08%2001%3A54%3A11

=46rom the logs:
make[4]: Entering directory
`/home/pgbfarm/buildroot/HEAD/pgsql.build/src/backend/access/brin'
cc +Olibmerrno -g +DD64 -I../../../../src/include
-D_XOPEN_SOURCE_EXTENDED
-I/opt/packages/libxml2-2.7.8/inst/include/libxml2
-I/opt/packages/zlib-1.2.5/inst/include
-I/opt/packages/libxslt-1.1.26/inst/include
-I/opt/packages/libxml2-2.7.8/inst/include  -c -o brin.o brin.c
"../../../../src/include/access/tableam.h", line 1662: error #2118: a
void function may not return a value
	return
	toastrel->rd_tableam->relation_fetch_toast_slice(toastrel,
	valueid,
		       ^
"brin.c", line 87: warning #4232-D: conversion from "Node *" to a more
strictly aligned type "IndexAmRoutine *" may cause misaligned access
	IndexAmRoutine *amroutine =3D makeNode(IndexAmRoutine);		                 =
           ^
--
Michael

--m0vRWufqUC70IDnR
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4VS/gACgkQnvQgOdby
QH1pyw//XlX9xEiywxMhrltNQ5dgd3JOuFCBP+AuWF/zvppDCeWTttnnxcWwo0BL
Ooqav/zRXAJztFtKGiOAekfCxDSM3VJS40Et9LPZVkO3Cs7tHdXL2t3vWIywX/tF
bblw+GILi1upqoEQ34u6STDs5bO747ts55lkOHMWZUhycAQkHquVhVoYouzpgf3b
mLXtqc25FGaFtrk1gAjfG/2PBhq/RrlAwwa79TwbyHD8ce4uw+ZOHONUCxaCmA1P
DB/k+5m4Ejw3X3z61FB1I6cL0kfh4JYWYiJpyZkGs58zhUbgkZ+kk+gnJV0LvSNQ
kv9N+FaQ89jHrK6g/JATiI3FhApxW7GktIgG3o82MthexxNeoF1voL8DCW7ykfZ6
U5/W0KLJixFNsh/vS2Z6pK9pq4dzGGb5qw8+6NMdAI5lPJjbpkvUojLaYFpPIBJL
T0JYxpiEBElUAmGgyvtMUfFehotP4LwgMySSRHM7uMhKpxPi/sIBN/y+omKjMGNt
XuXyjnTX3uYz7H9RoKDKgrwoIur0xX9HqZEQPeUnA9A/ciV9/iVKxSv7/9i5T+TI
/MONVkz8N3/EgCe8O585FvgtTHKsEKsfXkt+zw4ag2u0HlddzkNwNRak+naKPhxn
4J+gSjaJ2lMpvo8p8gcf6scuZcGRHwXoBlQQBxkcIORHBC6LV9c=
=NQP4
-----END PGP SIGNATURE-----

--m0vRWufqUC70IDnR--