Re: 9.5rc1 brin_summarize_new_values

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 9.5rc1 brin_summarize_new_values
Date: 2015-12-27 02:44:32
Message-ID: CAB7nPqQcqUCBz8-ayodm9PmxT2uSQBZyPUDW=BN8Unn8NYE9pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 27, 2015 at 1:27 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
>> On Sat, Dec 26, 2015 at 7:10 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
>> What do you think about the attached?
>
> Don't like that as-is, because dropping and re-acquiring the index lock
> presents a race condition: the checks you made might not apply anymore.
> Admittedly, the odds of a problem are very small, but it's still an
> insecure coding pattern.
>
> I hesitate to produce code without having consumed any caffeine yet,
> but maybe we could do it like this:
>
> [...]

I see, thanks! The lesson is learnt.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2015-12-27 04:44:04 Re: WIP: Covering + unique indexes.
Previous Message Michael Paquier 2015-12-27 02:32:28 Re: oldest/newestCommitTs output by pg_controldata