pg_stop_backup running for 2h10m?

Started by François Beausoleilalmost 13 years ago6 messagesgeneral
Jump to latest
#1François Beausoleil
francois@teksol.info

Hi,

I used omnipitr to launch a base backup, but I fumbled a couple of things, so I Ctrl+C'd *once* the console where I had omnipitr-backup-master running. omnipitr-backup-master correctly launched pg_stop_backup, but pg_stop_backup has been active for 2h10 minutes, as reported by pg_stat_activity.

According to the docs, pg_stop_backup wants to archive all xlogs before returning, but xlogs aren't being added to the backup directory.

What could be preventing pg_stop_backup from returning?

Thanks!
François Beausoleil

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
#2François Beausoleil
francois@teksol.info
In reply to: François Beausoleil (#1)
Re: pg_stop_backup running for 2h10m?

Le 2013-04-23 à 15:08, François Beausoleil a écrit :

I used omnipitr to launch a base backup, but I fumbled a couple of things, so I Ctrl+C'd *once* the console where I had omnipitr-backup-master running. omnipitr-backup-master correctly launched pg_stop_backup, but pg_stop_backup has been active for 2h10 minutes, as reported by pg_stat_activity.

According to the docs, pg_stop_backup wants to archive all xlogs before returning, but xlogs aren't being added to the backup directory.

What could be preventing pg_stop_backup from returning?

For reference, pg_stop_backup() doesn't seem to hold much locks:

select * from pg_locks where pid = 14301;

locktype | database | relation | page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction | pid | mode | granted
------------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+-------+---------------+---------
virtualxid | | | | | 32/6558 | | | | | 32/6558 | 14301 | ExclusiveLock | t

Bye,
François

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
#3Kevin Grittner
Kevin.Grittner@wicourts.gov
In reply to: François Beausoleil (#2)
Re: pg_stop_backup running for 2h10m?

François Beausoleil <francois@teksol.info> wrote:

xlogs aren't being added to the backup directory.

Any clue in the server log why that is?

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4François Beausoleil
francois@teksol.info
In reply to: Kevin Grittner (#3)
Re: pg_stop_backup running for 2h10m?

Le 2013-04-23 à 16:25, Kevin Grittner a écrit :

François Beausoleil <francois@teksol.info> wrote:

xlogs aren't being added to the backup directory.

Any clue in the server log why that is?

I checked but didn't mention it. I ended up calling pg_cancel_backend() on the process, after 3h. strace on the process revealed pg_stop_backup was doing stat('pg_xlog/archive_status/000###.ready'), but the file never appeared.

As I said, I had written a bad omnipitr command, and was trying to backup to a non-existent host, which would have failed.

I'm recovered now and the backup's going.

Bye,
François

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
In reply to: François Beausoleil (#1)
Re: pg_stop_backup running for 2h10m?

On Tue, Apr 23, 2013 at 03:08:52PM -0400, François Beausoleil wrote:

I used omnipitr to launch a base backup, but I fumbled a couple of
things, so I Ctrl+C'd *once* the console where I had
omnipitr-backup-master running. omnipitr-backup-master correctly
launched pg_stop_backup, but pg_stop_backup has been active for 2h10
minutes, as reported by pg_stat_activity.

Most likely your archive_command is not doing its job. Why - hard to
tell without knowing more about the setup, but that's the direction you
should be looking in.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6François Beausoleil
francois@teksol.info
In reply to: hubert depesz lubaczewski (#5)
Re: pg_stop_backup running for 2h10m?

Le 2013-04-24 à 09:15, hubert depesz lubaczewski a écrit :

On Tue, Apr 23, 2013 at 03:08:52PM -0400, François Beausoleil wrote:

I used omnipitr to launch a base backup, but I fumbled a couple of
things, so I Ctrl+C'd *once* the console where I had
omnipitr-backup-master running. omnipitr-backup-master correctly
launched pg_stop_backup, but pg_stop_backup has been active for 2h10
minutes, as reported by pg_stat_activity.

Most likely your archive_command is not doing its job. Why - hard to
tell without knowing more about the setup, but that's the direction you
should be looking in.

Yes, after looking at more logs, I found out I had a permission issue. I ran backup-master as root, and omnipitr-archive wasn't able to write the the local backup directory. There should be a mention of who should run the tool in the docs, as I was confused.

Thanks!
François

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload