pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Database directory names
5+ messages / 3 participants
[nested] [flat]

* Database directory names
@ 2002-07-02 20:00  Kris Deugau <kdeugau@webhart.net>
  0 siblings, 1 reply; 5+ messages in thread

From: Kris Deugau @ 2002-07-02 20:00 UTC (permalink / raw)
  To: pgsql-admin

I'm in the final stages of setting up database access for our domain
hosting customers.  The current system is running PostgreSQL 7.0- with
which I haven't met any major problems (other than trying to figure out
how to restrict access to each domain's database- solved).

However...  That box is slated for some major hardware upgrades, and an
update from RedHat 7.0 to 7.3- bringing Postgres up to 7.2.  This is not
in and of itself a problem...  but one particular attribute of 7.2 has
me very puzzled and concerned.

In 7.0, each database resided in /var/lib/pgsql/data/base/{database
name}. This appears to have changed in 7.2 to an indecipherable number,
with no apparent relation to the database name.

I've spent a little time playing with
   CREATE DATABASE dbname WITH LOCATION = 'dbpath';
but it doesn't really suit my needs;  I don't want to specify where the
base/ directory goes!  I don't need to.  I do want to be able to easily
track disk usage on a per-database basis- and while I could just make
note of the directory created when a database is created, it would be
*much* simpler to automate information-generating scripts based on the
database name directly.  (Nor do I want to hassle with trying to get
appropriate environment variables set for the postmaster;  I *really*
don't want to have to modify the init script.)

Is this a feature, a bug, or a change related to some other critical
functional capability of Postgres?  I haven't found anything else that
meets our requirements here, and I can work around this annoyance if
required- but I'd rather be lazy.  ;)

-Kris
WebHart Internet Linux Sysadmin





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Database directory names
@ 2002-07-03 13:59  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Kris Deugau <kdeugau@webhart.net>
  0 siblings, 1 reply; 5+ messages in thread

From: Stephan Szabo @ 2002-07-03 13:59 UTC (permalink / raw)
  To: Kris Deugau <kdeugau@webhart.net>; +Cc: pgsql-admin

On Tue, 2 Jul 2002, Kris Deugau wrote:

> I'm in the final stages of setting up database access for our domain
> hosting customers.  The current system is running PostgreSQL 7.0- with
> which I haven't met any major problems (other than trying to figure out
> how to restrict access to each domain's database- solved).
>
> However...  That box is slated for some major hardware upgrades, and an
> update from RedHat 7.0 to 7.3- bringing Postgres up to 7.2.  This is not
> in and of itself a problem...  but one particular attribute of 7.2 has
> me very puzzled and concerned.
>
> In 7.0, each database resided in /var/lib/pgsql/data/base/{database
> name}. This appears to have changed in 7.2 to an indecipherable number,
> with no apparent relation to the database name.
>
> I've spent a little time playing with
>    CREATE DATABASE dbname WITH LOCATION = 'dbpath';
> but it doesn't really suit my needs;  I don't want to specify where the
> base/ directory goes!  I don't need to.  I do want to be able to easily
> track disk usage on a per-database basis- and while I could just make
> note of the directory created when a database is created, it would be
> *much* simpler to automate information-generating scripts based on the
> database name directly.  (Nor do I want to hassle with trying to get
> appropriate environment variables set for the postmaster;  I *really*
> don't want to have to modify the init script.)
>
> Is this a feature, a bug, or a change related to some other critical
> functional capability of Postgres?  I haven't found anything else that
> meets our requirements here, and I can work around this annoyance if
> required- but I'd rather be lazy.  ;)

Switching to numbers for tables and databases helped a few things
(including for tables making it easier to rollback a drop table).
There's a contrib item, oid2name which will print out a mapping
of directory number to database name.  The readme gives an example
of using it with du.






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Database directory names
@ 2002-07-03 15:42  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Bruce Momjian @ 2002-07-03 15:42 UTC (permalink / raw)
  To: Stephan Szabo <sszabo@megazone23.bigpanda.com>; +Cc: Kris Deugau <kdeugau@webhart.net>; pgsql-admin

Stephan Szabo wrote:
> > Is this a feature, a bug, or a change related to some other critical
> > functional capability of Postgres?  I haven't found anything else that
> > meets our requirements here, and I can work around this annoyance if
> > required- but I'd rather be lazy.  ;)
> 
> Switching to numbers for tables and databases helped a few things
> (including for tables making it easier to rollback a drop table).
> There's a contrib item, oid2name which will print out a mapping
> of directory number to database name.  The readme gives an example
> of using it with du.

Uh, actually, only the readme in the current CVS has the example, 7.2.X
doesn't.  I recommend getting oid2name from the snapshot/CVS and using
that.  It has the newer readme and some changes to make the examples
display properly.  Also see the new doc section for 7.3 on disk usage:

	http://developer.postgresql.org/docs/postgres/diskusage.html

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Database directory names
@ 2002-07-03 16:03  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 5+ messages in thread

From: Stephan Szabo @ 2002-07-03 16:03 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Kris Deugau <kdeugau@webhart.net>; pgsql-admin


On Wed, 3 Jul 2002, Bruce Momjian wrote:

> Stephan Szabo wrote:
> > > Is this a feature, a bug, or a change related to some other critical
> > > functional capability of Postgres?  I haven't found anything else that
> > > meets our requirements here, and I can work around this annoyance if
> > > required- but I'd rather be lazy.  ;)
> >
> > Switching to numbers for tables and databases helped a few things
> > (including for tables making it easier to rollback a drop table).
> > There's a contrib item, oid2name which will print out a mapping
> > of directory number to database name.  The readme gives an example
> > of using it with du.
>
> Uh, actually, only the readme in the current CVS has the example, 7.2.X
> doesn't.  I recommend getting oid2name from the snapshot/CVS and using
> that.  It has the newer readme and some changes to make the examples
> display properly.  Also see the new doc section for 7.3 on disk usage:
>
> 	http://developer.postgresql.org/docs/postgres/diskusage.html

My bad. I assumed that oid2name wasn't likely to have changed without
actually checking.






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Database directory names
@ 2002-07-03 21:49  Kris Deugau <kdeugau@webhart.net>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 5+ messages in thread

From: Kris Deugau @ 2002-07-03 21:49 UTC (permalink / raw)
  To: pgsql-admin

> Stephan Szabo wrote:
> > Switching to numbers for tables and databases helped a few things
> > (including for tables making it easier to rollback a drop table).
> > There's a contrib item, oid2name which will print out a mapping
> > of directory number to database name.  The readme gives an example
> > of using it with du.

Ah, option number 3.  I *thought* there had to be a good reason for it,
but I couldn't imagine how it might help.  (I still can't, but I'm not
in any way an expert on DBMS programming.)

Bruce Momjian wrote:
> Uh, actually, only the readme in the current CVS has the example, 7.2.X
> doesn't.  I recommend getting oid2name from the snapshot/CVS and using
> that.  It has the newer readme and some changes to make the examples
> display properly.  Also see the new doc section for 7.3 on disk usage:
>         http://developer.postgresql.org/docs/postgres/diskusage.html

Snagged, tested, and I'm happy.  Thanks for the heads-up on where to
find oid2name.

-Kris
WebHart Internet Linux Sysadmin





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2002-07-03 21:49 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-02 20:00 Database directory names Kris Deugau <kdeugau@webhart.net>
2002-07-03 13:59 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-07-03 15:42   ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-07-03 16:03     ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-07-03 21:49     ` Kris Deugau <kdeugau@webhart.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox