Re: detecting binary backup in progress

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: detecting binary backup in progress
Date: 2013-05-31 17:46:42
Message-ID: 51A8E202.1070906@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31.05.2013 20:38, Joe Conway wrote:
> I can check for the presence of $PGDATA/backup_label in order to detect
> a backup in progress (i.e. pg_start_backup() has been run and
> pg_stop_backup() has not yet been run).
>
> However there is a period of time after pg_start_backup() is first
> executed to when it completes, during which backup_label file does not
> exist yet, but the backup has essentially been started. Is there any
> way to detect this state?

What are you trying to accomplish? Even if you eliminate that window,
it's always possible that a backup starts just after you've checked that
there is no backup in progress.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2013-05-31 17:53:04 Re: Behavior of a pg_trgm index for 2 (or < 3) character LIKE queries
Previous Message Bruce Momjian 2013-05-31 17:44:58 Re: removing PD_ALL_VISIBLE