Re: Large expressions in indexes can't be stored (non-TOASTable)
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Euler Taveira <euler@eulerto.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, 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: 2025-04-09T04:20:29Z
Lists: pgsql-hackers
On Tue, Apr 08, 2025 at 11:21:31PM -0300, Euler Taveira wrote: > The logical replication creates origin names as pg_SUBOID_RELID or pg_SUBOID. > It means the maximum origin name is 24. This limited origin name also applies > to pglogical that limits the name to 54 IIRC. I think that covers the majority > of the logical replication setups. There might be a small number of custom > logical replication systems that possibly use long names for replication > origin. I've never seen a replication origin name longer than NAMEDATALEN. pg_replication_origin_create() can be used with text as input for the origin name, still your argument sounds sensible here as I would suspect that most setups of logical replication are these. > If you consider that the maximum number of replication origin is limited to 2 > bytes (65k distinct names), it is reasonable to restrict the replication > origin names to 512 due to the high number of combinations. We generally > expects that a catalog string uses "name" as type if it is an identifier; it > could be the case for roname if author decided to be strict. I would be more cautious than a limit on NAMEDATALEN. The restriction suggested by Nathan at 512 bytes should be plenty enough. > This additional TOAST table has no or rare use. +1 for removing it. It is one > less file, one less table and one less index; in short, one less source of data > corruption. ;) I guess that's the consensus, then. No objections to the removal here. -- Michael
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