1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00
Files
postgres/src/backend/commands
Tom Lane 4c985549fe Fix ALTER COLUMN TYPE to not open a relation without any lock.
If the column being modified is referenced by a foreign key constraint
of another table, ALTER TABLE would open the other table (to re-parse
the constraint's definition) without having first obtained a lock on it.
This was evidently intentional, but that doesn't mean it's really safe.
It's especially not safe in 9.3, which pre-dates use of MVCC scans for
catalog reads, but even in current releases it doesn't seem like a good
idea.

We know we'll need AccessExclusiveLock shortly to drop the obsoleted
constraint, so just get that a little sooner to close the hole.

Per testing with a patch that complains if we open a relation without
holding any lock on it.  I don't plan to back-patch that patch, but we
should close the holes it identifies in all supported branches.

Discussion: https://postgr.es/m/2038.1538335244@sss.pgh.pa.us
2018-10-01 11:39:13 -04:00
..
2018-04-26 14:47:16 -04:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-07-18 16:17:42 +03:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-03-16 13:18:06 -04:00
2018-01-02 23:30:12 -05:00
2018-03-16 13:18:06 -04:00
2018-04-26 14:47:16 -04:00
2018-04-26 14:47:16 -04:00
2018-04-26 14:47:16 -04:00
2018-04-12 11:22:56 +01:00
2018-01-02 23:30:12 -05:00
2018-04-26 14:47:16 -04:00
2018-04-07 17:45:39 -04:00
2018-01-19 14:01:15 -05:00
2018-01-02 23:30:12 -05:00
2018-08-21 15:17:25 +09:00