Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jHYxn-0008Jo-Gk for pgsql-admin@arkaria.postgresql.org; Thu, 26 Mar 2020 20:18:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jHYxm-0004D9-0q for pgsql-admin@arkaria.postgresql.org; Thu, 26 Mar 2020 20:18:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jHYxk-0004D1-Vf for pgsql-admin@lists.postgresql.org; Thu, 26 Mar 2020 20:18:49 +0000 Received: from sender4-op-o11.zoho.com ([136.143.188.11]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jHYxf-00063i-Te for pgsql-admin@lists.postgresql.org; Thu, 26 Mar 2020 20:18:47 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1585253917; cv=none; d=zohomail.com; s=zohoarc; b=NkllWFkqesFvi0UQSTwoHg7saKiQz8Dr1hchz0wZsKeIgooydMAiDa+BqGhM3ayvGs0HobZy+jTu5w17iS9rAaCdtGFKoh+FW1wYKUHGC8kTxPB9IIg/rg9AqUP/DrDEO2mA+jUCJlGyU5HHXMUqvjvND0oHMBoFmosvmnYbNhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585253917; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=6Hyy5NIUCoXIxu7i41TX5ZgP8xFzCvxZKpjZzplf160=; b=JNCbVszB+NYUxu2yucIUOD3SPGGG/ap9flhx2NULRA4T2i7rwn/++6wU6bB+97KQiifc/H4bnwT4ZTn2LrAAIHP4a8MmQWFbU56snl2LHOiimEy5BU9G3fLrtRBp4GShRLcnxX7/oSx3IBctyC4J22RlTjZNL2S7dChDripwWFk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=realtyserver.com; spf=pass smtp.mailfrom=darron@realtyserver.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1585253917; s=zohoemail; d=realtyserver.com; i=darron@realtyserver.com; h=Date:From:To:Cc:Message-Id:In-Reply-To:References:Subject:MIME-Version:Content-Type; bh=6Hyy5NIUCoXIxu7i41TX5ZgP8xFzCvxZKpjZzplf160=; b=Q+Pv4kxHOrPEHQ7lYo6WIiStJS5iv8zKyfdBOV6PKiJfeDHLt+HnFKjKg793pHFS TW5E8SUqdzXNCNf0pbbVk/8mbZUdprxgnx0Z5GXxtXNZm0u6VFlAMXivKhZ8c32tlAb Z/+aXlYvdQk1LqBgf3p5ftf3PoiYv2tit81V2QUQ= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1585253916436522.6232454380466; Thu, 26 Mar 2020 13:18:36 -0700 (PDT) Date: Thu, 26 Mar 2020 13:18:36 -0700 From: Darron Harrison To: "Rui DeSousa" Cc: "pgsql-admin" Message-Id: <171187f1f11.e7c537f6208044.4379759561125142996@realtyserver.com> In-Reply-To: References: <171180a0730.f301716f192269.5929166075824764633@realtyserver.com> <8612E7A0-95FE-45DD-92BF-99FF68757BCF@crazybean.net> <1711838a1a0.b8776dce198656.4553889266632620330@realtyserver.com> Subject: Re: Vacuum Issues MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_687671_1155254645.1585253916433" Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_687671_1155254645.1585253916433 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I am not seeing anything suspicious on the master or slaves. master: =C2=A0 pid=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0 usename=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 |=C2=A0 client_addr=C2=A0 | client_port | state=C2=A0 |=C2=A0=C2=A0= =C2=A0 state_time=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0 xact_time=20 -------+------------------+---------------+-------------+--------+---------= ---------+------------------ 17627 | xposure=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 64.= 40.104.231 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 13231 | active | 00:00:02.= 11561=C2=A0=C2=A0 | 00:00:02.116436 31197 | vancouver_island | 64.40.104.242 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 8174 | active | 00:00:00.067581=C2=A0 | 00:00:00.068289 17616 | xposure=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 64.= 40.104.231 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 13216 | active | 00:00:00.= 015216=C2=A0 | 00:00:00.015392 17631 | xposure=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 64.= 40.104.231 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 13230 | active | 00:00:00.= 007903=C2=A0 | 00:00:00.010017 =C2=A0 4589 | postgres=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -1 | active = | -00:00:00.000002 | 00:00:00 31578 | south_okanagan=C2=A0=C2=A0 | 64.40.104.230 |=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 32926 | active | -00:00:00.00138=C2=A0 | -00:00:00.001307 Slave: =C2=A0 pid=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0 usename=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 |=C2=A0 client_addr=C2=A0 | client_port | state=C2=A0 |=C2=A0=C2=A0= =C2=A0 state_time=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0 xact_time -------+------------------+---------------+-------------+--------+---------= ---------+----------------- 187058 | postgres |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = -1 | active | -00:00:00.000004 | 00:00:00 Slave: =C2=A0 pid=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0 usename=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 |=C2=A0 client_addr=C2=A0 | client_port | state=C2=A0 |=C2=A0=C2=A0= =C2=A0 state_time=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0 xact_time=20 -------+------------------+---------------+-------------+--------+---------= ---------+----------------- 19411 | vancouver_island | 64.40.104.242 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 30274 | active | 00:00:00.08489=C2=A0=C2=A0 | 00:00:00.085521 18180 | pgsql=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = -1 | active | -00:00:00.000003 | 00:00:00 Slave: =C2=A0 pid=C2=A0 | usename=C2=A0 | client_addr | client_port | state=C2=A0 = |=C2=A0=C2=A0=C2=A0 state_time=C2=A0=C2=A0=C2=A0 | xact_time=20 -------+----------+-------------+-------------+--------+------------------+= ----------- 29524 | postgres |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -1 = | active | -00:00:00.000004 | 00:00:00 Darron ---- On Thu, 26 Mar 2020 12:22:57 -0700 Rui DeSousa wro= te ---- On Mar 26, 2020, at 3:01 PM, Darron Harrison wrote: Unable to run the first query and third query. I believe it's a version iss= ue, as we are running 9.2.4. Looks like backend_xmin was added in 9.4; shoot Replication slots was added in 9.4, too; no slots to worry about. Since you don=E2=80=99t have access to=C2=A0backend_xmin; you have check th= e master and all the replicas as you have feedback enabled. =C2=A0 I would look at all non=C2=A0=E2=80=9Cidle=E2=80=9D sessions=C2=A0=E2=80=94= i.e. =E2=80=9Cidle in tran=E2=80=9D could be holding on to an old xmin.=C2= =A0 select pid =C2=A0 , usename =C2=A0 , client_addr =C2=A0 , client_port =C2=A0 , state =C2=A0 , age(now(), state_change) as state_time =C2=A0 , age(now(), xact_start) as xact_time from pg_stat_activity where state !=3D 'idle' order by xact_time desc ; ------=_Part_687671_1155254645.1585253916433 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =
I am not seeing anything suspicious on the master = or slaves.

master:
  pid&nb= sp; |     usename      | = client_addr  | client_port | state  |    state_ti= me    |    xact_time
-------+-= -----------------+---------------+-------------+--------+------------------= +------------------
17627 | xposure    &n= bsp;     | 64.40.104.231 |     = ;  13231 | active | 00:00:02.11561   | 00:00:02.116436
31197 | vancouver_island | 64.40.104.242 |    =     8174 | active | 00:00:00.067581  | 00:00:00.068289<= br>
17616 | xposure       &nbs= p;  | 64.40.104.231 |       13216 | acti= ve | 00:00:00.015216  | 00:00:00.015392
17631 | xposure&= nbsp;         | 64.40.104.231 |&nbs= p;      13230 | active | 00:00:00.007903  | 0= 0:00:00.010017
  4589 | postgres    =      |        &= nbsp;      |      &n= bsp;   -1 | active | -00:00:00.000002 | 00:00:00
31= 578 | south_okanagan   | 64.40.104.230 |    &= nbsp;  32926 | active | -00:00:00.00138  | -00:00:00.001307


Slave:
  pid = ; |     usename      |  c= lient_addr  | client_port | state  |    state_time=     |    xact_time
-------+----= --------------+---------------+-------------+--------+------------------+--= ---------------
187058 | postgres |    &n= bsp;        |    &nb= sp;     -1 | active | -00:00:00.000004 | 00:00:00


Slave:
  pid = ; |     usename      |  c= lient_addr  | client_port | state  |    state_time=     |    xact_time
-------+---= ---------------+---------------+-------------+--------+------------------+-= ----------------
19411 | vancouver_island | 64.40.104.242 |&n= bsp;      30274 | active | 00:00:00.08489 &nb= sp; | 00:00:00.085521
18180 | pgsql    &n= bsp;       |     &nb= sp;         |   &nbs= p;      -1 | active | -00:00:00.000003 | 00:00:00<= br>


Slave:
  pid=   | usename  | client_addr | client_port | state  | &nb= sp;  state_time    | xact_time
-------+-= ---------+-------------+-------------+--------+------------------+---------= --
29524 | postgres |      &nbs= p;      |       = ;   -1 | active | -00:00:00.000004 | 00:00:00

<= /div>

Darron




---- On Thu, 26 M= ar 2020 12:22:57 -0700 Rui DeSousa <rui@crazybean.net> wrote -= ---



On Mar 26, 2020, at 3:01 PM, Darron Harrison <darron@realtyser= ver.com> wrote:

Unable to run the first query an= d third query. I believe it's a version issue, as we are running 9.2.4.


Looks like backend_xmin was added= in 9.4; shoot
Replication = slots was added in 9.4, too; no slots to worry about.


Since you don=E2=80= =99t have access to backend_= xmin; you have check the master and all the replicas as you have feedback e= nabled.  

I would look at a= ll non =E2=80=9Cidle=E2=80=9D sessions =E2=80=94 i.e. =E2=80=9Cid= le in tran=E2=80=9D could be holding on to an old xmin. =

select pid
  , usename
  , client_addr
  , client_port
  , state
  , age(now(), state_change) as state_= time
  , age(now(), xact_start) as xact_time
from pg_stat_activity
where state !=3D 'idle'
order by xact_time desc
;


------=_Part_687671_1155254645.1585253916433--