Skip to Content

postgresql

Upgrading a PostgreSQL Database Cluster

While it rarely happens, sometimes your SQL statements for building a database (or database item) stops working due to a version difference on your server(s). In my case, we were working on a development server which is "up to date" with the latest version of PostgreSQL (version 9.1 at the moment). The SQL code to create our database works fine here. However our staging server is using an older version of Ubuntu, and therefore an older version of PostgreSQL - 9.0 to be exact.

PostgreSQL Meta-data

Sometimes, the right way to solve a problem is to assume you know nothing and dynamically determine the structure of the database you are dealing with. However, this approach is not very common and may go by various names, so searching for information on how to do it can be difficult. Let's take a look at PostgreSQL and how one would accomplish the task there.

PostgreSQL 8.4 Database Backups with pg_dump and cron

Do a Google Search for "postgresql backup" and you will find tons of information. Now add the word "cron" onto that list and try to make heads or tails of the results. You find lots of information, but none of it with clear concise "do this" type instructions (at least none that I found). So, here's a description of the problem, and the solution I found to solve it.

The problem

Syndicate content