diff options
author | Michael Paquier <michael@paquier.xyz> | 2021-11-25 15:04:56 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2021-11-25 15:04:56 +0900 |
commit | f0d43947a1b0c30f0bf2c117cd78bf95a3161268 (patch) | |
tree | 5b3e71341aa3bd1dd6d74ae06b09f6ca9dc36a92 /src/backend/access/gist/gistget.c | |
parent | 10260c794b211117a56ee2eb2deacf609bcca25f (diff) | |
download | postgresql-f0d43947a1b0c30f0bf2c117cd78bf95a3161268.tar.gz postgresql-f0d43947a1b0c30f0bf2c117cd78bf95a3161268.zip |
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/gist/gistget.c')
0 files changed, 0 insertions, 0 deletions