Re: Large expressions in indexes can't be stored (non-TOASTable)
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: "Jonathan S. Katz" <jkatz@postgresql.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-09-04T18:40:49Z
Lists: pgsql-hackers
Attachments
- v1-0001-add-toast-table-to-pg_index.patch (text/plain)
On Tue, Sep 03, 2024 at 12:35:42PM -0400, Jonathan S. Katz wrote: > However, I ran into the issue in[1], where pg_index was identified as > catalog that is missing a toast table, even though `indexprs` is marked for > extended storage. Providing a very simple reproducer in psql below: Thanks to commit 96cdeae, only a few catalogs remain that are missing TOAST tables: pg_attribute, pg_class, pg_index, pg_largeobject, and pg_largeobject_metadata. I've attached a short patch to add one for pg_index, which resolves the issue cited here. This passes "check-world" and didn't fail for a few ad hoc tests (e.g., VACUUM FULL on pg_index). I haven't spent too much time investigating possible circularity issues, but I'll note that none of the system indexes presently use the indexprs and indpred columns. If we do want to proceed with adding a TOAST table to pg_index, IMHO it would be better to do it sooner than later so that it has plenty of time to bake. -- nathan
Commits
-
Ensure we have a snapshot when updating various system catalogs.
- fe8ea7a2a893 17.6 landed
- ddfcfb7cec68 15.14 landed
- b7ba2c0308ce 13.22 landed
- b65be6ef00e2 14.19 landed
- 706054b11b95 18.0 landed
- 24135398f1e1 16.10 landed
-
Remove pg_replication_origin's TOAST table.
- 16bf24e0e471 18.0 landed
-
Restrict password hash length.
- 8275325a06ed 18.0 cited
-
Ensure we have a snapshot when updating pg_index entries.
- b52adbad4674 18.0 landed
-
Add TOAST table to pg_index.
- b52c4fc3c09e 18.0 landed
-
Add toast tables to most system catalogs
- 96cdeae07f93 12.0 cited