From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Assertion failure on UNLOGGED VIEW and SEQUENCE |
Date: | 2011-02-18 19:17:31 |
Message-ID: | 12937.1298056651@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> OK. Proposed patch attached. It looks to me like an unlogged view is
> inherently nonsensical, whereas an unlogged sequence is sensible but
> we don't implement it (and may never implement it, absent some
> evidence that the overhead of WAL logging sequence changes is worth
> getting excited about), so I wrote the error messages to reflect that
> distinction. I also added a couple of matching regression tests, and
> documented that UNLOGGED works with SELECT INTO. I put the check for
> views in DefineView adjacent to the other check that already cares
> about relpersistence, and I put the one in DefineSequence to match, at
> the top for lack of any compelling theory of where it ought to go. I
> looked at stuffing it all the way down into DefineRelation but that
> looks like it would require some other rejiggering of existing logic
> and assertions, which seems pointless and potentially prone to
> breaking things.
Regression tests for this seem pretty pointless (ie, a waste of cycles
forevermore). +1 for where you put the tests, but I don't think
ERRCODE_SYNTAX_ERROR is an appropriate errcode. I'd go with
FEATURE_NOT_SUPPORTED for both, I think. Also, it might be worth
putting some of the above justification into the comments, eg
/* Unlogged sequences are not implemented --- not clear if useful */
versus
/* Unlogged views are pretty nonsensical */
rather than duplicate comments describing non-duplicate cases.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-02-18 19:20:32 | Re: review: FDW API |
Previous Message | Andrew Dunstan | 2011-02-18 19:16:15 | SR standby hangs |