Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvtb4-0004yv-Uy for pgsql-admin@arkaria.postgresql.org; Thu, 17 Jan 2013 17:49:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tvtb4-000828-Fo for pgsql-admin@arkaria.postgresql.org; Thu, 17 Jan 2013 17:49:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvtb3-00081x-Oo for pgsql-admin@postgresql.org; Thu, 17 Jan 2013 17:49:49 +0000 Received: from [64.207.29.137] (helo=mail.illumen.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvtaz-0000PF-9z for pgsql-admin@postgresql.org; Thu, 17 Jan 2013 17:49:49 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CDF4DB.046B01B6" Subject: Question concerning replicated server using streaming replication used as a read-only reporting server Date: Thu, 17 Jan 2013 10:49:32 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Question concerning replicated server using streaming replication used as a read-only reporting server Thread-Index: Ac302vvEUrzCjrEaRv6aVnISpHuSnA== From: "Benjamin Krajmalnik" To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.207.29.137 (failed) X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is a multi-part message in MIME format. ------_=_NextPart_001_01CDF4DB.046B01B6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have 2 servers which are using streaming replication (pg 9.0.4). The secondary server is there primarily as a disaster recovery server, but we are also using it for reporting, so as not to place undue load on the primary server. As I review the logs on the secondary server, I frequently see the following: =20 2013-01-17 06:05:47 MST [local]ERROR: canceling statement due to conflict with recovery 2013-01-17 06:05:47 MST [local]DETAIL: User query might have needed to see row versions that must be removed. 2013-01-17 06:05:47 MST [local]STATEMENT: Select statement goes here 2013-01-17 06:05:47 MST [local]FATAL: terminating connection due to conflict with recovery 2013-01-17 06:05:47 MST [local]DETAIL: User query might have needed to see row versions that must be removed. 2013-01-17 06:05:47 MST [local]HINT: In a moment you should be able to reconnect to the database and repeat your command. =20 Is there anything that can be done to mitigate this situation? ------_=_NextPart_001_01CDF4DB.046B01B6 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I have 2 = servers which are using streaming replication (pg = 9.0.4).

The secondary server is there = primarily as a disaster recovery server, but we are also using it for = reporting, so as not to place undue load on the primary = server.

As I review the logs on the = secondary server, I frequently see the following:

 

2013-01-17 = 06:05:47 MST [local]ERROR:  canceling statement due to conflict = with recovery

2013-01-17 06:05:47 MST = [local]DETAIL:  User query might have needed to see row versions = that must be removed.

2013-01-17 = 06:05:47 MST [local]STATEMENT:    Select statement goes = here

2013-01-17 06:05:47 MST = [local]FATAL:  terminating connection due to conflict with = recovery

2013-01-17 06:05:47 MST = [local]DETAIL:  User query might have needed to see row versions = that must be removed.

2013-01-17 = 06:05:47 MST [local]HINT:  In a moment you should be able to = reconnect to the database and repeat your command.

 

Is there = anything that can be done to mitigate this = situation?

------_=_NextPart_001_01CDF4DB.046B01B6--