Re: Hot standby server does not start

From: Michal Glowacki <mg(dot)scandic(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Hot standby server does not start
Date: 2010-09-29 08:16:45
Message-ID: 4CA2F5ED.3000209@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Fujii, I believe I should follow this (from documentation):

************************

The procedure for making a base backup is relatively simple:

1.

Ensure that WAL archiving is enabled and working.

2.

Connect to the database as a superuser, and issue the command

SELECT pg_start_backup('label');

where label is any string you want to use to uniquely identify
this backup operation. (One good practice is to use the full path
where you intend to put the backup dump file.) |pg_start_backup|
creates a /backup label/ file, called backup_label, in the cluster
directory with information about your backup.

It does not matter which database within the cluster you connect
to to issue this command. You can ignore the result returned by
the function; but if it reports an error, deal with that before
proceeding.

3.

Perform the backup, using any convenient file-system-backup tool
such as tar or cpio. It is neither necessary nor desirable to stop
normal operation of the database while you do this.

4.

Again connect to the database as a superuser, and issue the command

SELECT pg_stop_backup();

This should return successfully.

5.

Once the WAL segment files used during the backup are archived as
part of normal database activity, you are done.

**********************************

BUT I have some questions:

1. I connect to database using psql and issue command SELECT
pg_start_backup('my_backup'); The result (in less than second) is:

pg_start_backup
-----------------
4/DA000020
(1 row)

Is it correct it goes that fast?

2. Now I proceed to step 3 - perform the backup using file system
backup. Could you assist me on this one? I should archive what?The
'/data' folder (please note I use Windows)? Should I just compress it
into rar file and transfer to standby server and overwrite it's '/data'
folder?

Regards,
Michal
>
> On Wed, Sep 29, 2010 at 4:52 PM, Michal Glowacki <mg(dot)scandic(at)gmail(dot)com
> <mailto:mg(dot)scandic(at)gmail(dot)com>> wrote:
>
>
> I try to do it on two machines, my computer and local server. My
> system is Windows 7 64bit, standby is XP professional sp2 64bit.
> Both machines run postgres 9.0.0. I tried dump, dump_all, pgadmin
> III's backup and restore - nothing works.
>
>
> Instead of pg_dump, you need to take a base backup by using
> pg_start_backup
> and pg_stop_backup, and load it in the standby.
>
> Regards,
>
> --
> Fujii Masao
> NIPPON TELEGRAPH AND TELEPHONE CORPORATION
> NTT Open Source Software Center

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Guillaume Lelarge 2010-09-29 08:56:18 Re: Hot standby server does not start
Previous Message Fujii Masao 2010-09-29 08:06:53 Re: Hot standby server does not start