mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Extend ALTER TABLE to allow Foreign Keys to be added without initial validation.
FK constraints that are marked NOT VALID may later be VALIDATED, which uses an ShareUpdateExclusiveLock on constraint table and RowShareLock on referenced table. Significantly reduces lock strength and duration when adding FKs. New state visible from psql. Simon Riggs, with reviews from Marko Tiikkaja and Robert Haas
This commit is contained in:
@ -422,6 +422,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString,
|
||||
CONSTRAINT_TRIGGER,
|
||||
stmt->deferrable,
|
||||
stmt->initdeferred,
|
||||
true,
|
||||
RelationGetRelid(rel),
|
||||
NULL, /* no conkey */
|
||||
0,
|
||||
|
Reference in New Issue
Block a user