Add a hint when postgresql.conf hot_standby = 'off' and recovery.conf standby = 'on'

Поиск
Список
Период
Сортировка
От Matthew Kelly
Тема Add a hint when postgresql.conf hot_standby = 'off' and recovery.conf standby = 'on'
Дата
Msg-id A82B3105-B67E-4625-8AB8-4998C688EFFA@tripadvisor.com
обсуждение исходный текст
Ответы Re: Add a hint when postgresql.conf hot_standby = 'off' and recovery.conf standby = 'on'  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
<div class="">If you do the following sequence, the server gives the least helpful error message:</div><div
class=""><brclass="" /></div><div class="">----</div><div class=""><font class="" face="Courier New">initdb
data</font></div><divclass=""><font class="" face="Courier New">pg_ctl -D data -l logfile start</font></div><div
class=""><fontclass="" face="Courier New"><br class="" /></font></div><div class=""><font class="" face="Courier New">#
Thefollowing reconfigs are obvious based on error message if you try to take a base backup</font></div><div
class=""><fontclass="" face="Courier New">echo 'local  replication  all  trust’ >>
data/pg_hba.conf</font></div><divclass=""><font class="" face="Courier New">sed -i 's/#wal_level = minimal/wal_level =
hot_standby/'data/postgresql.conf</font></div><div class=""><font class="" face="Courier New">sed -i
's/#max_wal_senders= 0/max_wal_senders = 5/' data/postgresql.conf</font></div><div class=""><font class=""
face="CourierNew"><br class="" /></font></div><div class=""><font class="" face="Courier New"># Backup and
start</font></div><divclass=""><font class="" face="Courier New">pg_basebackup -D data_5434 -R</font></div><div
class=""><fontclass="" face="Courier New">pg_ctl -D data_5434 -l logfile_5434 -o ‘-p 5434’ start</font></div><div
class=""><brclass="" /></div><div class=""><font class="" face="Courier New"># Attempt psql</font></div><div
class=""><fontclass="" face="Courier New">psql -p 5434</font></div><div class=""><font class="" face="Courier
New">> psql:FATAL:  the database system is starting up</font></div><div class="">----</div><div class="">It doesn’t
matterwhat log level you put the server log in either, it providers no additional helpful information.</div><div
class=""><brclass="" /></div><div class="">The problem of course is that:</div><div
class="">postgresql.conf: hot_standby= ‘off'</div><div class="">recovery.conf: standby = ‘on'</div><div class=""><br
class=""/></div><div class="">Why anybody in practice would want hot_standby off while in standby mode eludes me, but
theseare our default values (recovery.conf was generated by pg_basebackup -R).</div><div class=""><br class=""
/></div><divclass="">It seems worth adding a hint and/or changing the error message to be more descriptive when in this
state. Any options about what should be logged before I start putting together a patch?</div><div class=""><br
class="Apple-interchange-newline"/><span class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;
font-style:normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans:
auto;text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width:0px; display: inline !important; float: none;">- Matt K</span></div><br class="" /> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: broken documentation: BackgroundWorkerInitializeConnection(NULL, NULL);
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: [GENERAL] Strange replication problem - segment restored from archive but still requested from master