Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Tom Lane
Andres Freund writes: > we could really do better than just wonder whether our signal to > shutdown was received or not. There probably should be a quite short > timeout for the server to change status, and then a much longer one for > that shutdown to finish. While I don't

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Andres Freund
On 2017-11-12 14:26:42 -0500, Tom Lane wrote: > Christoph Berg writes: > > The default systemd timeout seems to be 90s. I have already changed > > the systemd timeout to infinity (start) and 1h (stop), so only the > > default pg_ctl timeout remains (60s), which I'd rather not

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Tom Lane
Christoph Berg writes: > The default systemd timeout seems to be 90s. I have already changed > the systemd timeout to infinity (start) and 1h (stop), so only the > default pg_ctl timeout remains (60s), which I'd rather not override > unilaterally. > That said, isn't 60s way too

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Christoph Berg
Re: Tom Lane 2017-11-12 <20802.1510513...@sss.pgh.pa.us> > Agreed, but I think Peter has a point: why is there a timeout at all, > let alone one as short as 30 seconds? Since systemd doesn't serialize > service starts unnecessarily, there seems little value in giving up > quickly. And we know

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Tom Lane
Christoph Berg writes: > Re: Peter J. Holzer 2017-11-12 <20171112173559.m6chmbyf4vz6f...@hjp.at> >> Wouldn't it be better to remove the timeout? > If you don't want to block, don't depend on the database service. That > question is independent from the timeout. Agreed, but I

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Christoph Berg
Re: Peter J. Holzer 2017-11-12 <20171112173559.m6chmbyf4vz6f...@hjp.at> > Wouldn't it be better to remove the timeout? If some other service > depends on PostgreSQL it probably shouldn't be startet until PostgreSQL > is really up and services which don't need PostgreSQL (e.g. SSH or X11 > login or

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Peter J. Holzer
On 2017-11-12 13:26:58 +0100, Christoph Berg wrote: > Re: To Adam Brusselback 2017-11-11 > <2017205316.u56lkmkakdmcx...@msg.df7cb.de> > > I'm investigating if it's a good idea to tell systemd to ignore the > > exit code of pg_ctl(cluster). > > Telling systemd to ignore ExecStart errors seems

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Christoph Berg
Re: To Adam Brusselback 2017-11-11 <2017205316.u56lkmkakdmcx...@msg.df7cb.de> > I'm investigating if it's a good idea to tell systemd to ignore the > exit code of pg_ctl(cluster). Telling systemd to ignore ExecStart errors seems to be the correct solution. The service will still be active,

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-11 Thread Christoph Berg
Re: Adam Brusselback 2017-11-11

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-11 Thread Adam Brusselback
Hey Christoph, I tried starting it with init (service postgresql start), and pg_ctlcluster. I modified the pg_ctl.conf and set the timeout higher so I could just get my cluster back up and running properly, so I can't give you the info on what systemctl status says at the moment. On Sat, Nov

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-11 Thread Christoph Berg
Re: Tom Lane 2017-11-10 <8027.1510347...@sss.pgh.pa.us> > > The recovery succeeds, but when I go to start the cluster on the > > standby, it begins to replay the WAL, and does so for about 30 > > seconds. Then I get a line in my log saying: > > >> pg_ctl: server did not start in time Hi Adam,

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Tom Lane
Adam Brusselback writes: >> You might want to increase pg_ctl's wait timeout for this situation, >> since the default's evidently too little. However ... > Got it, thanks. >> ... pg_ctl itself wouldn't decide to forcibly shut down the server >> if the timeout

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Joe Conway
On 11/10/2017 01:01 PM, Adam Brusselback wrote: >> You might want to increase pg_ctl's wait timeout for this situation, >> since the default's evidently too little. However ... > Got it, thanks. > >> ... pg_ctl itself wouldn't decide to forcibly shut down the server >> if the timeout expired.

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Adam Brusselback
> You might want to increase pg_ctl's wait timeout for this situation, > since the default's evidently too little. However ... Got it, thanks. > ... pg_ctl itself wouldn't decide to forcibly shut down the server > if the timeout expired. It merely stops waiting and tells you so. > It seems like

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Tom Lane
Adam Brusselback writes: > I am in the process of upgrading to Postgres 10, and am having trouble > getting my streaming replica working. > OS: Debian 9.2 > Version: 10.1 > I have my primary backed up using pgbackrest, and I restore that to my > replica. It generates a