Reduce lock level for ALTER TABLE ... ADD CHECK .. NOT VALID

From: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Reduce lock level for ALTER TABLE ... ADD CHECK .. NOT VALID
Date: 2021-04-22 12:00:40
Message-ID: CANbhV-EUvRNs1zMdkXFeBg=Bqn8v0bm_qn3orrBwAJa3gZq6kA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

897795240cfaaed724af2f53ed2c50c9862f951f forgot to reduce the lock
level for CHECK constraints when allowing them to be NOT VALID.

This is simple and safe, since check constraints are not used in
planning until validated.

--
Simon Riggs http://www.EnterpriseDB.com/

Attachment Content-Type Size
alter_table_add_check_constraint_reduce_lock_level.v1.patch application/octet-stream 2.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2021-04-22 12:17:08 Re: posgres 12 bug (partitioned table)
Previous Message Dilip Kumar 2021-04-22 11:50:48 Re: decoupling table and index vacuum