Re: using index or check in ALTER TABLE SET NOT NULL

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@lists.postgresql.org,Stephen Frost <sfrost@snowman.net>,Robert Haas <robertmhaas@gmail.com>
Cc: Sergei Kornilov <sk@zsrv.org>,Tom Lane <tgl@sss.pgh.pa.us>,"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-11-29T16:55:02Z
Lists: pgsql-hackers

On November 29, 2017 8:50:31 AM PST, Stephen Frost <sfrost@snowman.net> wrote:
>As for conflicting snapshots, isn't the lock we're taking already
>AccessExclusive..?

Doesn't help if e.g. the current xact is repeatable read or if your own xact deleted things (other xacts with snapshots could still see null rows, despite new take definition). 

Andres
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Commits

  1. Avoid using INFO elevel for what are fundamentally debug messages.

  2. Revert setting client_min_messages to 'debug1' in new tests.

  3. Allow ALTER TABLE .. SET NOT NULL to skip provably unnecessary scans.

  4. Improve predtest.c's internal docs, and enhance its functionality a bit.