Thread: createdb test shown as number in data directory

createdb test shown as number in data directory

From
"McCoy Mun"
Date:
Hi

I'm using postgres 7.1.1 version tar format.  I've compiled and installed
with the default option

1) ./configure
2) make
3) make install
4) create a data dir with postgres user permission
   in /usr/local/pgsql/data
5) initdb -D /usr/local/pgsql/data
   - NO ERROR encounter.
6) start postmaster
7) createdb test

ALL THE ABOVE HAS NO ERROR.  However, when I look in
/usr/local/pgsql/data/base, all the directories created is in number format
as shown:

[postgres@db /usr/local/pgsql/data/base]$ ls
1  18719  18723
[postgres@db /usr/local/pgsql/data/base]$ cd 18723
[postgres@db /usr/local/pgsql/data/base/18723]$ ls
1215  16567  16867  17074  17112  17139  17160  17181  17213  17261
1216  16579  16934  17086  17115  17142  17163  17184  17216  17273
1219  16600  16948  17097  17118  17145  17166  17187  17228  17276
1247  16617  16960  17100  17121  17148  17169  17190  17231  17288
1249  16642  17033  17103  17124  17151  17172  17193  17243  PG_VERSION
1255  16653  17045  17106  17133  17154  17175  17196  17246
pg_internal.init
1259  16685  17058  17109  17136  17157  17178  17201  17258


But when I did a psql -l, I can find the db created.
[postgres@db /usr/local/pgsql/data/base/18723]$ psql -l
  List of databases
Database  |  Owner
-----------+----------
template0 | postgres
template1 | postgres
test      | postgres
(3 rows)

I remember in the older postgres version, I can test dir in .../base.  But
not in this version.

Pls advise.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Re: createdb test shown as number in data directory

From
Thomas Lockhart
Date:
> ALL THE ABOVE HAS NO ERROR.  However, when I look in
> /usr/local/pgsql/data/base, all the directories created is in number format
> as shown:
...
> But when I did a psql -l, I can find the db created.
> I remember in the older postgres version, I can test dir in .../base.  But
> not in this version.

You are correct. The file naming scheme was changed; check the archives
in -hackers for discussions on how to associate numbers with names.

                       - Thomas