<div dir="ltr">No, I always started postgres first, then pgpool.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 4, 2023 at 5:05 PM Bo Peng <<a href="mailto:pengbo@sraoss.co.jp">pengbo@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
When you restart Pgpool-II, will pgpool not be able to detect this primary?<br>
<br>
On Mon, 3 Jul 2023 16:55:50 +0800<br>
Zhaoxun Yan <<a href="mailto:yan.zhaoxun@gmail.com" target="_blank">yan.zhaoxun@gmail.com</a>> wrote:<br>
<br>
> Hi Peng!<br>
> As in the configuration:<br>
> backend_hostname0 = '172.17.0.2'<br>
> 172.17.0.2 is primary by default, or does pgpool think otherwise? How can I<br>
> check?<br>
> <br>
> <br>
> On Mon, Jul 3, 2023 at 4:29 PM Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>> wrote:<br>
> <br>
> > Hi,<br>
> ><br>
> > > I have tested local postgresql, and it is ok for psql works:<br>
> > > psql -h 127.0.0.1 -U checker -c '\l' template1<br>
> > > But as I add in `-p 9999` the pgpool is down:<br>
> > > psql -h 127.0.0.1 -p 9999 -U checker -c '\l' template1<br>
> > > And I have found the latest log with these lines repeating:<br>
> ><br>
> > You need to make sure PostgreSQL primary is running before pgpool starts.<br>
> > If pgpool can't find any running PostgreSQL primary within<br>
> > "search_primary_node_timeout",<br>
> > Pgpool believes all backend nodes are down and will not accepting any new<br>
> > connections.<br>
> ><br>
> > On Thu, 29 Jun 2023 15:04:17 +0800<br>
> > Zhaoxun Yan <<a href="mailto:yan.zhaoxun@gmail.com" target="_blank">yan.zhaoxun@gmail.com</a>> wrote:<br>
> ><br>
> > > I have also tested connecting postgres directly via ip address registered<br>
> > > as first backend in pgpool.conf<br>
> > > backend_hostname0 = '172.17.0.2'<br>
> > ><br>
> > > And it works:<br>
> > > # psql -h 172.17.0.2 -p 5432 -U checker -c '\l' template1<br>
> > > Password for user checker:<br>
> > > List of databases<br>
> > > Name | Owner | Encoding | Collate | Ctype | Access<br>
> > > privileges<br>
> > ><br>
> > -----------+----------+----------+-------------+-------------+-----------------------<br>
> > > postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |<br>
> > > template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |<br>
> > =c/postgres<br>
> > > +<br>
> > > | | | | |<br>
> > > postgres=CTc/postgres<br>
> > > template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |<br>
> > =c/postgres<br>
> > > +<br>
> > > | | | | |<br>
> > > postgres=CTc/postgres+<br>
> > > | | | | |<br>
> > > checker=CTc/postgres<br>
> > > (3 rows)<br>
> > ><br>
> > > while pgpool getsdozens of subprocess waiting for connection, it still<br>
> > > believes that all nodes are down:<br>
> > ><br>
> > > # ps aux|grep pgpool|grep -v grep<br>
> > > root 100949 0.0 17.5 149080 137180 ? Ss Jun28 0:00 pgpool<br>
> > > root 100950 0.0 0.3 15308 2932 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > PgpoolLogger<br>
> > > root 100953 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100955 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100956 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100958 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100959 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100960 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100961 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100962 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100963 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100964 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100966 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100967 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100969 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100970 0.0 0.3 149080 2784 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100971 0.0 0.3 149080 2788 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100972 0.0 0.3 149080 2788 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100973 0.0 0.3 149080 2788 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100974 0.0 0.3 149080 2788 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100975 0.0 0.3 149080 2788 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100977 0.0 0.3 149080 2788 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100978 0.0 0.3 149080 2788 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100981 0.0 0.3 149080 2788 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100982 0.0 0.3 149080 2788 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 100983 0.0 0.3 149080 2788 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > wait for connection request<br>
> > > root 101010 0.0 0.1 149084 1352 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > PCP: wait for connection request<br>
> > > root 101011 0.0 0.1 149080 1352 ? S Jun28 0:00<br>
> > pgpool:<br>
> > > worker process<br>
> > ><br>
> > > ---------- Forwarded message ---------<br>
> > > From: Zhaoxun Yan <<a href="mailto:yan.zhaoxun@gmail.com" target="_blank">yan.zhaoxun@gmail.com</a>><br>
> > > Date: Wed, Jun 28, 2023 at 4:47 PM<br>
> > > Subject: pgpool is not accepting connections<br>
> > > To: <<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a>><br>
> > ><br>
> > ><br>
> > > Hi guys!<br>
> > ><br>
> > > I have tested local postgresql, and it is ok for psql works:<br>
> > > psql -h 127.0.0.1 -U checker -c '\l' template1<br>
> > > But as I add in `-p 9999` the pgpool is down:<br>
> > > psql -h 127.0.0.1 -p 9999 -U checker -c '\l' template1<br>
> > > And I have found the latest log with these lines repeating:<br>
> > ><br>
> > > 2023-06-28 16:36:22.928: child pid 100980: FATAL: pgpool is not<br>
> > accepting<br>
> > > any new connections<br>
> > > 2023-06-28 16:36:22.928: child pid 100980: DETAIL: all backend nodes are<br>
> > > down, pgpool requires at least one valid node<br>
> > > 2023-06-28 16:36:22.928: child pid 100980: HINT: repair the backend<br>
> > nodes<br>
> > > and restart pgpool<br>
> > > 2023-06-28 16:36:22.928: main pid 100949: LOG: reaper handler<br>
> > > 2023-06-28 16:36:22.929: main pid 100949: LOG: child process with pid:<br>
> > > 100980 exited with success and will not be restarted<br>
> > > 2023-06-28 16:36:22.929: main pid 100949: LOG: reaper handler: exiting<br>
> > > normally<br>
> > > 2023-06-28 16:36:28.899: child pid 100976: FATAL: pgpool is not<br>
> > accepting<br>
> > > any new connections<br>
> > ><br>
> > > Attached is the current pgpool configuration.<br>
> ><br>
> ><br>
> > --<br>
> > Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>><br>
> > SRA OSS LLC<br>
> > TEL: 03-5979-2701 FAX: 03-5979-2702<br>
> > URL: <a href="https://www.sraoss.co.jp/" rel="noreferrer" target="_blank">https://www.sraoss.co.jp/</a><br>
> ><br>
<br>
<br>
-- <br>
Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>><br>
SRA OSS LLC<br>
TEL: 03-5979-2701 FAX: 03-5979-2702<br>
URL: <a href="https://www.sraoss.co.jp/" rel="noreferrer" target="_blank">https://www.sraoss.co.jp/</a><br>
</blockquote></div>