Thread: db_space

db_space

From
"Campano, Troy"
Date:

Is there a way to get the size of your PostgreSQL database using sql?

I need this for an inventory program.

Thanks!

Troy Campano

Liberty Mutual

Infrastructure Software Engineering

Database Management

desk: (603) 245 4092

cell: (603) 219 5539

troy.campano@libertymutual.com

Re: db_space

From
Bruce Momjian
Date:
Campano, Troy wrote:
> Is there a way to get the size of your PostgreSQL database using sql?
> I need this for an inventory program.

No, not db size.  You have to use 'du'.  See the manual section
"Managing Disk Space" in the admin section.

--
  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

Re: db_space

From
Troy Campano
Date:
What does the contrib dbsize give you then?
Is that like some allocated size as apposed to used size?

thank you!

> On Mon, 2004-02-09 at 17:30, Bruce Momjian wrote:
> > Campano, Troy wrote:
> > > Is there a way to get the size of your PostgreSQL database using sql?
> > > I need this for an inventory program.
> >
> > No, not db size.  You have to use 'du'.  See the manual section
> > "Managing Disk Space" in the admin section.