Re: [HACKERS] CREATE RULE "_RETURN" and toast tables

2013-03-03 Thread Tom Lane
Andres Freund writes: > On 2013-02-14 20:47:11 -0500, Tom Lane wrote: >> Andres Freund writes: >>> The current behaviour doesn't seem to be a terribly good idea. I propose >>> to drop the toast table and reset the relfrozenxid in DefineQueryRewrite >>> in the RelisBecomingView case. >> Yeah, pro

Re: [HACKERS] CREATE RULE "_RETURN" and toast tables

2013-02-20 Thread Andres Freund
On 2013-02-14 20:47:11 -0500, Tom Lane wrote: > Andres Freund writes: > > The current behaviour doesn't seem to be a terribly good idea. I propose > > to drop the toast table and reset the relfrozenxid in DefineQueryRewrite > > in the RelisBecomingView case. > > Yeah, probably worth doing. At th

Re: [HACKERS] CREATE RULE "_RETURN" and toast tables

2013-02-14 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > > Any objection to making it a TODO? > > None here. I was thinking it might be a useful finger exercise for > someone who wanted to learn about pg_dump. Done. Thanks. Stephen signature.asc Description: Digital signature

Re: [HACKERS] CREATE RULE "_RETURN" and toast tables

2013-02-14 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> That payoff is a little bit too far off to motivate me to do anything in >> this line personally, but in case anybody else is more excited about it, >> I thought I'd get the idea into the archives. > Any objection to making it a TO

Re: [HACKERS] CREATE RULE "_RETURN" and toast tables

2013-02-14 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > That payoff is a little bit too far off to motivate me to do anything in > this line personally, but in case anybody else is more excited about it, > I thought I'd get the idea into the archives. Any objection to making it a TODO? Might be a bit light for

Re: [HACKERS] CREATE RULE "_RETURN" and toast tables

2013-02-14 Thread Tom Lane
Andres Freund writes: > On 2013-02-14 20:47:11 -0500, Tom Lane wrote: >> Yeah, probably worth doing. At the time we thought that that code path >> was just a short-term legacy thing for loading ancient pg_dump files. >> However, given that even modern pg_dumps will use this syntax if >> necessary

Re: [HACKERS] CREATE RULE "_RETURN" and toast tables

2013-02-14 Thread Andres Freund
On 2013-02-14 20:47:11 -0500, Tom Lane wrote: > Andres Freund writes: > > due to no respective element being in in table_toast_list nothing is > > vacuumed and you cannot escape the situation. Not very nice. I wonder if > > we should do something about it even due 8.3 is formally out of support, >

Re: [HACKERS] CREATE RULE "_RETURN" and toast tables

2013-02-14 Thread Tom Lane
Andres Freund writes: > due to no respective element being in in table_toast_list nothing is > vacuumed and you cannot escape the situation. Not very nice. I wonder if > we should do something about it even due 8.3 is formally out of support, Out of support is out of support. We're certainly not

[HACKERS] CREATE RULE "_RETURN" and toast tables

2013-02-14 Thread Andres Freund
Hi, While investigating an anti-wraparound shutdown issue of Peter H. Ezetta (cced) on IRC the issue came up that when you: CREATE TABLE foo(id int, text text); CREATE RULE "_RETURN" AS ON SELECT TO foo DO INSTEAD SELECT 1::int AS id, ''::text AS text; a) the view keeps its relfrozenxid value b