Re: Re: BUG #10329: Could not read block 0 in file "base/56100265/57047884": read only 0 of 8192 bytes

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Re: BUG #10329: Could not read block 0 in file "base/56100265/57047884": read only 0 of 8192 bytes
Date: 2014-09-11 17:41:37
Message-ID: 20140911174137.GI16199@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Sep 11, 2014 at 07:29:23PM +0200, Andres Freund wrote:
> On 2014-09-11 19:25:13 +0200, Stefan Kaltenbrunner wrote:
> > On 09/08/2014 03:45 PM, Bruce Momjian wrote:
> > > On Sat, Sep 6, 2014 at 09:42:45PM -0400, Alvaro Herrera wrote:
> > >> Bruce Momjian wrote:
> > >>
> > >>> Here is a patch which implements the warning during CREATE INDEX ...
> > >>> HASH. If WAL-logging of hash indexes is ever implemented, we can remove
> > >>> this warning.
> > >>
> > >> I think we should have CREATE UNLOGGED INDEX, and simply disallow any
> > >> hash index from being created unless it's marked as such.
> > >
> > > Wow, that sounds much more radical than we discussed. Seeing I got
> > > push-back just for the warning, I don't see how disabling "logged" WAL
> > > indexes is going to be accepted.
> > >
> > > It is a good idea, though. :-)
> >
> > I agree there - implementing CREATE UNLOGGED INDEX and use THAT for hash
> > indexes seems like a fairly clean thing to me, hash indexes _are_
> > unlogged so lets reflect that directly.
> > I could even envision pg_dump doing that conversion automatically...
>
> I think this did came up as a solution before. It's just that nobody
> found a reasonably easy and clean way to do unlogged indexes on logged
> tables so far. It's far from trivial.

And practically, how would we implement this for upgrades? Would we have
pg_dump emit UNLOGGED for any hash creation command? That seems to
defeat the purpose of this.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2014-09-11 17:46:37 Re: Re: BUG #10329: Could not read block 0 in file "base/56100265/57047884": read only 0 of 8192 bytes
Previous Message Bruce Momjian 2014-09-11 17:40:29 Re: Re: BUG #10329: Could not read block 0 in file "base/56100265/57047884": read only 0 of 8192 bytes