pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: marian.krucina@gmail.com, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13907: Restore materialized view throw permission denied
Date: Thu, 16 Jun 2016 12:28:27 -0400
Message-ID: <1152.1466094507@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqQFLsrHDG=+6R6jw7QG9e9drk5aPsBtzsVpGuaF3VrXtQ@mail.gmail.com>
References: <20160202161407.2778.24659@wrigleys.postgresql.org>
	<CAB7nPqR-r8HMhEtEkGTr-N4kVrAJLqj-OP0wyjVin0U0BWsu5A@mail.gmail.com>
	<22633.1465910990@sss.pgh.pa.us>
	<CAB7nPqTVtZ0vWUSa4sQUFSZvkp0xacw2oojmhYSwi85SP45d9w@mail.gmail.com>
	<CAB7nPqQFLsrHDG=+6R6jw7QG9e9drk5aPsBtzsVpGuaF3VrXtQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Michael Paquier <michael.paquier@gmail.com> writes:
> So, I have been able to build the attached WIP patch proving that this
> is able to work correctly. There is no real refactoring done yet, but
> this passes regression tests and tutti-quanti. By the way, there are
> three points I am wondering about:

> 1) EXPLAIN ANALYZE is able to work with CTAS and create matview. I am
> thinking that it would be better not to touch those to not impact
> existing applications. By that I mean that EXPLAIN CREATE MATVIEW WITH
> NO DATA would still run the planner and executor in explain.c

Agreed, that needs to not break.

> 2) CTAS has a WITH NO DATA option, and it would be really weird to use
> the planner/executor code path when this option is used for this case.
> So I'd like to use the same method for both matviews and normal
> relations to simplify things and make the code more consistent.

Seems reasonable, depending on how invasive you have to be.

> 3) In this WIP patch, the command tag is CREATE MATERIALIZED VIEW if
> WITH NO DATA is used. I am planning to use SELECT 0 in all cases to
> keep things consistent with what is on HEAD and back-branches.

Meh, can't get excited about that.  If it's easy, okay, but arguably
the current behavior is just an implementation artifact itself.
I wouldn't go far out of your way to keep it.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (21+ messages)  latest in thread

Message-ID: <1152.1466094507@sss.pgh.pa.us>
Permalink:  ../1152.1466094507@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1152.1466094507@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, michael.paquier@gmail.com
  Subject: Re: BUG #13907: Restore materialized view throw permission denied
  In-Reply-To: <1152.1466094507@sss.pgh.pa.us>
  References: <20160202161407.2778.24659@wrigleys.postgresql.org> <CAB7nPqR-r8HMhEtEkGTr-N4kVrAJLqj-OP0wyjVin0U0BWsu5A@mail.gmail.com> <22633.1465910990@sss.pgh.pa.us> <CAB7nPqTVtZ0vWUSa4sQUFSZvkp0xacw2oojmhYSwi85SP45d9w@mail.gmail.com> <CAB7nPqQFLsrHDG=+6R6jw7QG9e9drk5aPsBtzsVpGuaF3VrXtQ@mail.gmail.com> <1152.1466094507@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