Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
>> in fact template0 needn't be a real database at all, just a
>> $PGDATA/base subdirectory with no pg_database entry.
> I like this "not really a database" idea.
> Might even be something for $libdir, no ?
I thought about that but concluded that it'd just be a way to shoot
ourselves in the foot. The postmaster and backend per se don't know
where $PGLIB is (offhand, I think only the initdb and createlang
scripts do). If we add a dependency on $PGLIB, I think we'll just
be setting up a new way to cause configuration mistakes --- and copying
the wrong template0 data would be a pretty messy sort of mistake. So
keeping the template data under $PGDATA seems like the way to go.
However, template0 needn't necessarily be under $PGDATA/base, it could
be its own subdirectory of $PGDATA. I'm not sure if that's a better
arrangement or not.
regards, tom lane