Re: Hash index creation warning - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Hash index creation warning
Date
Msg-id CAMsr+YH9DyvDAZk0ZracBXoQY72mJnNOPVZ+jHga7J_TJftruA@mail.gmail.com
Whole thread Raw
In response to Re: Hash index creation warning  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Hash index creation warning  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On 18 October 2014 at 02:36, Bruce Momjian <bruce@momjian.us> wrote:
> On Fri, Oct 17, 2014 at 12:56:52PM -0400, Tom Lane wrote:
>> David G Johnston <david.g.johnston@gmail.com> writes:
>> > The question is whether we explain the implications of not being WAL-logged
>> > in an error message or simply state the fact and let the documentation
>> > explain the hazards - basically just output:
>> > "hash indexes are not WAL-logged and their use is discouraged"
>>
>> +1.  The warning message is not the place to be trying to explain all the
>> details.

While I don't think it should explain all the details, "WAL-logged"
will mean *nothing* to most users, including most of those who're
using streaming replication, PITR, etc.

I would strongly prefer to see something that conveys some meaning to
a user who doesn't know PostgreSQL's innards, since by the time "WAL
logged" means much to you, you've got a good chance of having already
learned that hash indexes aren't crash-safe. Or of reading the manual.

Perhaps:

WARNING: hash indexes are not crash-safe, not replicated, and their
use is discouraged

?

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_stat_*_columns?
Next
From: Peter Geoghegan
Date:
Subject: Re: Hash index creation warning