Re: Large expressions in indexes can't be stored (non-TOASTable)
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alexander Lakhin <exclusion@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, "Jonathan S. Katz" <jkatz@postgresql.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-08T18:50:52Z
Lists: pgsql-hackers
Attachments
- v2-0001-add-RelationGetToastRelid-macro.patch (text/plain)
On Wed, Sep 25, 2024 at 01:05:26PM +0900, Michael Paquier wrote: > On Tue, Sep 24, 2024 at 02:26:08PM -0500, Nathan Bossart wrote: >> So... maybe we >> should just remove pg_replication_origin's TOAST table instead... > > I'd rather keep it, FWIW. Contrary to pg_authid it does not imply > problems at the same scale because we would have access to the toast > relation in all the code paths with logical workers or table syncs. > The other one was at early authentication stages. Okay. > It sounds to me that we should be much more proactive in detecting > these failures and add something like that on HEAD. That's cheap > enough. As the checks are the same for all these code paths, perhaps > just hide them behind a local macro to reduce the duplication? In v2, I moved the assertions to a new function called by the heapam.c routines. I was hoping to move them to the tableam.h routines, but several callers (in particular, the catalog/indexing.c ones that are causing problems) call the heap ones directly. I've also included a 0001 patch that introduces a RelationGetToastRelid() macro because I got tired of typing "rel->rd_rel->reltoastrelid". 0002 could probably use some more commentary, but otherwise I think it is in decent shape. You (Michael) seem to be implying that I should back-patch the actual fixes and only apply the new assertions to v18. Am I understanding you correctly? -- 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