Re: Error with index on unlogged table

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Thom Brown <thom(at)linux(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Error with index on unlogged table
Date: 2015-03-25 15:46:25
Message-ID: CAFcNs+qVHVnLLzOXtuEKKxK1O6godWYiAJE0ejymgZ_gDGTb+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 25, 2015 at 10:53 AM, Andres Freund <andres(at)2ndquadrant(dot)com>
wrote:
>
> Hi,
>
> On 2015-03-25 11:38:30 +0900, Michael Paquier wrote:
> > On Tue, Mar 24, 2015 at 8:46 PM, Thom Brown wrote:
> > > The index is unlogged until reindexing...
> > >
> > > [...]
> > > Which is think also raises the question, why are unlogged indexes made
> > > persistent by a reindex?
> >
> > That's a bug of HEAD, ~9.4 keeping the index as unlogged even after
> > REINDEX INDEX. What happens is that ReindexIndex relies on
> > relpersistence provided by makeRangeVar at parse time, which is just
> > incorrect as it uses RELPERSISTENCE_PERMANENT all the time. The patch
> > attached fixes that...
>
> What the hell? That's somewhat nasty. Nice that it got caught before 9.5
> was released.
>

Unfortunately this is very nasty. Sorry!

> Did you check whether a similar bug was made in other places of
> 85b506bb? Could you additionally add a regression test to this end?
> Seems like something worth testing.
>

I'm checking it and adding some regression tests.

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-03-25 15:49:35 Re: Parallel Seq Scan
Previous Message Tom Lane 2015-03-25 14:34:06 Re: Ignoring entries generated by autoconf in code tree