From:
Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
To:
pgsql-hackers(at)postgresql(dot)org
Cc:
ssinger_pg(at)sympatico(dot)ca, cedric(dot)villemain(dot)debian(at)gmail(dot)com,
robertmhaas(at)gmail(dot)com, masao(dot)fujii(at)gmail(dot)com, magnus(at)hagander(dot)net,
heikki(dot)linnakangas(at)enterprisedb(dot)com
Subject:
Re: Online base backup from the hot-standby
Date:
2011-09-12 06:46:37
Message-ID:
201109120647.p8C6lWsh028641@ccmds32.silk.ntts.co.jp (view raw or flat )
Thread:
2011-08-05 06:45:47 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-08-05 08:02:15 from Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>
2011-08-15 08:46:53 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-08-15 11:52:21 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-08-16 06:09:16 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-08-16 15:24:24 from Steve Singer <ssinger_pg(at)sympatico(dot)ca>
2011-08-17 08:59:37 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-08-17 10:19:03 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-08-17 12:40:15 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-08-17 13:53:08 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-08-17 15:09:43 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-08-18 01:43:21 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-08-16 06:12:59 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-08-18 02:12:55 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-08-18 05:47:25 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-09-12 06:46:37 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-09-13 06:50:28 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-09-21 02:50:24 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-21 05:13:21 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-09-21 06:23:53 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-21 08:34:26 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-09-22 12:13:43 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-22 15:44:44 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-09-26 12:12:41 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-21 16:52:18 from Josh Berkus <josh(at)agliodbs(dot)com>
2011-09-26 08:07:21 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-22 13:24:51 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-26 02:39:00 from Steve Singer <ssinger_pg(at)sympatico(dot)ca>
2011-09-27 02:56:25 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-27 05:51:38 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-09 18:04:25 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-09 18:56:11 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-10-11 10:15:54 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-11 15:17:27 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-11 21:44:34 from Steve Singer <ssinger_pg(at)sympatico(dot)ca>
2011-10-12 02:43:59 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-12 07:27:02 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-12 07:53:52 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-13 04:31:27 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-13 05:01:38 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-13 09:39:09 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-14 12:28:29 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-15 01:35:45 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-15 02:12:36 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-17 07:16:05 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-18 06:25:46 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-19 02:47:08 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-19 07:37:32 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-10-24 12:29:20 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-24 15:24:28 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2011-10-25 05:12:20 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-25 06:44:30 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2011-10-25 08:50:10 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-25 10:19:33 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-10-25 11:54:58 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-25 12:03:57 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-10-26 01:48:05 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-31 04:11:19 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
2011-11-15 02:11:38 from Steve Singer <ssinger_pg(at)sympatico(dot)ca>
2012-01-13 08:02:55 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-17 10:38:23 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-20 04:01:49 from Steve Singer <ssinger_pg(at)sympatico(dot)ca>
2012-01-20 09:48:59 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-20 10:37:41 from "Erik Rijkers" <er(at)xs4all(dot)nl>
2012-01-20 11:04:29 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-20 11:26:35 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2012-01-20 11:15:55 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2012-01-20 12:54:28 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-20 14:34:31 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2012-01-23 10:29:20 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-23 13:11:04 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2012-01-24 09:51:13 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-24 10:54:56 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2012-01-24 11:22:16 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2012-01-25 08:16:40 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-25 08:49:42 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2012-01-25 18:07:24 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2012-01-26 06:09:33 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-23 13:11:10 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-23 13:13:51 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-11-03 23:06:16 from Josh Berkus <josh(at)agliodbs(dot)com>
2011-11-04 04:20:31 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-25 12:56:47 from Steve Singer <ssinger_pg(at)sympatico(dot)ca>
2011-10-25 13:05:11 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2011-10-24 15:33:40 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2011-10-24 15:38:18 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-10-25 05:37:48 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-10-13 13:44:50 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-27 23:10:39 from Steve Singer <ssinger_pg(at)sympatico(dot)ca>
2011-09-28 01:58:19 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2011-09-26 08:41:06 from Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
Lists:
pgsql-hackers
Hi, Created a patch in response to comments.
* Procedure
1. Call pg_start_backup('x') on hot standby.
2. Take a backup of the data dir.
3. Copy the control file on hot standby to the backup.
4. Call pg_stop_backup() on hot standby.
* Behavior
(take backup)
If we execute pg_start_backup() on hot standby then execute restartpoint,
write a strings as "FROM: slave" in backup_label and change backup mode,
but do not change full_page_writes into "on" forcibly.
If we execute pg_stop_backup() on hot standby then rename backup_label
and change backup mode, but neither write backup end record and history
file nor wait to complete the WAL archiving.
pg_stop_backup() is returned this MinRecoveryPoint as result.
If we execute pg_stop_backup() on the server promoted then error
message is output since read the backup_label.
(recovery)
If we recover with the backup taken on hot standby, MinRecoveryPoint in
the control file copied by 3 of above-procedure is used instead of backup
end record.
If recovery starts as first, BackupEndPoint in the control file is written
a same value as MinRecoveryPoint. This is for remembering the value of
MinRecoveryPoint during recovery.
HINT message("If this has ...") is always output when we recover with the
backup taken on hot standby.
* Problem
full_page_writes's problem.
> This has the following two problems.
> * pg_start_backup() must set 'on' to full_page_writes of the master that
> is actual writing of the WAL, but not the standby.
> * The standby doesn't need to connect to the master that's actual writing
> WAL.
> (Ex. Standby2 in Cascade Replication: Master - Standby1 - Standby2)
>
> I'm worried how I should clear these problems.
Status: Considering
(Latest: http://archives.postgresql.org/pgsql-hackers/2011-08/msg00880.php )
Regards.
--------------------------------------------
Jun Ishizuka
NTT Software Corporation
TEL:045-317-7018
E-Mail: ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp
--------------------------------------------
In response to
Responses
pgsql-hackers by date
Next :From: George BarnettDate: 2011-09-12 06:46:53
Subject : Re: Patch to improve reliability of postgresql on linux nfs
Previous :From : Florian PflugDate : 2011-09-12 05:59:32
Subject : Re: Patch to improve reliability of postgresql on linux nfs