Re: comment for "fast promote"

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Tomonari Katsumata <katsumata(dot)tomonari(at)po(dot)ntts(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: comment for "fast promote"
Date: 2013-07-25 12:15:22
Message-ID: CAHGQGwEBUvgcx8X+Z0Hh+VdwYcJ8KCuRuLt1jSsxeLxPcX=0_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 25, 2013 at 5:33 PM, Tomonari Katsumata
<katsumata(dot)tomonari(at)po(dot)ntts(dot)co(dot)jp> wrote:
> Hi,
>
> Now I'm seeing xlog.c in 93_stable for studying "fast promote",
> and I have a question.
>
> I think it has an extra unlink command for "promote" file.
> (on 9937 line)
> -------
> 9934 if (stat(FAST_PROMOTE_SIGNAL_FILE, &stat_buf) == 0)
> 9935 {
> 9936 unlink(FAST_PROMOTE_SIGNAL_FILE);
> 9937 unlink(PROMOTE_SIGNAL_FILE);
> 9938 fast_promote = true;
> 9939 }
> -------
>
> Is this command necesary ?

Yes, it prevents PROMOTE_SIGNAL_FILE from remaining even if
both promote files exist.

One question is that: we really still need to support normal promote?
pg_ctl promote provides only way to do fast promotion. If we want to
do normal promotion, we need to create PROMOTE_SIGNAL_FILE
and send the SIGUSR1 signal to postmaster by hand. This seems messy.

I think that we should remove normal promotion at all, or change
pg_ctl promote so that provides also the way to do normal promotion.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-07-25 13:13:10 Re: Expression indexes and dependecies
Previous Message KONDO Mitsumasa 2013-07-25 10:11:13 Re: Improvement of checkpoint IO scheduler for stable transaction responses