Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Clean up PostgreSQL Database

Hi there,

is there a possibility to clean up my postgreSQL database without losing all data? (not the postgre rebuild-command [;)] )

I had some contact with Sophos support today which told me my db is about 4GB, too big.


This thread was automatically locked due to age.
Parents
  • A starting point:

    loginuser@home:/home/login > psql -U postgres -c '\l+'
    
                                                                        List of databases
       Name    |   Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   |  Size   | Tablespace |                Description
    -----------+-----------+----------+-------------+-------------+-----------------------+---------+------------+--------------------------------------------
     epp       | epp       | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 7102 kB | pg_default |
     hotspot   | hotspot   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 6534 kB | pg_default |
     pop3      | pop3      | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 6742 kB | pg_default |
     postgres  | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 6470 kB | pg_default | default administrative connection database
     repmgr    | repmgr    | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 6470 kB | pg_default |
     reporting | reporting | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 379 MB  | reporting  |
     smtp      | smtp      | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 7870 kB | pg_default |
     template0 | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +| 6169 kB | pg_default | unmodifiable empty database
               |           |          |             |             | postgres=CTc/postgres |         |            |
     template1 | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | postgres=CTc/postgres+| 6470 kB | pg_default | default template database
               |           |          |             |             | =c/postgres           |         |            |
    (9 rows)
Reply
  • A starting point:

    loginuser@home:/home/login > psql -U postgres -c '\l+'
    
                                                                        List of databases
       Name    |   Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   |  Size   | Tablespace |                Description
    -----------+-----------+----------+-------------+-------------+-----------------------+---------+------------+--------------------------------------------
     epp       | epp       | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 7102 kB | pg_default |
     hotspot   | hotspot   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 6534 kB | pg_default |
     pop3      | pop3      | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 6742 kB | pg_default |
     postgres  | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 6470 kB | pg_default | default administrative connection database
     repmgr    | repmgr    | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 6470 kB | pg_default |
     reporting | reporting | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 379 MB  | reporting  |
     smtp      | smtp      | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                       | 7870 kB | pg_default |
     template0 | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +| 6169 kB | pg_default | unmodifiable empty database
               |           |          |             |             | postgres=CTc/postgres |         |            |
     template1 | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | postgres=CTc/postgres+| 6470 kB | pg_default | default template database
               |           |          |             |             | =c/postgres           |         |            |
    (9 rows)
Children
No Data
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?