Re: pg_upgrade and materialized views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Claudio Freire <klaussfreire(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_upgrade and materialized views
Date: 2018-02-20 22:24:03
Message-ID: 27527.1519165443@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Claudio Freire <klaussfreire(at)gmail(dot)com> writes:
> On Tue, Feb 20, 2018 at 7:08 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2018-02-20 22:29:01 Re: pg_upgrade and materialized views
Previous Message Andres Freund 2018-02-20 22:17:09 Re: pg_upgrade and materialized views