Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XS8SD-0001FY-D3 for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Sep 2014 17:46:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XS8SC-0003ZG-Q9 for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Sep 2014 17:46:44 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XS8SB-0003Z9-QP for pgsql-bugs@postgresql.org; Thu, 11 Sep 2014 17:46:43 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XS8S8-0008Pn-4E for pgsql-bugs@postgresql.org; Thu, 11 Sep 2014 17:46:42 +0000 Received: from intern.anarazel.de (p54AF4D40.dip0.t-ipconnect.de [84.175.77.64]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id BBE79520002; Thu, 11 Sep 2014 19:46:37 +0200 (CEST) Date: Thu, 11 Sep 2014 19:46:37 +0200 From: Andres Freund To: Bruce Momjian Cc: Stefan Kaltenbrunner , Alvaro Herrera , David G Johnston , pgsql-bugs@postgresql.org Subject: Re: Re: BUG #10329: Could not read block 0 in file "base/56100265/57047884": read only 0 of 8192 bytes Message-ID: <20140911174637.GD15099@alap3.anarazel.de> References: <1361.1400247902@sss.pgh.pa.us> <20140516144825.GL25053@momjian.us> <20140906150743.GC20146@momjian.us> <20140907014245.GJ14037@eldon.alvh.no-ip.org> <20140908134502.GB13690@momjian.us> <5411DAF9.4040003@kaltenbrunner.cc> <20140911172923.GC15099@alap3.anarazel.de> <20140911174137.GI16199@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140911174137.GI16199@momjian.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2014-09-11 13:41:37 -0400, Bruce Momjian wrote: > > > 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 like an almost trivial problem in comparison to the actual difficulty of implementing UNLOGGED indexed on LOGGED tables. Yes, I think forbidding unlogged hash tables + teaching pg_dump a heuristic to treat any < 9.x hash index as unlogged would be ok. > That seems to defeat the purpose of this. Why? It makes hash indexes usable for the cases where it's safe to do so. Great! It also adds a feature which is really interesting for other types of indexes. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs