From:
Simon Riggs <simon(at)2ndQuadrant(dot)com>
To:
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc:
Fujii Masao <masao(dot)fujii(at)gmail(dot)com>,
Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>,
Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>,
pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: New trigger option of pg_standby
Date:
2009-04-21 14:05:51
Message-ID:
1240322751.23905.244.camel@ebony.fara.com (view raw or flat )
Thread:
2009-03-25 06:29:21 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-03-25 06:50:04 from Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
2009-03-25 08:44:52 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-03-25 08:55:49 from Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
2009-03-25 09:32:12 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-03-25 13:59:01 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-03-25 15:48:14 from Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
2009-03-26 01:51:08 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-03-26 06:20:58 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-03-26 07:32:09 from Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
2009-03-26 10:01:18 from Matteo Beccati <php(at)beccati(dot)com>
2009-03-26 10:50:33 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-03-26 11:54:46 from Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
2009-03-27 02:38:00 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-03-27 07:21:35 from Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
2009-03-27 12:49:58 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-03-30 02:32:36 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-03-30 13:04:03 from Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
2009-03-27 11:56:16 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2009-03-27 12:03:25 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-03-27 12:19:05 from Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
2009-03-27 13:09:24 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-03-27 14:25:43 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-03-27 14:36:36 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-01 02:01:49 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-03 03:42:05 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-07 21:56:04 from Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
2009-04-08 01:17:19 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-09 12:47:46 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-04-10 03:47:39 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-10 09:31:47 from Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
2009-04-13 03:44:49 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-10 16:31:43 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-13 05:52:29 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-13 10:21:41 from Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
2009-04-13 11:30:25 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-13 16:46:23 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-14 05:41:50 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-15 08:02:00 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-15 17:56:03 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-16 06:31:48 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-20 09:06:09 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-04-20 10:54:25 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-20 14:47:34 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-04-21 11:03:56 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-21 11:17:47 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-04-21 11:25:50 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-21 11:28:22 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-04-21 11:38:18 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-21 11:48:51 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-21 12:55:10 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-04-21 14:05:51 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-21 14:36:08 from Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
2009-04-21 15:41:49 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-04-21 16:59:54 from David Fetter <david(at)fetter(dot)org>
2009-04-22 07:43:47 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-21 19:27:59 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-04-22 05:09:17 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-23 07:49:13 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-04-23 12:15:25 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-05-12 11:15:05 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-05-12 11:27:03 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-12 11:38:11 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-05-12 14:34:10 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-13 08:27:28 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-05-13 08:37:38 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-05-13 17:01:45 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-05-13 17:58:43 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-13 17:59:07 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-05-13 18:14:56 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2009-05-13 18:22:42 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2009-05-13 18:32:15 from Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
2009-05-13 18:46:35 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-13 18:36:25 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-05-13 18:57:53 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-05-13 19:05:52 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2009-05-13 20:42:20 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-13 18:26:15 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-05-13 18:39:34 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-13 18:53:44 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-05-13 19:08:52 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-13 19:33:25 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-05-13 20:43:24 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-13 20:47:26 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-05-13 21:04:06 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-14 10:24:58 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-05-14 15:36:55 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-14 18:49:29 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-05-14 19:05:21 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-05-14 19:10:04 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-14 20:31:18 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-05-15 02:32:59 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-05-15 09:43:54 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-27 13:13:42 from Bruce Momjian <bruce(at)momjian(dot)us>
2009-05-27 13:41:18 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-27 13:48:03 from Bruce Momjian <bruce(at)momjian(dot)us>
2009-05-27 13:51:56 from Bruce Momjian <bruce(at)momjian(dot)us>
2009-05-27 14:39:21 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-05-27 18:24:23 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-27 14:51:07 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-27 14:01:04 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-27 16:08:55 from Bruce Momjian <bruce(at)momjian(dot)us>
2009-05-27 16:54:36 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-27 17:14:17 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2009-05-27 17:58:38 from Robert Haas <robertmhaas(at)gmail(dot)com>
2009-05-27 21:16:07 from Bruce Momjian <bruce(at)momjian(dot)us>
2009-05-27 18:08:52 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-05-28 13:38:38 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-14 09:35:40 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-04-14 10:20:39 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-14 18:30:27 from Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
2009-04-15 06:14:10 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2009-04-20 08:32:23 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2009-04-20 11:10:55 from Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Lists:
pgsql-hackers
On Tue, 2009-04-21 at 15:55 +0300, Heikki Linnakangas wrote:
> Fujii Masao wrote:
> > On Tue, Apr 21, 2009 at 8:28 PM, Heikki Linnakangas
> > <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> >> Simon Riggs wrote:
> >>> What you propose is *better* than raw pg_standby is now, but still not
> >>> enough in all cases, as I think you know.
> >> No, I don't. What is the case where it doesn't work?
> >
> > It's the case which I described as the 2nd comment to your
> > proposal.
> >
> > 1. pg_standby tries to restore a non-existent file
> > 1-1. remove the trigger file
> > 1-2. pg_standby exits with non-zero code
> > 2. the startup process tries to read it from pg_xlog
> > 2-1. it is applied
> > 3. the startup process tries to restore the next file using pg_standby
> > 3-1. pg_standby gets *stuck* since the requested file and trigger file
> > don't exist.
>
> Ahh, ok, I didn't understand the issue correctly before.
>
> But wait a minute, we already have exactly the same problem with the
> current 8.2/8.3 pg_standby, don't we? [tests]. Yes, we do.
>
> Simon's suggestion of a separate restore_completion_command is very
> attractive as it would provide an explicit place to hook up the deletion
> of the trigger file. It seems useful anyway, you might want to put a
> command there to e.g update a log file or launch some custom daemon
> software when the recovery ends. The question then is what to do with
> 8.2 and 8.3? Even if we decided to keep the behavior that the failover
> is triggered immediately (fast mode), pg_standby getting stuck if you
> copy any WAL files directly into pg_xlog seems like a bug that needs to
> be fixed.
>
> Fujii's idea of deleting the trigger file when history file is requested
> is the only proposal this far that works and doesn't require changes to
> people's config files, so I guess that's what we'll have to do at least
> for back-branches.
Agreed. Fujii-san's proposal is the only one that covers all the
important things. The assumptions need careful documentation, as you
say.
The idea of a restore_completion_command does still sound attractive,
easy to implement and non-intrusive enough to do so right now.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
In response to
pgsql-hackers by date
Next :From: Dickson S. GuedesDate: 2009-04-21 14:11:54
Subject : Re: Automating Partitions in PostgreSQL - Query on syntax
Previous :From : Kedar PotdarDate : 2009-04-21 14:03:10
Subject : Re: Automating Partitions in PostgreSQL - Query on syntax