From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
---|---|
To: | Fredrik(dot)HuitfeldtMadsen(at)schneider-electric(dot)com |
Cc: | tgl(at)sss(dot)pgh(dot)pa(dot)us, nagata(at)sraoss(dot)co(dot)jp, pgsql-general(at)postgresql(dot)org, pgpool-general(at)pgpool(dot)net |
Subject: | Re: [pgpool-general: 1315] Re: Database connections seemingly hanging |
Date: | 2013-01-16 06:54:13 |
Message-ID: | 20130116.155413.1366032093940061013.t-ishii@sraoss.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> It seems that the root cause was that pgpool acquired the locks in the
> wrong order. If the resource is called A it seems that pgpool allows child
> X to acquire A on node1 and at the same time, child Y acquires A on node2.
> This leaves X wanting A on node2 and Y wanting A on node1. This leaves
> both children hanging indefinitely. It also leaves both postgres'es
> blissfully unaware of the deadlock, whereby it escapes postgres'es
> deadlock detection.
That's hard to believe for me. For any query, pgpool sends it to the
master node (node1 in your case) first and waits until the node
returns response by using select(2) on the socket to PostgreSQL
backend. After someting comes from the socket, then pgpool issues to
node2. So pgpool never sends query to master node(node1) and node2
concurrently. This is a classical technique to avoid a cross node
dead lock situation.
If your explation is correct, pgpool easily goes into dead lock
situation even by using simple pgbench query.
Could you please show me self-contained test case?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2013-01-16 08:53:58 | Re: Enhancement proposal - detect chain of triggers from inside the trigger |
Previous Message | John R Pierce | 2013-01-16 05:16:12 | Re: Independent backups of subdatabases |