Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 2F9EC43CEB8 for ; Thu, 19 Jan 2012 11:04:50 -0400 (AST) Received: from mail-ww0-f50.google.com ([74.125.82.50]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RntXh-0007F2-Nt for pgsql-admin@postgresql.org; Thu, 19 Jan 2012 15:04:49 +0000 Received: by wgbgn7 with SMTP id gn7so5117wgb.19 for ; Thu, 19 Jan 2012 07:04:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Si0Qt+DeVSZqoXjYYaMTeAPxxzWqbde2pvswfzbNkoA=; b=fkLeghigOoZ90UO9+RoojUPXXX8ZxA/2v+TkFXDbkOofq3hoqNSySkujP2GAzasFo7 7WPSpoFuxAWmnxbIw+apdH34ZRvKzYWLL0BBliKg1H50AuBZk5CfKr3ZRVv6lj153AB+ YMjDkrLQNd/AhCMNUpH6snES9/3G5IS5kt+Tc= Received: by 10.180.82.41 with SMTP id f9mr44854043wiy.7.1326985472829; Thu, 19 Jan 2012 07:04:32 -0800 (PST) Received: from zeus.local (88-149-210-129.dynamic.ngi.it. [88.149.210.129]) by mx.google.com with ESMTPS id gy6sm28500286wib.11.2012.01.19.07.04.31 (version=SSLv3 cipher=OTHER); Thu, 19 Jan 2012 07:04:31 -0800 (PST) Message-ID: <4F1830FE.3030005@gmail.com> Date: Thu, 19 Jan 2012 16:04:30 +0100 From: Alexander Fortin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Sergey Konoplev CC: pgsql-admin@postgresql.org Subject: Re: Interpreting pg_stat_replication values References: <4F13ED11.6080001@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201201/98 X-Sequence-Number: 39010 On 1/18/12 9:38 AM, Sergey Konoplev wrote: > With 9.1 you can use > > SELECT now() - pg_last_xact_replay_timestamp() AS time_lag; Hi Sergey, thank you very much for your suggestion. In the meanwhile we went for a check on pg_stat_replication, but we'll add one as you suggest soon on the replicas. By the way, maybe you know where I could find documentation about possible values from column "state" on view pg_stat_replication? I can see "streaming" when everything is ok, and once I could get just a "catchup" while a replica was synching. -- Alexander Fortin http://about.me/alexanderfortin/