Re: pg_upgrade and materialized views

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: pg_upgrade and materialized views
Дата
Msg-id 20180220230158.czhmxwdkfie64uwz@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: pg_upgrade and materialized views  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 2018-02-20 17:24:03 -0500, Tom Lane wrote:
> Claudio Freire <klaussfreire@gmail.com> writes:
> > On Tue, Feb 20, 2018 at 7:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> Hm?  Looks to me like it iterates through all the DBs in the cluster.
> 
> > You're right. But IIUC it's called before restoring globals, so only
> > postgres, template0 and template1 exist at that point.
> 
> Hmm ... there's another call later, but that one only happens for
> pre-9.3 source DBs, which won't contain matviews nor partitioned tables.
> So maybe it's OK but I'm not quite sure, and even if it is OK it's only
> accidentally so.

> Be nice if the documentation for this code weren't so relentlessly bad ---
> the header comment for this function looks like it's telling you something
> useful, but it isn't even close to accurate.  The comment right above the
> call in prepare_new_globals() seems unrelated to anyone's version of
> reality either.

Yea, this code, not just the comments, is bad.  Combining the codepaths
for setting minmxid on all objects when upgrading from an old server
with the task of setting an appropriate horizon for objects created by
initdb, but nothing else, without so much as a comment about it?

Greetings,

Andres Freund


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pg_upgrade and materialized views
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: pg_upgrade and materialized views