From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <stark@mit.edu>
Cc: Olivier Macchioni <olivier.macchioni@wingo.ch>
Cc: PostgreSQL Bugs <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
Date: Fri, 16 May 2014 10:48:25 -0400
Message-ID: <20140516144825.GL25053@momjian.us> (raw)
In-Reply-To: <1361.1400247902@sss.pgh.pa.us>
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>
<CAM-w4HOAp903Fd_KU9Ur0wmYWncawthGKS4qqHBPmYy5NEJvHA@mail.gmail.com>
<1361.1400247902@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On Fri, May 16, 2014 at 09:45:02AM -0400, Tom Lane wrote:
> Greg Stark <stark@mit.edu> writes:
> > On Thu, May 15, 2014 at 8:25 PM, Tom Lane <tgl@sss.pgh.pa.us> 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. 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.)
Well, at this point we are decade into having crash-unsafe hash indexes,
and rather than getting better, the issue has gotten worse with
streaming replication. If we can't find the best way to warn people,
let's find _a_ way, at least.
I feel we are waiting for the calvary to come over the hill (and fix
hash indexes), except the calvary never arrives. At some point we have
to take ownership of the situation we are in and actively do something.
If someone today tried to add a crash-unsafe, replication-impotent
index, it would never be accepted, but because hash indexes came from
Berkeley, we go with a warning in the CREATE INDEX manual page and do
nothing more. I can't think of any other foot-gun feature that is
allowed to remain with so little user warning.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: bruce@momjian.us, tgl@sss.pgh.pa.us, stark@mit.edu, olivier.macchioni@wingo.ch
Subject: Re: BUG #10329: Could not read block 0 in file "base/56100265/57047884": read only 0 of 8192 bytes
In-Reply-To: <20140516144825.GL25053@momjian.us>
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> <CAM-w4HOAp903Fd_KU9Ur0wmYWncawthGKS4qqHBPmYy5NEJvHA@mail.gmail.com> <1361.1400247902@sss.pgh.pa.us> <20140516144825.GL25053@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox