odd pg_start_backup() issue - Mailing list pgsql-admin

From CS DBA
Subject odd pg_start_backup() issue
Date
Msg-id 52EBE39C.4000105@consistentstate.com
Whole thread Raw
Responses Re: odd pg_start_backup() issue
List pgsql-admin
Hi All;

I'm setting up PITR based backups on a production db server.
When the script runs the pg_start_backup it takes forever, like 30minutes+

I can run a checkpoint while waiting for it to complete and it finishes
almost immediately

For now we're executing the start backup like this (in the automated
base backup script:
echo "checkpoint; select pg_start_backup('$tag'); checkpoint;" | psql

we tried it like this and id did not help:
echo "checkpoint; select pg_start_backup('$tag');" | psql
so we added the checkpoint after the pg_start_backup command

Next I'll try this (I assume the first checkpoint is simply un-needed):
echo "select pg_start_backup('$tag'); checkpoint;" | psql

However, this  works well and the pg_start_backup finishes in less than
1minute,
but if I leave the checkpoint command(s) out then we're back to
30minutes or more for the pg_start_backup...

We're running version 9.2.4 on a Centos 6 server

Thoughts?

Thanks in advance


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: HammerDB Error
Next
From: Mark Steben
Date:
Subject: configuring openssl for postgres 9.2 for the first time