Currently if you try to create a too large policy, it fails with: ERROR: row is too big: size XXXXX, maximum size 8160
An example for reproducing this is attached. Looking at the issue, the problem seems to be missing toast table for pg_policy. Also attached is a one line patch. It isn't clear to me whether this is a candidate for backpatching. Thoughts? -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development
diff --git a/src/include/catalog/toasting.h b/src/include/catalog/toasting.h index f6387ae143..10348bcbfe 100644 --- a/src/include/catalog/toasting.h +++ b/src/include/catalog/toasting.h @@ -49,6 +49,7 @@ extern void BootstrapToastTable(char *relName, DECLARE_TOAST(pg_attrdef, 2830, 2831); DECLARE_TOAST(pg_constraint, 2832, 2833); DECLARE_TOAST(pg_description, 2834, 2835); +DECLARE_TOAST(pg_policy, 2579, 2580); DECLARE_TOAST(pg_proc, 2836, 2837); DECLARE_TOAST(pg_rewrite, 2838, 2839); DECLARE_TOAST(pg_seclabel, 3598, 3599);
large-policy-error.sql
Description: application/sql
signature.asc
Description: OpenPGP digital signature