pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedIs user_catalog_table sensible for matviews?
5+ messages / 4 participants
[nested] [flat]
* Is user_catalog_table sensible for matviews?
@ 2016-11-09 17:17 Tom Lane <tgl@sss.pgh.pa.us>
2016-11-09 17:55 ` Re: Is user_catalog_table sensible for matviews? Robert Haas <robertmhaas@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2016-11-09 17:17 UTC (permalink / raw)
To: pgsql-hackers
The system will let you set the "user_catalog_table" reloption to "true"
on a materialized view. Is this sensible, or is it a bug caused by the
fact that reloptions.c fails to distinguish matviews from heaps at all?
If it is sensible, then I broke it in e3e66d8a9 ...
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Is user_catalog_table sensible for matviews?
2016-11-09 17:17 Is user_catalog_table sensible for matviews? Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-11-09 17:55 ` Robert Haas <robertmhaas@gmail.com>
2016-11-10 00:21 ` Re: Is user_catalog_table sensible for matviews? Craig Ringer <craig@2ndquadrant.com>
2016-11-10 11:54 ` Re: Is user_catalog_table sensible for matviews? Andres Freund <andres@anarazel.de>
0 siblings, 2 replies; 5+ messages in thread
From: Robert Haas @ 2016-11-09 17:55 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers
On Wed, Nov 9, 2016 at 12:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The system will let you set the "user_catalog_table" reloption to "true"
> on a materialized view. Is this sensible, or is it a bug caused by the
> fact that reloptions.c fails to distinguish matviews from heaps at all?
>
> If it is sensible, then I broke it in e3e66d8a9 ...
I can understand what that combination of opens would mean from a
semantic point of view, so I don't think it's insensible. However, it
doesn't seem like an important combination to support, and I suspect
that the fact that we did was accidental.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Is user_catalog_table sensible for matviews?
2016-11-09 17:17 Is user_catalog_table sensible for matviews? Tom Lane <tgl@sss.pgh.pa.us>
2016-11-09 17:55 ` Re: Is user_catalog_table sensible for matviews? Robert Haas <robertmhaas@gmail.com>
@ 2016-11-10 00:21 ` Craig Ringer <craig@2ndquadrant.com>
1 sibling, 0 replies; 5+ messages in thread
From: Craig Ringer @ 2016-11-10 00:21 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers
On 10 November 2016 at 01:55, Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Nov 9, 2016 at 12:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The system will let you set the "user_catalog_table" reloption to "true"
>> on a materialized view. Is this sensible, or is it a bug caused by the
>> fact that reloptions.c fails to distinguish matviews from heaps at all?
>>
>> If it is sensible, then I broke it in e3e66d8a9 ...
>
> I can understand what that combination of opens would mean from a
> semantic point of view, so I don't think it's insensible. However, it
> doesn't seem like an important combination to support, and I suspect
> that the fact that we did was accidental.
I think it'll work sanely, but I don't see why it's worth having. User
catalogs are for data you'll want to see consistently during logical
decoding. I don't see why anyone's going to need a matview at that
point. Since it's also untested, I suggest disallowing user catalog
matviews.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Is user_catalog_table sensible for matviews?
2016-11-09 17:17 Is user_catalog_table sensible for matviews? Tom Lane <tgl@sss.pgh.pa.us>
2016-11-09 17:55 ` Re: Is user_catalog_table sensible for matviews? Robert Haas <robertmhaas@gmail.com>
@ 2016-11-10 11:54 ` Andres Freund <andres@anarazel.de>
2016-11-10 14:27 ` Re: Is user_catalog_table sensible for matviews? Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 5+ messages in thread
From: Andres Freund @ 2016-11-10 11:54 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers
On 2016-11-09 12:55:51 -0500, Robert Haas wrote:
> On Wed, Nov 9, 2016 at 12:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > The system will let you set the "user_catalog_table" reloption to "true"
> > on a materialized view. Is this sensible, or is it a bug caused by the
> > fact that reloptions.c fails to distinguish matviews from heaps at all?
> >
> > If it is sensible, then I broke it in e3e66d8a9 ...
>
> I can understand what that combination of opens would mean from a
> semantic point of view, so I don't think it's insensible. However, it
> doesn't seem like an important combination to support, and I suspect
> that the fact that we did was accidental.
I don't see it as being important either. I suspect we intentionally
didn't exclude it, but less because of a use-case and more because there
didn't seem to be a need to.
Andres
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Is user_catalog_table sensible for matviews?
2016-11-09 17:17 Is user_catalog_table sensible for matviews? Tom Lane <tgl@sss.pgh.pa.us>
2016-11-09 17:55 ` Re: Is user_catalog_table sensible for matviews? Robert Haas <robertmhaas@gmail.com>
2016-11-10 11:54 ` Re: Is user_catalog_table sensible for matviews? Andres Freund <andres@anarazel.de>
@ 2016-11-10 14:27 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 5+ messages in thread
From: Tom Lane @ 2016-11-10 14:27 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: Robert Haas <robertmhaas@gmail.com>; pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2016-11-09 12:55:51 -0500, Robert Haas wrote:
>> On Wed, Nov 9, 2016 at 12:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> The system will let you set the "user_catalog_table" reloption to "true"
>>> on a materialized view. Is this sensible, or is it a bug caused by the
>>> fact that reloptions.c fails to distinguish matviews from heaps at all?
>>> If it is sensible, then I broke it in e3e66d8a9 ...
>> I can understand what that combination of opens would mean from a
>> semantic point of view, so I don't think it's insensible. However, it
>> doesn't seem like an important combination to support, and I suspect
>> that the fact that we did was accidental.
> I don't see it as being important either. I suspect we intentionally
> didn't exclude it, but less because of a use-case and more because there
> didn't seem to be a need to.
I think it's fundamentally wrong that reloptions.c doesn't distinguish
matviews from heaps. You can argue about whether this particular case
is okay or not, but sooner or later there's going to be an option that
only applies to one of them. So I plan to invent RELOPT_KIND_MATVIEW
while I'm rejiggering things to fix the rd_options type safety issue.
Having done that, we could either allow this for matviews or not.
I'm agnostic. However, unless we feel like back-patching some
modification of e3e66d8a9, 9.5.x and 9.6.x are effectively not
going to allow it (they'd take the option but then ignore it).
I guess that's arguably a bug in itself.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2016-11-10 14:27 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-11-09 17:17 Is user_catalog_table sensible for matviews? Tom Lane <tgl@sss.pgh.pa.us>
2016-11-09 17:55 ` Robert Haas <robertmhaas@gmail.com>
2016-11-10 00:21 ` Craig Ringer <craig@2ndquadrant.com>
2016-11-10 11:54 ` Andres Freund <andres@anarazel.de>
2016-11-10 14:27 ` Tom Lane <tgl@sss.pgh.pa.us>
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