Reloptions for table access methods

Поиск
Список
Период
Сортировка
Искать
От
Jeff Davis
Тема
Reloptions for table access methods
Дата
Msg-id
429fb58fa3218221bb17c7bf9e70e1aa6cfc6b5d.camel@j-davis.com
Список
Дерево обсуждения
Reloptions for table access methods Jeff Davis <pgsql@j-davis.com>
Re: Reloptions for table access methods Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Reloptions for table access methods Jeff Davis <pgsql@j-davis.com>
Re: Reloptions for table access methods Simon Riggs <simon@2ndquadrant.com>
Re: Reloptions for table access methods Jeff Davis <pgsql@j-davis.com>
Re: Reloptions for table access methods Simon Riggs <simon@2ndquadrant.com>
Re: Reloptions for table access methods Jeff Davis <pgsql@j-davis.com>
Re: Reloptions for table access methods Simon Riggs <simon.riggs@enterprisedb.com>
Re: Reloptions for table access methods David Steele <david@pgmasters.net>
Re: Reloptions for table access methods Michael Paquier <michael@paquier.xyz>
Re: Reloptions for table access methods gkokolatos@pm.me
Re: Reloptions for table access methods gkokolatos@pm.me
A custom table access method might want to add a new reloption to
control something specific to that table access method. Unfortunately,
if you add a new option of type RELOPT_KIND_HEAP, it will immediately
fail because of the validation that happens in fillRelOptions().

Right now, heap reloptions (e.g. FILLFACTOR) are validated in two
places: parseRelOptions() and fillRelOptions().

parseRelOptions() validates against boolRelOpts[], intRelOpts[], etc.
This validation is extensible by add_bool_reloption(), etc.

fillRelOptions() validates when filling in a struct to make sure there
aren't "leftover" options. It does this using a hard-coded parsing
table that is not extensible.

Index access methods get total control over validation of reloptions,
but that doesn't fit well with heaps, because all heaps need the
vacuum-related options.

I considered some other approaches, but they all seemed like over-
engineering, so the attached patch just passes validate=false to
fillRelOptions() for heaps. That allows custom table access methods to
just define new options of kind RELOPT_KIND_HEAP.

Regards,
	Jeff Davis

В списке pgsql-hackers по дате отправления
От: Sait Talha Nisanci
Дата:
От: Jeff Davis
Дата:
FAQ