Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XS9Zp-0003qR-Th for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Sep 2014 18:58:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XS9Zo-0004dh-Ef for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Sep 2014 18:58:40 +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 1XS9Zn-0004dV-Oc for pgsql-bugs@postgresql.org; Thu, 11 Sep 2014 18:58:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XS9Zl-0001Hd-1h for pgsql-bugs@postgresql.org; Thu, 11 Sep 2014 18:58:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s8BIwDQv022394; Thu, 11 Sep 2014 14:58:13 -0400 From: Tom Lane To: Andres Freund cc: Bruce Momjian , 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 In-reply-to: <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> <20140911174637.GD15099@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 11 Sep 2014 19:46:37 +0200" Date: Thu, 11 Sep 2014 14:58:13 -0400 Message-ID: <22393.1410461893@sss.pgh.pa.us> X-Pg-Spam-Score: -4.4 (----) 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 Andres Freund writes: > On 2014-09-11 13:41:37 -0400, Bruce Momjian wrote: >> 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. Yeah, we'd need to somehow mark such indexes as INVALID during crash recovery, which sounds pretty messy. We've stayed away from the whole idea of automatically-applied catalog updates during recovery, for good reasons. > Yes, I > think forbidding unlogged hash tables + teaching pg_dump a heuristic to > treat any < 9.x hash index as unlogged would be ok. My own opinion, if we had the infrastructure, is that "CREATE INDEX ... USING hash" should result in (1) automatically adding the UNLOGGED attribute and (2) issuing a NOTICE or WARNING stating that we've done so. Throwing an error, when we do not do so today, is just being a nag. This approach also eliminates the need to do anything special in pg_dump, which is a good thing since we have no way to retroactively fix existing dump files. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs