Обсуждение: Database files - personal curiosity
This is more a curiousity of mine than anything else. In MySQL the database files are housed in directories named for the database they belong to and you can see how much disk space they are taking up fairly easily. Where does PostgreSQL keep is datafiles and more importantly how can I tell how much diskspace it is consuming? Pardon my ignorance of PostgreSQL, today is my first real attempt at its use.
Uh, see /data and the administration chapter on 'disk space', and try /contrib/oid2name. --------------------------------------------------------------------------- Fontenot, Paul wrote: > This is more a curiousity of mine than anything else. > > In MySQL the database files are housed in directories named for the > database they belong to and you can see how much disk space they are > taking up fairly easily. Where does PostgreSQL keep is datafiles and > more importantly how can I tell how much diskspace it is consuming? > > Pardon my ignorance of PostgreSQL, today is my first real attempt at its > use. > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
<snip> > In MySQL the database files are housed in directories named for the > database they belong to and you can see how much disk space they are > taking up fairly easily. Where does PostgreSQL keep is datafiles and > more importantly how can I tell how much diskspace it is consuming? </snip> In order to start the postmaster you had to $ initdb -D /yourdatadir and then $ postmaster -D /yourdatadir If you followed the install files´ instructions and compiled it yourself /yourdatadir should be /usr/local/pgsql/data. If you are using a postgresql database which came with your distro it may be in something like /var/pgsql/data (That´s how Mandrake is set up...it´s also got a /var/pgsql/data and makes routine pg_dumpalls). Daniel R. Anderson Chief Lab Rat and Helper Monkey Great Lakes Industries, Inc. "Never let your schooling interfere with your education¨ -- Mark Twain