Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XS8Wv-0001QS-28 for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Sep 2014 17:51:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XS8Wu-0005p3-If for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Sep 2014 17:51:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XS8Wt-0005os-K2 for pgsql-bugs@postgresql.org; Thu, 11 Sep 2014 17:51:35 +0000 Received: from cronos.madness.at ([2a02:16a8:dc41::10]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XS8Wq-0000qY-8n for pgsql-bugs@postgresql.org; Thu, 11 Sep 2014 17:51:34 +0000 Received: from mastermind.kaltenbrunner.cc ([2001:470:7a2d::22]) by cronos.madness.at with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XS8Wi-0008O2-47; Thu, 11 Sep 2014 19:51:29 +0200 Message-ID: <5411E105.7050409@kaltenbrunner.cc> Date: Thu, 11 Sep 2014 19:51:01 +0200 From: Stefan Kaltenbrunner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Andres Freund , Bruce Momjian CC: 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 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> In-Reply-To: <20140911174637.GD15099@alap3.anarazel.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 09/11/2014 07:46 PM, Andres Freund wrote: > 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. yeah that is what I would vote for as well, and this is way cleaner than emitting a textual warning. > >> 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. Definitly a feature that is interesting for other types of indexes, it would also lower the barrier for adding new index types to pg or at least make it cleaner for people playing with new ideas ones. Stefan -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs