Re: [sqlsmith] Failed assertion in _hash_kill_items/MarkBufferDirtyHint

From: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andreas Seltenreich <seltenreich(at)gmx(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: [sqlsmith] Failed assertion in _hash_kill_items/MarkBufferDirtyHint
Date: 2017-04-01 12:47:02
Message-ID: CAE9k0Pm8L3BbVOc-AcbWH+pMnB3R300QdBjUs5Hczg0Kd252+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Apr 1, 2017 18:11, "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com> wrote:

On Sat, Apr 1, 2017 at 6:00 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Mar 31, 2017 at 6:09 PM, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
wrote:
>> Well, That is another option but the main idea was to be inline with
>> the btree code.
>
> That's not a bad goal in principal, but _bt_killitems() doesn't have
> any similar argument.
>
> (Also, speaking of consistency, why did we end up with
> _hash_kill_items, with an underscore between kill and items, and
> _bt_killitems, without one?)
>
>> Moreover, I am not sure if acquiring lwlock inside
>> hashendscan (basically the place where we are trying to close down the
>> things) would look good.
>
> Well, if that's not a good thing to do, hiding it inside some other
> function doesn't make it better. I think it's fine, though.
>

One thing to note here is that this fix won't be required if we get
the page-scan-mode patch [1] in this CF. I think if we fix this with
the patch proposed by Ashutosh, then we anyway needs to again change
the related code (kind of revert the fix) after page-scan-mode patch.
Now, if you think we have negligible chance of getting that patch,
then it is good to proceed with this fix.

Yes, I had already mentioned this point in my very first mail. Thanks for
highlighting this once again.

[1] - https://commitfest.postgresql.org/13/999/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message anant khandelwal 2017-04-01 14:03:57 GSoC 2017 Proposal for "Explicitly support predicate locks in index access methods besides btree"
Previous Message Amit Kapila 2017-04-01 12:41:28 Re: [sqlsmith] Failed assertion in _hash_kill_items/MarkBufferDirtyHint