Alvaro Herrera <alvhe...@commandprompt.com> writes: > The relcache need to be bootstrapped more than once, not just at > initdb's bootstrap. (I guess you could try a breakpoint in formrdesc)
Ok so in RelationCacheInitializePhase3 we have formrdesc calls: formrdesc("pg_class", false, true, Natts_pg_class, Desc_pg_class); That will do this: /* * initialize relation id from info in att array (my, this is ugly) */ RelationGetRelid(relation) = relation->rd_att->attrs[0]->attrelid; relation->rd_rel->relfilenode = RelationGetRelid(relation); And this uses data from pg_attribute.h which looks like this: #define Schema_pg_class \ { 1259, {"relname"}, 19, -1, 0, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \ So in the source I'm reading, pg_class relfilenode is 1259, the system knows how to get there, then read real values instead of bootstrap mode dummy one. Except that the bootstrap mode is used at initdb, at system startup and anytime there's a cache miss? So to be able to CLUSTER we have to find a way for cache miss to get the file named 1259 or the new value, whatever it is after CLUSTER changed it. I guess symlinks are not allowed? > Yeah, well, Tom just posted a possible solution :-) Flat file are back? really? Regards, -- dim -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers