Re: Hash index creation warning

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hash index creation warning
Date: 2015-06-24 08:45:52
Message-ID: CAMsr+YH9DyvDAZk0ZracBXoQY72mJnNOPVZ+jHga7J_TJftruA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18 October 2014 at 02:36, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Fri, Oct 17, 2014 at 12:56:52PM -0400, Tom Lane wrote:
>> David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-06-24 08:53:45 Re: Hash index creation warning
Previous Message Andres Freund 2015-06-24 08:43:43 Re: pg_stat_*_columns?