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
signature.asc
Description: PGP signature