On Sun, Dec 27, 2015 at 1:27 AM, Tom Lane <[email protected]> wrote: > Michael Paquier <[email protected]> writes: >> On Sat, Dec 26, 2015 at 7:10 AM, Jeff Janes <[email protected]> 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 -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
