pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: tableam: New callback relation_fetch_toast_slice.
4+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2020-01-09 5acf6d8bb4  Remove bogus 'return'.
* pgsql: tableam: New callback relation_fetch_toast_slice.
@ 2020-01-07 19:37  Robert Haas <rhaas@postgresql.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Robert Haas @ 2020-01-07 19:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

tableam: New callback relation_fetch_toast_slice.

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.

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.

Patch by me, reviewed by Andres Freund and Peter Eisentraut.

Discussion: http://postgr.es/m/CA+TgmoZv-=2iWM4jcw5ZhJeL18HF96+W1yJeYrnGMYdkFFnEpQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ce242ae154dde3217971c6f262705d80999f4e00

Modified Files
--------------
src/backend/access/common/detoast.c      | 199 +------------------------------
src/backend/access/heap/heapam_handler.c |   1 +
src/backend/access/heap/heaptoast.c      | 182 ++++++++++++++++++++++++++++
src/include/access/heaptoast.h           |  10 ++
src/include/access/tableam.h             |  46 +++++++
5 files changed, 245 insertions(+), 193 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: tableam: New callback relation_fetch_toast_slice.
@ 2020-01-08 03:26  Michael Paquier <michael@paquier.xyz>
  parent: Robert Haas <rhaas@postgresql.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Michael Paquier @ 2020-01-08 03:26 UTC (permalink / raw)
  To: Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

Hi Robert,

On Tue, Jan 07, 2020 at 07:37:20PM +0000, Robert Haas wrote:
> tableam: New callback relation_fetch_toast_slice.
> 
> 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.
> 
> 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.
> 
> 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=anole&dt=2020-01-08%2001%3A54%3A11

From 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 = makeNode(IndexAmRoutine);		                            ^
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: tableam: New callback relation_fetch_toast_slice.
@ 2020-01-09 14:12  Robert Haas <robertmhaas@gmail.com>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 4+ messages in thread

From: Robert Haas @ 2020-01-09 14:12 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>

On Tue, Jan 7, 2020 at 10:27 PM Michael Paquier <michael@paquier.xyz> wrote:
> anole does not compile after this commit:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=anole&dt=2020-01-08%2001%3A54%3A11
>
> From 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,
>                        ^

Huh, I'm surprised that didn't break everywhere. Pushed a fix.

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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: tableam: New callback relation_fetch_toast_slice.
@ 2020-01-09 23:48  Michael Paquier <michael@paquier.xyz>
  parent: Robert Haas <robertmhaas@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2020-01-09 23:48 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>

On Thu, Jan 09, 2020 at 09:12:48AM -0500, Robert Haas wrote:
> Huh, I'm surprised that didn't break everywhere. Pushed a fix.

Thanks.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2020-01-09 23:48 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 19:37 pgsql: tableam: New callback relation_fetch_toast_slice. Robert Haas <rhaas@postgresql.org>
2020-01-08 03:26 ` Michael Paquier <michael@paquier.xyz>
2020-01-09 14:12   ` Robert Haas <robertmhaas@gmail.com>
2020-01-09 23:48     ` Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox