summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAlvaro Herrera2017-08-08 20:07:46 +0000
committerAlvaro Herrera2017-08-08 20:07:46 +0000
commitb2c95a3798ff39fc24d71b6655ddfe0e4cb3f378 (patch)
tree768c684e0f6370c3f4c41ab7dada8525e46be34d /doc/src
parent030273b7ea468ed4b3073dfd1f2ad88e3129df6a (diff)
Fix replication origin-related race conditions
Similar to what was fixed in commit 9915de6c1cb2 for replication slots, but this time it's related to replication origins: DROP SUBSCRIPTION attempts to drop the replication origin, but that fails if the replication worker process hasn't yet marked it unused. This causes failures in the buildfarm: ERROR: could not drop replication origin with OID 1, in use by PID 34069 Like the aforementioned commit, fix by having the process running DROP SUBSCRIPTION sleep until the worker marks the the replication origin struct as free. This uses a condition variable on each replication origin shmem state struct, so that the session trying to drop can sleep and expect to be awakened by the process keeping the origin open. Also fix a SGML markup in the previous commit. Discussion: https://postgr.es/m/20170808001433.rozlseaf4m2wkw3n@alvherre.pgsql
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/monitoring.sgml8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index eb20c9c543..12d5628266 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -1222,11 +1222,11 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
</row>
<row>
<entry><literal>LibPQWalReceiverConnect</></entry>
- <entry>Waiting in WAL receiver to establish connection to remote server.<entry>
+ <entry>Waiting in WAL receiver to establish connection to remote server.</entry>
</row>
<row>
<entry><literal>LibPQWalReceiverReceive</></entry>
- <entry>Waiting in WAL receiver to receive data from remote server.<entry>
+ <entry>Waiting in WAL receiver to receive data from remote server.</entry>
</row>
<row>
<entry><literal>SSLOpenServer</></entry>
@@ -1303,6 +1303,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
<entry>Waiting for group leader to clear transaction id at transaction end.</entry>
</row>
<row>
+ <entry><literal>ReplicationOriginDrop</></entry>
+ <entry>Waiting for a replication origin to become inactive to be dropped.</entry>
+ </row>
+ <row>
<entry><literal>ReplicationSlotDrop</></entry>
<entry>Waiting for a replication slot to become inactive to be dropped.</entry>
</row>