db_space

Started by Campano, Troyabout 22 years ago3 messagesgeneral
Jump to latest
#1Campano, Troy
Troy.Campano@LibertyMutual.com

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

#2Bruce Momjian
bruce@momjian.us
In reply to: Campano, Troy (#1)
Re: db_space

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
#3Troy Campano
troycampano@yahoo.com
In reply to: Bruce Momjian (#2)
Re: db_space

What does the contrib dbsize give you then?
Is that like some allocated size as apposed to used size?

thank you!

Show quoted text

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.