Strange query stalls on replica in 9.3.9

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Strange query stalls on replica in 9.3.9
Date: 2015-08-13 17:09:30
Message-ID: 55CCCF4A.2080102@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Setup:

* PostgreSQL 9.3.9
* 1 master, 1 replica
* Tiny database, under 0.5GB, completely cached in shared_buffers
* 90% read query traffic, which is handled by replica
* Traffic in the 1000's QPS.

The wierdness:

Periodically the master runs an "update all rows" query on the main
table in the database. When this update hits the replica via
replication stream, *some* (about 5%) of the queries which do seq scans
will stall for 22 to 32 seconds (these queries normally take about
75ms). Queries which do index scans seem not to be affected.

Thing is, the update all rows only takes 2.5 seconds to execute on the
master. So even if the update is blocking the seq scans on the replica
(and I can't see why it would), it should only block them for < 3 seconds.

Anyone seen anything like this?

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2015-08-13 20:24:28 Re: Strange query stalls on replica in 9.3.9
Previous Message 林士博 2015-08-13 09:21:23 Re: Slow Query