Re: pg_ctl promote wait

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_ctl promote wait
Date: 2016-02-19 20:08:40
Message-ID: 26681.1455912520@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Is it safe to read pg_control externally without a lock? pg_controldata
> will just report a CRC error and proceed, and if you're not sure you can
> just run it again. But if a promotion fails every so often because of
> concurrent pg_control writes, that would make this feature annoying.

Just retry the read till you don't get a CRC error.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2016-02-19 20:08:44 Re: checkpointer continuous flushing - V16
Previous Message Peter Geoghegan 2016-02-19 20:07:47 Re: [DOCS] The number of bytes is stored in index_size of pgstatindex() ?