Hi, On 2018-02-20 13:07:30 -0500, Tom Lane wrote: > ... btw, I've not read this patch in any detail, but the recent thread > about toast tables for system catalogs prompts me to wonder what happens > if a "fast default" value is large enough to require out-of-line toasting.
Hm, interesting. > I can easily think of problems that will ensue if we try to support that > case, because right now the toast mechanisms assume that OOL toasted > values can only be referenced from the associated table. What problem are you seeing with treating the toasted value to be from pg_attribute? I'm only drinking my first coffee just now, so I might be missing something... Now we certainly would need to make sure that the corresponding pg_attribute row containing the default value doesn't go away too early, but that shouldn't be much of a problem given that we never remove them. I wondered for a second if there's problematic cases where the default value is referenced by an index, and then the default-adding transaction rolls back. But I can't construct anything realistically problematic. Greetings, Andres Freund