pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit 6+ messages / 1 participants [nested] [flat]
* pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit @ 2021-11-25 06:06 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2021-11-25 06:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/dffe80e5500dc116d39929d8f91f906621bd2d9c Modified Files -------------- src/backend/commands/tablecmds.c | 31 ++++++++++++++++++-------- src/test/regress/expected/replica_identity.out | 4 ++++ src/test/regress/sql/replica_identity.sql | 4 ++++ 3 files changed, 30 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit @ 2021-11-25 06:06 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2021-11-25 06:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f0d43947a1b0c30f0bf2c117cd78bf95a3161268 Modified Files -------------- src/backend/commands/tablecmds.c | 31 ++++++++++++++++++-------- src/test/regress/expected/replica_identity.out | 4 ++++ src/test/regress/sql/replica_identity.sql | 4 ++++ 3 files changed, 30 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit @ 2021-11-25 06:06 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2021-11-25 06:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e415916e24ccf28a88d87182e716beace9820753 Modified Files -------------- src/backend/commands/tablecmds.c | 31 ++++++++++++++++++-------- src/test/regress/expected/replica_identity.out | 4 ++++ src/test/regress/sql/replica_identity.sql | 4 ++++ 3 files changed, 30 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit @ 2021-11-25 06:06 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2021-11-25 06:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/37827de430deba44f373db1e4efae0c9e320ef2d Modified Files -------------- src/backend/commands/tablecmds.c | 31 ++++++++++++++++++-------- src/test/regress/expected/replica_identity.out | 4 ++++ src/test/regress/sql/replica_identity.sql | 4 ++++ 3 files changed, 30 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit @ 2021-11-25 06:06 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2021-11-25 06:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/216156fec3d885842e2ceffa3a5321fbcd2fe575 Modified Files -------------- src/backend/commands/tablecmds.c | 31 ++++++++++++++++++-------- src/test/regress/expected/replica_identity.out | 4 ++++ src/test/regress/sql/replica_identity.sql | 4 ++++ 3 files changed, 30 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit @ 2021-11-25 06:06 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2021-11-25 06:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/817c469c2a167518a7cb44a84c996c7d11a728e4 Modified Files -------------- src/backend/commands/tablecmds.c | 31 ++++++++++++++++++-------- src/test/regress/expected/replica_identity.out | 4 ++++ src/test/regress/sql/replica_identity.sql | 4 ++++ 3 files changed, 30 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2021-11-25 06:06 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-11-25 06:06 pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit Michael Paquier <michael@paquier.xyz> 2021-11-25 06:06 pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit Michael Paquier <michael@paquier.xyz> 2021-11-25 06:06 pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit Michael Paquier <michael@paquier.xyz> 2021-11-25 06:06 pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit Michael Paquier <michael@paquier.xyz> 2021-11-25 06:06 pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit Michael Paquier <michael@paquier.xyz> 2021-11-25 06:06 pgsql: Block ALTER TABLE .. DROP NOT NULL on columns in replica identit Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox