From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Shared access methods? |
Date: | 2018-06-14 20:38:44 |
Message-ID: | 20180614203844.7ysqxbonum66jm6a@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2018-06-14 16:33:08 -0400, Alvaro Herrera wrote:
> On 2018-Jun-14, Andres Freund wrote:
>
> > But I do think there's a few things that are doable without actually
> > needing to invoke any user defined code aside of the AM code
> > itself. E.g. heap pruning / aggressively setting hint bits doesn't need
> > to invoke operators, and I can think of some ways to implement index
> > delete marking that does so without invoking any comparators either.
>
> So what you want to do is have bgwriter/checkpointer able to scan some
> catalog and grab a function pointer that can "execute pruning on this
> shared buffer", right?
Yes.
> For that maybe we need to split out a part of
> AMs that is storage-level and another one that is data-level. So an
> access method would create two catalog entries, one of which is shared
> (pg_shared_am? ugh) and the other is the regular one we already have in
> pg_am. The handler function in pg_shared_am gives you functions that
> can only do storage-level stuff such as hint bit setting, page pruning,
> tuple freezing, CRC, etc which does not require access to the data
> itself.
I'm not sure I understand the need for this split? Why can't we have
pg_am's amhandler - now a shlib/name combo - return its normal
*AmRoutine struct, one of which would be an optional 'amonwriteout'
callback?
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-06-14 21:26:33 | Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression" |
Previous Message | Alvaro Herrera | 2018-06-14 20:33:08 | Re: Shared access methods? |