pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_upgrade and materialized views
Date: Tue, 20 Feb 2018 17:24:03 -0500
Message-ID: <27527.1519165443@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGTBQpY+NQQmSxpi=c+T+JZEjYBrVNaiZ=_jExhTwix-o=T+PQ@mail.gmail.com>
References: <CAGTBQpbrY9CdRGGhyBZ9yqY4jWaGC85rUF4X+R7d-aim=mBNsw@mail.gmail.com>
	<23575.1519162064@sss.pgh.pa.us>
	<CAGTBQpY0wu1UiPUMjDCTrxaR92EETXBqo0+fPDGeBbg-v64J7A@mail.gmail.com>
	<24838.1519163208@sss.pgh.pa.us>
	<CAGTBQpZHSPXNZh-DY319FVuuz3o1c-fH-Dkc9R656MOP0AgcPw@mail.gmail.com>
	<26015.1519164481@sss.pgh.pa.us>
	<CAGTBQpY+NQQmSxpi=c+T+JZEjYBrVNaiZ=_jExhTwix-o=T+PQ@mail.gmail.com>

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.

			regards, tom lane




view thread (31+ messages)  latest in thread

Message-ID: <27527.1519165443@sss.pgh.pa.us>
Permalink:  ../27527.1519165443@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27527.1519165443@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, klaussfreire@gmail.com
  Subject: Re: pg_upgrade and materialized views
  In-Reply-To: <27527.1519165443@sss.pgh.pa.us>
  References: <CAGTBQpbrY9CdRGGhyBZ9yqY4jWaGC85rUF4X+R7d-aim=mBNsw@mail.gmail.com> <23575.1519162064@sss.pgh.pa.us> <CAGTBQpY0wu1UiPUMjDCTrxaR92EETXBqo0+fPDGeBbg-v64J7A@mail.gmail.com> <24838.1519163208@sss.pgh.pa.us> <CAGTBQpZHSPXNZh-DY319FVuuz3o1c-fH-Dkc9R656MOP0AgcPw@mail.gmail.com> <26015.1519164481@sss.pgh.pa.us> <CAGTBQpY+NQQmSxpi=c+T+JZEjYBrVNaiZ=_jExhTwix-o=T+PQ@mail.gmail.com> <27527.1519165443@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox