Re: hash index on unlogged tables doesn't behave as expected

Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>

From: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
To: robertmhaas@gmail.com
Cc: amit.kapila16@gmail.com, michael.paquier@gmail.com, ashu.coek88@gmail.com, pgsql-hackers@postgresql.org
Date: 2017-09-22T00:16:35Z
Lists: pgsql-hackers
At Thu, 21 Sep 2017 16:19:27 -0400, Robert Haas <robertmhaas@gmail.com> wrote in <694CB417-EF2C-4760-863B-AEC4530C21E3@gmail.com>
> On Sep 21, 2017, at 8:59 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:.
> > I think giving an error message like "hash indexes are not WAL-logged
> > and .." for unlogged tables doesn't seem like a good behavior.
> 
> +1. This seems like deliberate behavior, not a bug.

Though I don't see it's bug and agree that the message is not
proper, currently we can create hash indexes without no warning
on unlogged tables and it causes a problem with replication.

The point here is that if we leave the behavior (failure on the
standby) for the reason that we see a warning on index creation,
a similar messages ought to be for unlogged tables.

Otherwise, our decision will be another option.

(4) Though we won't not see a warning on hash index creation on
  unlogged tables, it seems to have been a problem and won't
  mind.
 
regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. hash: Fix write-ahead logging bugs related to init forks.

  2. Issue a warning during the creation of hash indexes