Re: Unlogged tables cannot be truncated twice - Mailing list pgsql-bugs

From Andres Freund
Subject Re: Unlogged tables cannot be truncated twice
Date
Msg-id 201105310247.50055.andres@anarazel.de
Whole thread Raw
In response to Re: Unlogged tables cannot be truncated twice  (Andres Freund <andres@anarazel.de>)
Responses Re: Unlogged tables cannot be truncated twice
List pgsql-bugs
On Tuesday, May 31, 2011 02:35:58 AM Andres Freund wrote:
> On Tuesday, May 31, 2011 02:14:00 AM Andres Freund wrote:
> > On Tuesday, May 31, 2011 01:56:05 AM C=E9dric Villemain wrote:
> > > I remove my own explanations as we conclude on the same thing.
> > > Attached is the fix by adding a (!reindex)  in the index.c if().
> >=20
> > Thats imo wrong because it will break a plain REINDEX?
>=20
> > I think one possible correct fix would be the attached:
> My version was wrong as well because it  did not observe RelationTruncate=
's
> nblocks argument. That function is used to "shorten" the relation in
> vacuum. So dropping the init fork there is not a good idea.
>=20
> So I think it is the simpler version of simply checking the existance of
> the fork before creating is ok.
Gna. gnargl. Coffe. Bed. ;)

There was an accidental hunk I added while removing some whitespace. That=
=20
would not have been good on a real commit.

Argh.

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: Unlogged tables cannot be truncated twice
Next
From: Alvaro Herrera
Date:
Subject: Re: Unlogged tables cannot be truncated twice