diff options
author | Michael Paquier <michael@paquier.xyz> | 2021-11-25 15:05:28 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2021-11-25 15:05:28 +0900 |
commit | 37827de430deba44f373db1e4efae0c9e320ef2d (patch) | |
tree | b81edd6e643505f3e58e5d6a1131717e42ff9815 /src/backend/access/transam/xlogreader.c | |
parent | 499552273d47645c759d58c5916b3bc8ecc7f13d (diff) |
Block ALTER TABLE .. DROP NOT NULL on columns in replica identity index
Replica identities that depend directly on an index rely on a set of
properties, one of them being that all the columns defined in this index
have to be marked as NOT NULL. There was a hole in the logic with ALTER
TABLE DROP NOT NULL, where it was possible to remove the NOT NULL
property of a column part of an index used as replica identity, so block
it to avoid problems with logical decoding down the road.
The same check was already done columns part of a primary key, so the
fix is straight-forward.
Author: Haiying Tang, Hou Zhijie
Reviewed-by: Dilip Kumar, Michael Paquier
Discussion: https://postgr.es/m/OS0PR01MB6113338C102BEE8B2FFC5BD9FB619@OS0PR01MB6113.jpnprd01.prod.outlook.com
Backpatch-through: 10
Diffstat (limited to 'src/backend/access/transam/xlogreader.c')
0 files changed, 0 insertions, 0 deletions