agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) 7+ messages / 1 participants [nested] [flat]
* pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) @ 2026-09-27 21:55 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2026-09-27 21:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Enforce pg_class.relchecks limit (32,767 or INT16_MAX) pg_class.relchecks reports the number of CHECK constraints in a table, and is stored within a smallint. It was possible to define a table that could overflow the counter when specifying more than 32k constraints (new table or adding a constraint). This would cause the table to become undroppable, as this counter should never be negative when dropping these constraints. Author: Matthias van de Meent <boekewurm+postgres@gmail.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Jian He <jian.universality@gmail.com> Reviewed-by: Sivaprasad <sivaprasad.postgres@gmail.com> Discussion: https://postgr.es/m/CAEze2WjSW4qaHYnvkTtbknp85eGEirGJTLMZatotdJJKiA+_hA@mail.gmail.com Backpatch-through: 14 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5e59290402518db5b2876ecd627c7d79f73eaa44 Modified Files -------------- doc/src/sgml/limits.sgml | 7 +++++++ src/backend/catalog/heap.c | 28 +++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) @ 2026-09-27 21:55 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2026-09-27 21:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Enforce pg_class.relchecks limit (32,767 or INT16_MAX) pg_class.relchecks reports the number of CHECK constraints in a table, and is stored within a smallint. It was possible to define a table that could overflow the counter when specifying more than 32k constraints (new table or adding a constraint). This would cause the table to become undroppable, as this counter should never be negative when dropping these constraints. Author: Matthias van de Meent <boekewurm+postgres@gmail.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Jian He <jian.universality@gmail.com> Reviewed-by: Sivaprasad <sivaprasad.postgres@gmail.com> Discussion: https://postgr.es/m/CAEze2WjSW4qaHYnvkTtbknp85eGEirGJTLMZatotdJJKiA+_hA@mail.gmail.com Backpatch-through: 14 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b80d5b17ea3cff60370e08983546bd7b1e4298bd Modified Files -------------- doc/src/sgml/limits.sgml | 7 +++++++ src/backend/catalog/heap.c | 28 +++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) @ 2026-09-27 21:55 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2026-09-27 21:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Enforce pg_class.relchecks limit (32,767 or INT16_MAX) pg_class.relchecks reports the number of CHECK constraints in a table, and is stored within a smallint. It was possible to define a table that could overflow the counter when specifying more than 32k constraints (new table or adding a constraint). This would cause the table to become undroppable, as this counter should never be negative when dropping these constraints. Author: Matthias van de Meent <boekewurm+postgres@gmail.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Jian He <jian.universality@gmail.com> Reviewed-by: Sivaprasad <sivaprasad.postgres@gmail.com> Discussion: https://postgr.es/m/CAEze2WjSW4qaHYnvkTtbknp85eGEirGJTLMZatotdJJKiA+_hA@mail.gmail.com Backpatch-through: 14 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/652a2f6fb9415e30e1115a34da9fc7c8f5eb4773 Modified Files -------------- doc/src/sgml/limits.sgml | 7 +++++++ src/backend/catalog/heap.c | 28 +++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) @ 2026-09-27 21:55 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2026-09-27 21:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Enforce pg_class.relchecks limit (32,767 or INT16_MAX) pg_class.relchecks reports the number of CHECK constraints in a table, and is stored within a smallint. It was possible to define a table that could overflow the counter when specifying more than 32k constraints (new table or adding a constraint). This would cause the table to become undroppable, as this counter should never be negative when dropping these constraints. Author: Matthias van de Meent <boekewurm+postgres@gmail.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Jian He <jian.universality@gmail.com> Reviewed-by: Sivaprasad <sivaprasad.postgres@gmail.com> Discussion: https://postgr.es/m/CAEze2WjSW4qaHYnvkTtbknp85eGEirGJTLMZatotdJJKiA+_hA@mail.gmail.com Backpatch-through: 14 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9ca1d5726c21e3ae182ce461d439e360a0658ad8 Modified Files -------------- doc/src/sgml/limits.sgml | 7 +++++++ src/backend/catalog/heap.c | 28 +++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) @ 2026-09-27 21:55 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2026-09-27 21:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Enforce pg_class.relchecks limit (32,767 or INT16_MAX) pg_class.relchecks reports the number of CHECK constraints in a table, and is stored within a smallint. It was possible to define a table that could overflow the counter when specifying more than 32k constraints (new table or adding a constraint). This would cause the table to become undroppable, as this counter should never be negative when dropping these constraints. Author: Matthias van de Meent <boekewurm+postgres@gmail.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Jian He <jian.universality@gmail.com> Reviewed-by: Sivaprasad <sivaprasad.postgres@gmail.com> Discussion: https://postgr.es/m/CAEze2WjSW4qaHYnvkTtbknp85eGEirGJTLMZatotdJJKiA+_hA@mail.gmail.com Backpatch-through: 14 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4cbac6287126cfb5af46c750cf7828c0d997456c Modified Files -------------- doc/src/sgml/limits.sgml | 7 +++++++ src/backend/catalog/heap.c | 29 ++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) @ 2026-09-27 21:55 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2026-09-27 21:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Enforce pg_class.relchecks limit (32,767 or INT16_MAX) pg_class.relchecks reports the number of CHECK constraints in a table, and is stored within a smallint. It was possible to define a table that could overflow the counter when specifying more than 32k constraints (new table or adding a constraint). This would cause the table to become undroppable, as this counter should never be negative when dropping these constraints. Author: Matthias van de Meent <boekewurm+postgres@gmail.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Jian He <jian.universality@gmail.com> Reviewed-by: Sivaprasad <sivaprasad.postgres@gmail.com> Discussion: https://postgr.es/m/CAEze2WjSW4qaHYnvkTtbknp85eGEirGJTLMZatotdJJKiA+_hA@mail.gmail.com Backpatch-through: 14 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9dad054b56da6758d8d094a2e70d87536a2f3e35 Modified Files -------------- doc/src/sgml/limits.sgml | 7 +++++++ src/backend/catalog/heap.c | 29 ++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) @ 2026-09-27 21:55 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2026-09-27 21:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Enforce pg_class.relchecks limit (32,767 or INT16_MAX) pg_class.relchecks reports the number of CHECK constraints in a table, and is stored within a smallint. It was possible to define a table that could overflow the counter when specifying more than 32k constraints (new table or adding a constraint). This would cause the table to become undroppable, as this counter should never be negative when dropping these constraints. Author: Matthias van de Meent <boekewurm+postgres@gmail.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Jian He <jian.universality@gmail.com> Reviewed-by: Sivaprasad <sivaprasad.postgres@gmail.com> Discussion: https://postgr.es/m/CAEze2WjSW4qaHYnvkTtbknp85eGEirGJTLMZatotdJJKiA+_hA@mail.gmail.com Backpatch-through: 14 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3eff6531d1d7870990bea7baa08a7d2b5868cda3 Modified Files -------------- doc/src/sgml/limits.sgml | 7 +++++++ src/backend/catalog/heap.c | 29 ++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2026-09-27 21:55 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-09-27 21:55 pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) Michael Paquier <michael@paquier.xyz> 2026-09-27 21:55 pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) Michael Paquier <michael@paquier.xyz> 2026-09-27 21:55 pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) Michael Paquier <michael@paquier.xyz> 2026-09-27 21:55 pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) Michael Paquier <michael@paquier.xyz> 2026-09-27 21:55 pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) Michael Paquier <michael@paquier.xyz> 2026-09-27 21:55 pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) Michael Paquier <michael@paquier.xyz> 2026-09-27 21:55 pgsql: Enforce pg_class.relchecks limit (32,767 or INT16_MAX) Michael Paquier <michael@paquier.xyz>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox