Re: Database subdirectories in V7.1.x - Mailing list pgsql-admin

From Tom Lane
Subject Re: Database subdirectories in V7.1.x
Date
Msg-id 25134.1003292046@sss.pgh.pa.us
Whole thread Raw
In response to Re: Database subdirectories in V7.1.x  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-admin
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> The reason tables got renamed into numbers was due to rollbacks of
> drops or drops followed by creates in the same transaction.

That was one reason, but an equally big reason was to have a compact way
of referencing tables in the WAL logs, such that a process re-applying
changes during crash recovery wouldn't need any outside info to apply
the changes.  Database and table OIDs fit that description, names do
not.

> I assume that the plan was to move databases in the same direction

I don't think that there are any plans to make DROP DATABASE
rollback-able, but the WAL recovery issue is sufficient reason to use
database OIDs for directory names.

The short answer is that this design decision will not be reversed...
learn about oid2name if you feel a need to understand the substructure
of $PGDATA.

            regards, tom lane

pgsql-admin by date:

Previous
From: s.chava@wcom.com (Srinivasa Rao Chava)
Date:
Subject: system tables
Next
From: Stephan Szabo
Date:
Subject: Re: ALTER TABLE commands