Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlIqI-00022m-RN for pgsql-bugs@arkaria.postgresql.org; Fri, 16 May 2014 14:10:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WlIqI-0000ID-7g for pgsql-bugs@arkaria.postgresql.org; Fri, 16 May 2014 14:10:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlIqG-0000Gv-Jd for pgsql-bugs@postgresql.org; Fri, 16 May 2014 14:10:32 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlIqE-0000yM-J8 for pgsql-bugs@postgresql.org; Fri, 16 May 2014 14:10:32 +0000 Received: from anarazel.de (p5DDC75CC.dip0.t-ipconnect.de [93.220.117.204]) by mrelayeu.kundenserver.de (node=mreue104) with ESMTP (Nemesis) id 0Lilwb-1XM0AO2hf3-00cx4o; Fri, 16 May 2014 16:10:17 +0200 Received: by anarazel.de (Postfix, from userid 1000) id F3A2A1006B4; Fri, 16 May 2014 16:10:16 +0200 (CEST) Date: Fri, 16 May 2014 16:10:16 +0200 From: Andres Freund To: Tom Lane Cc: Greg Stark , Olivier Macchioni , Bruce Momjian , PostgreSQL Bugs Subject: Re: Re: BUG #10329: Could not read block 0 in file "base/56100265/57047884": read only 0 of 8192 bytes Message-ID: <20140516141016.GD28158@awork2.anarazel.de> References: <20140515130945.4226.27569@wrigleys.postgresql.org> <26235.1400166587@sss.pgh.pa.us> <4EE3A338-8C14-4E1B-9F2B-479354765138@wingo.ch> <20140515190235.GH25053@momjian.us> <31390.1400180834@sss.pgh.pa.us> <4FB93C6A-2790-4167-931A-E53E6694F73E@wingo.ch> <31813.1400181933@sss.pgh.pa.us> <1361.1400247902@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1361.1400247902@sss.pgh.pa.us> X-Provags-ID: V02:K0:6c/8lkJXzm87L5dIUFD6thyg0QeCaiin61/IXd7V+EK 4+fpo4Of3TDlWSgLbq8iUHXnEXfDHOM/zXDEu+ceJuIscCRRJ6 elP0oZC9km4zm+UqOb/SJetAfRLtAMu8m0+jz87OotDJi1Wwsr hX7Li0cR48ZLTE4mifNGbAap+LN4p+0NyeCfaRp0INDlOyy/2w D3mcppntGWAUXhwuyAPtXw6X5XOEgqSTmkrkK3Yt6k0+LFkjQv QPrVRSi8+u3d2TS6rTklJ7V+KSn1/2hTuxDECoKnlYg8jUB8F6 fm8YYqNSqZ71NhXx8gIHFX40a3sc17wD+y/fpYq8yb7t143+IJ VbNvWwQGZu2jRv5+Q1STu6F4zeYiBcQLi/ETC4kC7 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 2014-05-16 09:45:02 -0400, Tom Lane wrote: > Greg Stark writes: > > On Thu, May 15, 2014 at 8:25 PM, Tom Lane wrote: > >> One of the arguments against Bruce's proposal to print a warning at hash > >> index creation is that it's a particularly ineffective form of > >> deprecation. In your example, since the hash index was created by some > >> app not manually, I'll bet nobody would have seen/noticed the warning > >> even if there had been one. > > > I suggested we make a GUC allow_unrecoverable_indexes and default it > > to false. If you want to create hash indexes you need to set it to > > true or else you just get errors. > > I still think this is throwing the error at the wrong place. People > will turn on the GUC the first time it gets in their way, and then > much later discover that the index doesn't work on a slave, and we'll > get a bug report exactly like this one. If there's one index within many as in this case it's likely to be accidental, right? So I think such a GUC might have helped to prevent the problem. > We need a check that is tightly > connected to actual unsafe usage, rather than basically-user-unfriendly > complaints at a point that's not doing anything unsafe. (Well, anything > more unsafe than it ever was.) I agree that that'd be nicer, but I haven't seen a nice proposal of how to do that yet. The best I can think of is to WAL LOG the removal of the entire relation the first time a hash index is used in a session, replacing it with a metapage that errors out when used. That should be doable. 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