How do I determine how much space is being used by the PostgreSQL database?

First, determine where your postgresql database is installed. Here are the default locations for common platforms:

  • AIX: /u2/pgsql
  • RHEL (postgresql 8.1): /var/lib/pgsql/
  • RHEL (postgresql 8.4): /opt/PostgresPlus/

Once you have determined where the postgresql database lives, use the UNIX du command to report how much space is currently being used by the database files. Here’s an example from a RHEL server with postgresql 8.1 showing a database using 125 MB of data:

[root@firestorm ~]# du -sm /var/lib/pgsql/
125     /var/lib/pgsql/

How is my PostgreSQL database being backed up?

PostgreSQL is a secondary database used by many of our newer products, including Job Management.

The default method of backing up the postgresql database is by dumping the entire database to an archive file that is captured as part of the regular Eclipse database backup. On Linux, the backup script is located at /u2/pgsql/pgsql_backup by default. On AIX, the backup script is located at /u2/pgsql/bin/backup.sh by default.

This backup script is scheduled to run daily via crontab. On Linux, this is accomplished via a symlink in /etc/cron.daily:

ln -s /u2/pgsql/pgsql_backup /etc/cron.daily/pgsql_backup

On AIX, this is accomplished via a crontab entry similar to the following:

0 0 * * * /u2/pgsql/bin/backup.sh  >/dev/null 2>&1