Re: using index or check in ALTER TABLE SET NOT NULL
Ildar Musin <i.musin@postgrespro.ru>
From: Ildar Musin <i.musin@postgrespro.ru>
To: Sergei Kornilov <sk@zsrv.org>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Stephen Frost <sfrost@snowman.net>, Robert Haas <robertmhaas@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2018-03-15T14:31:50Z
Lists: pgsql-hackers
Hello Sergei, On 10.03.2018 12:35, Sergei Kornilov wrote: > Hello My patch does not apply after commit > 5748f3a0aa7cf78ac6979010273bd9d50869bb8e. Here is update to current > master. Not null constraint is immutable too, so here is no changes > in PartConstraintImpliedByRelConstraint excepts rename and comments > fix. > > In this patch version i also revert tests to v4 state: i use DEBUG > ereport instead INFO and code path not tested. Please tell me if i > must change tests some way. > > regards, Sergei > Ok, I can't think of any other ways to test it so I have to agree with Tom Lane i.e. rely only on coverage. (There also were another suggestion to use statistics [select seq_scan from pg_stat_user_tables where relid='test'::regclass] which show number of table scans. But statistics is collected by stat collector process with some latency and hence cannot be reliable for tests). Patch seems correct to me, it applies and compiles cleanly, docs compiles as well, tests pass. Changed status to Ready for Committer. -- Ildar Musin i.musin@postgrespro.ru
Commits
-
Avoid using INFO elevel for what are fundamentally debug messages.
- db438318997b 13.0 landed
- 121e3ceed6d9 12.0 landed
-
Revert setting client_min_messages to 'debug1' in new tests.
- 5655565c077c 12.0 landed
-
Allow ALTER TABLE .. SET NOT NULL to skip provably unnecessary scans.
- bbb96c3704c0 12.0 landed
-
Improve predtest.c's internal docs, and enhance its functionality a bit.
- 5748f3a0aa7c 11.0 cited