Re: Hash index creation warning

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Thom Brown <thom(at)linux(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hash index creation warning
Date: 2015-06-23 15:27:36
Message-ID: CA+TgmoZuFkirNYRmZMNzpwyv_SXLRcqOVikKfa4JtMeUUGyf-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 22, 2015 at 8:46 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Tue, Jun 23, 2015 at 9:06 AM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
>> On 6/12/15 5:00 PM, Thom Brown wrote:
>>>
>>> On 18 October 2014 at 15:36, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>>>
>>>> On Fri, Oct 17, 2014 at 02:36:55PM -0400, Bruce Momjian 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.
>>>>>
>>>>>
>>>>> OK, updated patch attached.
>>>>
>>>>
>>>> Patch applied.
>>>
>>>
>>> I only just noticed this item when I read the release notes. Should
>>> we bother warning when used on an unlogged table?
>>
>>
>> Not really; but I think the bigger question at this point is if we want to
>> change it this late in the game.
>
> Changing it even during beta looks acceptable to me. I think that it
> is mainly a matter to have a patch (here is one), and someone to push
> it as everybody here seem to agree that for UNLOGGED tables this
> warning has little sense.

I think you should be testing RelationNeedsWAL(), not the
relpersistence directly. The same point applies for temporary
indexes.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2015-06-23 16:29:46 btree_gin and BETWEEN
Previous Message Robert Haas 2015-06-23 15:24:52 Re: less log level for success dynamic background workers for 9.5