Re: Error with index on unlogged table

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

On 26 March 2015 at 00:55, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:

> On Thu, Mar 26, 2015 at 1:02 AM, Fabrízio de Royes Mello
> <fabriziomello(at)gmail(dot)com> wrote:
> > On Wed, Mar 25, 2015 at 12:46 PM, Fabrízio de Royes Mello
> > <fabriziomello(at)gmail(dot)com> wrote:
> >>
> >>
> >> On Wed, Mar 25, 2015 at 10:53 AM, Andres Freund <andres(at)2ndquadrant(dot)com
> >
> >> wrote:
> >> >
> >>
> >> > 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.
> >>
> >
> > I didn't found any other similar bug introduced by 85b506bb.
> >
> > Attached the original patch provided by Michael with some regression
> tests.
>
> Thanks for adding a test, this looks fine to me (did some sanity
> checks and tutti-quanti for people wondering). On temporary tables
> this was failing with an error in md.c...
>

Thanks to both of you for fixing this.

I still, however, have a problem with the separate and original issue of:

# insert into utest (thing) values ('moomoo');
ERROR: index "utest_pkey" contains unexpected zero page at block 0
HINT: Please REINDEX it.

I don't see why the user should need to go re-indexing all unlogged tables
each time a standby is promoted. The index should just be empty and ready
to use.

--
Thom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-03-26 14:13:41 Re: Error with index on unlogged table
Previous Message Stephen Frost 2015-03-26 13:43:37 Re: GSSAPI, SSPI - include_realm default