Re: minor gripe about lax reloptions parsing for views

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Re: minor gripe about lax reloptions parsing for views
Дата
Msg-id 8F154BB9-971C-4585-8079-504838E41938@enterprisedb.com
обсуждение исходный текст
Ответ на Re: minor gripe about lax reloptions parsing for views  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: minor gripe about lax reloptions parsing for views
Список pgsql-hackers

> On Oct 1, 2021, at 6:15 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2021-Sep-30, Mark Dilger wrote:
>
>> The solution is simple enough:  stop using HEAP_RELOPT_NAMESPACES when
>> parsing reloptions for views and instead create a
>> VIEW_RELOPT_NAMESPACES array which does not include "toast".
>
> It seems a reasonable (non-backpatchable) change to me.

I agree.  It's neither important enough to be back-patched nor completely non-breaking.  Somebody could be passing
bogusreloptions and relying on the parser to ignore them. 

>> I've already fixed this, mixed into some other work.  I'll pull it out
>> as its own patch if there is any interest.
>
> Yeah.
>
> I suppose you'll need a new routine that returns the namespace array to
> use based on relkind.

The patch does it this way.  The new routine can just return NULL for relkinds that don't accept "toast" as an option
namespace. We don't need to create the VIEW_RELOPT_NAMESPACES array mentioned upthread. 

The patch changes the docs for index storage option "fillfactor".  The existing documentation imply that all index
methodssupport this parameter, but in truth built-in methods brin and gin do not, and we should not imply anything
aboutwhat non-built-in methods do. 

The changes to create_view.sql demonstrate what the patch has fixed.

The other changes to regression tests provide previously missing test coverage of storage options for which the
behavioris unchanged.  I prefer to have coverage, but if the committer who picks this up disagrees, those changes could
justbe ignored.  I'd also be happy to remove them and repost if the committer prefers. 




—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company




Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Zhang
Дата:
Сообщение: Re: Fix uninitialized variable access (src/backend/utils/mmgr/freepage.c)
Следующее
От: Jeremy Schneider
Дата:
Сообщение: Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails