Re: [PATCH] Finally split StdRdOptions into HeapOptions and ToastOptions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Nikolay Shaplov <dhyan(at)nataraj(dot)su>
Cc: Amit Langote <amitlangote09(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Finally split StdRdOptions into HeapOptions and ToastOptions
Date: 2019-12-09 03:11:17
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Dec 06, 2019 at 06:18:48PM +0300, Nikolay Shaplov wrote:
> In the thread
> I've suggested to split one big StdRdOption that is used for options storage
> into into Options structures individual for each relkind and each relam
> And here goes the last part of StrRdOptions removal patch, where StdRdOptions
> is replaced with HeapOptions and ToastOptions.

-typedef struct StdRdOptions
+ * HeapOptions
+ * Binary representation of relation options for Heap relations.
+ */
+typedef struct HeapOptions

I think that it makes sense to split relation options dedicated to
heap into their own parsing structure, because those options are
actually related to the table AM heap. However, I think that this
patch is not ambitious enough in the work which is done and that
things could move into a more generic direction. At the end of the
day, I'd like to think that we should have something like:
- Heap-related reloptions are built as part of its AM handler in
heapam_handler.c, with reloptions.c holding no more references to
heap. At all.
- The table AM option parsing follows a model close to what is done
for indexes in terms of option parsing, moving the responsibility to
define relation options to each table AM.
- Toast is an interesting case, as table AMs may want to use toast
tables. Or not. Robert may be able to comment more on that as he has
worked in this area for bd12499.

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2019-12-09 03:40:58 Re: [Proposal] Level4 Warnings show many shadow vars
Previous Message Michael Paquier 2019-12-09 02:56:57 Re: Rework manipulation and structure of attribute mappings