Re: BUG #13840: pg_dump generates unloadable SQL when third party string type index option is used

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #13840: pg_dump generates unloadable SQL when third party string type index option is used
Дата
Msg-id CAB7nPqS-opn9kTOGt0Memd0GkDNXPgtbawbqVLvavOWT0PL4nA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #13840: pg_dump generates unloadable SQL when third party string type index option is used  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Sun, Jan 3, 2016 at 2:50 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Kouhei Sutou <kou@clear-code.com> writes:
> >   Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> Pushed with some adjustments (notably, I thought the quoting rule was
> >> too complicated and not necessarily 100% correct).
>
> > Thanks for merging my patch and backporting to released
> > series.
>
> I looked into pg_dump and realized that this fixes only a few of the
> problems in this area.  While pg_dump does rely on ruleutils.c to
> print reloptions of simple indexes, it does not do that for reloptions
> of tables or views, nor for reloptions of indexes that are constraints.
> So eventually that's going to bite us on the rear, though I'm not sure
> if we have a live problem today.

That's actually something that has been discussed some months ago
after trying to add units to those parameters (e23014f3 that got
reverted). At some point I guess we should add those quotes within
pg_class/reloptions directly in each element of its array, the new
per-relation log_autovacuum_min_duration being an extra argument in
favor of it.

> One could imagine exporting flatten_reloptions via a separate SQL
> function, but that could only exist in future releases, so I'm afraid
> we're going to have to duplicate the functionality inside pg_dump.

Yep, that's another option, though it seems to me that we had better
tackle this at its root, this routine doing some manual parsing of
each element.
--
Michael

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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: BUG #13841: Unable to set autocommit in psql
Следующее
От: jonas.hagen3@gmail.com
Дата:
Сообщение: BUG #13842: deb-Package configuration hangs at password promt