Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnade-0008DB-QL for pgsql-admin@arkaria.postgresql.org; Sun, 08 May 2022 06:43:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nnace-00030b-CI for pgsql-admin@arkaria.postgresql.org; Sun, 08 May 2022 06:42:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnacd-00030S-IX for pgsql-admin@lists.postgresql.org; Sun, 08 May 2022 06:42:28 +0000 Received: from mail-vs1-xe2c.google.com ([2607:f8b0:4864:20::e2c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nnacV-0003N4-SS for pgsql-admin@lists.postgresql.org; Sun, 08 May 2022 06:42:26 +0000 Received: by mail-vs1-xe2c.google.com with SMTP id x8so11041847vsg.11 for ; Sat, 07 May 2022 23:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+FvOszU1N8sW3ST4QddJ+jY0qyo4NQluWeBKb47X8f0=; b=bI5wNhP5FYDEcvM19ZiffngZOm+XMh/nrd9ZeZd21c4DfIIgH2A1QZDiKQAf8rqetO EbD5PTmne/KvwkA/4WBzO9B0x8+b4p8YYdH5IIimJT89xgdxmlP81Jw+ZXGRJ7iFbbxg oQ5akY/uQ11J7KxbWXYeKgigWLQMJWtdHPcRV3v0sUOdW0dzazKN0i+ejsYKnQKZBBbE pMKlpOXNv373SQnayd/MnABZHbhzHgTge0gaGxFeFt9/1nW0sTRpMzUU73dn8shZIDbJ eSvRMPIOhiD2+VLTF/LZ/kB1Q56RSFPxYKdEotps0Ige45vOltF7qymRACDgmZfYEZE9 clBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+FvOszU1N8sW3ST4QddJ+jY0qyo4NQluWeBKb47X8f0=; b=2cOtzwuYPj27GqvHzJeQUzyFXPyIbSwBN3maZFTnRvCO+qBCsHV6NkY6vXbmtd838E NOOoJcnloG6qSC7ifejVvwm+/a4yvgoBby9O/nkOTq4lzqblxz1w8r+5MEzYdzfqrN3O UxfFfoqNxjjxwP8Vh/z/AkkwOiZxGhVm9tCLt/A4oGjMkf7GdSAwiWrZQfAXkY+E736K z1oO75tufT/8LIAvne7L3u7FRNCmCtjv8ahohWCp6y1edUucmIfNeA9QadytvnOjAacc ZHxhR9SS5rD54OyzsmOPNjoUUnRGN1o/WLo//1gEQNBdyuY8wu2+wpIpLn7ZguLWTp7l uw2A== X-Gm-Message-State: AOAM533ypXJ8E3VQLsnmMffJfwjm61pUrxtcVWpfj8c6IgmwG4cSqv8j mn8Qg9D7r82GoD58J/RpWV5XzinxGiYlRu0EZFuP97+HMXWKjA== X-Google-Smtp-Source: ABdhPJz6b8yI1LoJGv6cFUe8G9Ukrgd+OUS3JY7aLKjdG4g3leddl7wrlqQORooq2ldVRvb3fZNuQhDU4ywDGnkOuik= X-Received: by 2002:a67:dc0c:0:b0:32d:1572:feb with SMTP id x12-20020a67dc0c000000b0032d15720febmr5704711vsj.45.1651992138189; Sat, 07 May 2022 23:42:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nikhil Shetty Date: Sun, 8 May 2022 12:12:06 +0530 Message-ID: Subject: Re: Postgres Stale Statistics To: Adelino Silva Cc: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000918ec405de7a64eb" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000918ec405de7a64eb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Adelino, About the EAGAIN (Resource temporarily unavailable). > UDP is a stateless protocol, unlike TCP which is connection oriented. The > recvfrom() code will not know whether or not the sender has closed its > socket, it only knows whether or not there is data waiting to be read. > According to the man page for recvfrom on Linux: > If no messages are available at the socket, the receive calls wait fo= r > a message to arrive, unless the socket is nonblocking (see fcntl(2)) in > which case the value -1 is returned and the external variable errno set t= o > EAGAIN. Are you saying the message '-1 EAGAIN (Resource temporarily unavailable)' is normal? may you need to explore other option like disk saturation. > using stale statistics instead of current ones because stats collector is > not responding > There is no disk saturation from what we see. Thanks, Nikhil On Thu, Apr 28, 2022 at 2:52 PM Adelino Silva wrote: > Hi Nikhil, > > About the EAGAIN (Resource temporarily unavailable). > UDP is a stateless protocol, unlike TCP which is connection oriented. The > recvfrom() code will not know whether or not the sender has closed its > socket, it only knows whether or not there is data waiting to be read. > According to the man page for recvfrom on Linux: > > If no messages are available at the socket, the receive calls wait fo= r > a message to arrive, unless the socket is nonblocking (see fcntl(2)) in > which case the value -1 is returned and the external variable errno set t= o > EAGAIN. > > > may you need to explore other option like disk saturation. > using stale statistics instead of current ones because stats collector is > not responding > > > Regards, > > Adelino Silva > ------------------------------ > *From:* Nikhil Shetty > *Sent:* Wednesday, April 27, 2022 4:36 PM > *To:* Adelino Silva > *Cc:* Pgsql-admin > *Subject:* [EXTERNAL] Re: Postgres Stale Statistics > > Hi Adelino, I went through the article and I see there is no issue with > IPv6 in our case, it is using IPv4. I used strace and found 'Resource > temporarily unavailable' error though, not sure what this means, does thi= s > mean there is an > ZjQcmQRYFpfptBannerStart > This Message Is From an External Sender > This message came from outside your organization. > > ZjQcmQRYFpfptBannerEnd > Hi Adelino, > > I went through the article and I see there is no issue with IPv6 in our > case, it is using IPv4. > > > I used strace and found 'Resource temporarily unavailable' error though, > not sure what this means, does this mean there is an issue with disk I/O? > > strace: Process 5134 attached > > epoll_wait(3, [{EPOLLIN, {u32=3D31860224, u64=3D31860224}}], 1, -1) =3D 1 > > close(3) =3D 0 > > recvfrom(10, "\2\0\0\0\230\0\0\0\7@\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0= \0\0\0"..., > 1000, 0, NULL, NULL) =3D 152 > > recvfrom(10, 0x7ffeeb967fa0, 1000, 0, NULL, NULL) =3D -1 EAGAIN (Resource > temporarily unavailable) > > epoll_create1(EPOLL_CLOEXEC) =3D 3 > > epoll_ctl(3, EPOLL_CTL_ADD, 11, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D318601= 76, > u64=3D31860176}}) =3D 0 > > epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D3186020= 0, > u64=3D31860200}}) =3D 0 > > epoll_ctl(3, EPOLL_CTL_ADD, 10, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D318602= 24, > u64=3D31860224}}) =3D 0 > > epoll_wait(3, [{EPOLLIN, {u32=3D31860224, u64=3D31860224}}], 1, -1) =3D 1 > > close(3) =3D 0 > > recvfrom(10, "\2\0\0\0\250\3\0\0\7@\0\0\10\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\= 0\0\0\0"..., > 1000, 0, NULL, NULL) =3D 936 > > recvfrom(10, > "\2\0\0\0\250\3\0\0\0\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., > 1000, 0, NULL, NULL) =3D 936 > > recvfrom(10, "\2\0\0\0x\1\0\0\7@\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\= 0\0"..., > 1000, 0, NULL, NULL) =3D 376 > > recvfrom(10, 0x7ffeeb967fa0, 1000, 0, NULL, NULL) =3D -1 EAGAIN (Resource > temporarily unavailable) > > epoll_create1(EPOLL_CLOEXEC) =3D 3 > > epoll_ctl(3, EPOLL_CTL_ADD, 11, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D318601= 76, > u64=3D31860176}}) =3D 0 > > epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D3186020= 0, > u64=3D31860200}}) =3D 0 > > epoll_ctl(3, EPOLL_CTL_ADD, 10, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D318602= 24, > u64=3D31860224}}) =3D 0 > > epoll_wait(3, [{EPOLLIN, {u32=3D31860224, u64=3D31860224}}], 1, -1) =3D 1 > > close(3) > > > Regards, > > Nikhil > > On Wed, Apr 27, 2022 at 8:25 PM Adelino Silva > wrote: > > One possible cause for this problem is that the statistics collector > process is bound to an IP:port which is not responding. > See the following thread discussion. > > > https://stackoverflow.com/questions/46008372/using-stale-statistics-inste= ad-of-current-ones > > > Using stale statistics instead of current ones - Stack Overflow > > Teams. Q&A for work. Connect and share knowledge within a single location > that is structured and easy to search. Learn more > stackoverflow.com > > Regards, > > Adelino Silva > > ------------------------------ > *From:* Nikhil Shetty > *Sent:* Wednesday, April 27, 2022 2:49 PM > *To:* Adelino Silva > *Cc:* Pgsql-admin > *Subject:* [EXTERNAL] Re: Postgres Stale Statistics > > Hi Adelino, I had gone through that thread before, we cannot move the > stats to RAM as of now. Thanks, Nikhil On Wed, Apr 27, 2022 at 6:16 PM > Adelino Silva wrote: Hi, Found this thread > that explains the warning. > ZjQcmQRYFpfptBannerStart > This Message Is From an External Sender > This message came from outside your organization. > > ZjQcmQRYFpfptBannerEnd > Hi Adelino, > > I had gone through that thread before, we cannot move the stats to RAM as > of now. > > Thanks, > Nikhil > > On Wed, Apr 27, 2022 at 6:16 PM Adelino Silva > wrote: > > Hi, > > Found this thread that explains the warning. > using stale statistics instead of current ones because stats collector is > not responding > > https://www.postgresql.org/message-id/1457523467.24545.43.camel@2ndquadra= nt.com > > > PostgreSQL: Re: using stale statistics instead of current ones because > stats collector is not responding > > Hi, On Tue, 2016-03-08 at 16:18 -0800, Tory M Blue wrote: > No hits on th= e > intratubes on this. > =E2=80=A6 > www.postgresql.org > > > Regards, > > Adelino Silva > > ------------------------------ > *From:* Nikhil Shetty > *Sent:* Wednesday, April 27, 2022 12:08 PM > *To:* Pgsql-admin > *Subject:* [EXTERNAL] Postgres Stale Statistics > > Hi, We are getting below WARNING on one of the standby instances. Not sur= e > what caused it but to resolve it we tried restarting the database instanc= es > but it is still not working WARNING - using stale statistics instead of > current ones because > ZjQcmQRYFpfptBannerStart > This Message Is From an External Sender > This message came from outside your organization. > > ZjQcmQRYFpfptBannerEnd > Hi, > > We are getting below WARNING on one of the standby instances. Not sure > what caused it but to resolve it we tried restarting the database instanc= es > but it is still not working > > > WARNING - using stale statistics instead of current ones because stats > collector is not responding > > > Postgresql version - 11.7 > > > Any other option to resolve this? We are thinking of building the standby > again but what if the WARNING is for a primary database instance and a > restart won't solve it? > > > Thanks and Regards, > > Nikhil > > --000000000000918ec405de7a64eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Adelino,

About the EAGAIN (Res= ource temporarily unavailable).
UDP is a stateless protocol, unli= ke TCP which is connection oriented. The recvfrom() code will not know whet= her or not the sender has closed its socket, it only knows whether or not t= here is data waiting to be read. According to the man page for recvfrom on = Linux:
=C2=A0 =C2=A0 If no message= s are available at the socket, the receive calls wait for a message to arri= ve, unless the socket is nonblocking (see fcntl(2)) in which case the value= -1 is returned and the external variable errno set to EAGAIN.

Are you saying the message '-1 EAGAIN (Resource tempo= rarily unavailable)' is normal?


There is n= o disk saturation from what we see.

Thanks,
<= div>Nikhil

On Thu, Apr 28, 2022 at 2:52 PM Adelino Silva <adelino.silva@pt.ibm.com> wr= ote:
Hi=C2=A0Nikhil,

About the EAGAIN (Resource temporarily unavailable).
UDP is a stateless protocol, unlike TCP which is connection oriented. = The recvfrom() code will not know whether or not the sender has closed its = socket, it only knows whether or not there is data waiting to be read. Acco= rding to the man page for recvfrom on Linux:

=C2=A0 =C2=A0 If no messages are= available at the socket, the receive calls wait for a message to arrive, u= nless the socket is nonblocking (see fcntl(2)) in which case the value -1 i= s returned and the external variable errno set to EAGAIN.


may you need to explore other option like disk saturation.

Regards,

Adelino Silva

Fro= m: Nikhil Shetty <nikhil.dba04@gmail.com>
Sent: Wednesday, April 27, 2022 4:36 PM
To: Adelino Silva <adelino.silva@pt.ibm.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: [EXTERNAL] Re: Postgres Stale Statistics
=C2=A0
Hi Adelino, I went through the article and I see there is no issue with IPv= 6 in our case, it is using IPv4. I used strace and found 'Resource temp= orarily unavailable' error though, not sure what this means, does this = mean there is an
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
=C2=A0
ZjQcmQRYFpfptBannerEnd
Hi Adelino,

I went through the article and I see there is no issue with IPv6 in ou= r case, it is using IPv4.


I used strace and found 'Resource temporarily unavailable' err= or though, not sure what this means, does this mean there is an issue with = disk I/O?

strace: Process = 5134 attached

epoll_wait(3, [{= EPOLLIN, {u32=3D31860224, u64=3D31860224}}], 1, -1) =3D 1

close(3)= =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 =3D 0

recvfrom(10, &qu= ot;\2\0\0\0\230\0\0\0\7@\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0".= .., 1000, 0, NULL, NULL) =3D 152

recvfrom(10, 0x7= ffeeb967fa0, 1000, 0, NULL, NULL) =3D -1 EAGAIN (Resource temporarily unava= ilable)

epoll_create1(EP= OLL_CLOEXEC)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 3

epoll_ctl(3, EPO= LL_CTL_ADD, 11, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D31860176, u64=3D31860176= }}) =3D 0

epoll_ctl(3, EPO= LL_CTL_ADD, 7, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D31860200, u64=3D31860200}= }) =3D 0

epoll_ctl(3, EPO= LL_CTL_ADD, 10, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D31860224, u64=3D31860224= }}) =3D 0

epoll_wait(3, [{= EPOLLIN, {u32=3D31860224, u64=3D31860224}}], 1, -1) =3D 1

close(3)= =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 =3D 0

recvfrom(10, &qu= ot;\2\0\0\0\250\3\0\0\7@\0\0\10\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"= ..., 1000, 0, NULL, NULL) =3D 936

recvfrom(10, &qu= ot;\2\0\0\0\250\3\0\0\0\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"= ;..., 1000, 0, NULL, NULL) =3D 936

recvfrom(10, &qu= ot;\2\0\0\0x\1\0\0\7@\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,= 1000, 0, NULL, NULL) =3D 376

recvfrom(10, 0x7= ffeeb967fa0, 1000, 0, NULL, NULL) =3D -1 EAGAIN (Resource temporarily unava= ilable)

epoll_create1(EP= OLL_CLOEXEC)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 3

epoll_ctl(3, EPO= LL_CTL_ADD, 11, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D31860176, u64=3D31860176= }}) =3D 0

epoll_ctl(3, EPO= LL_CTL_ADD, 7, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D31860200, u64=3D31860200}= }) =3D 0

epoll_ctl(3, EPO= LL_CTL_ADD, 10, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D31860224, u64=3D31860224= }}) =3D 0

epoll_wait(3, [{= EPOLLIN, {u32=3D31860224, u64=3D31860224}}], 1, -1) =3D 1

close(3)= =C2=A0 =C2=A0 =C2=A0=C2=A0


Regards,

Nikhil =C2= =A0=C2=A0


On Wed, Apr 27, 2022 at 8:25 PM Adelino Silva <adelino.silva@pt.ibm= .com> wrote:
One possible cause for this problem is that the statistics collector proces= s is bound to an IP:port which is not responding.
See the following thread discussion.

Teams. Q&A for work. Connect and share knowledge within a single locati= on that is structured and easy to search. Learn more

Regards,

Adelino Silva


From: Nikhil Shetty <nikhil.dba04@gmail.com>
Sent: Wednesday, April 27, 2022 2:49 PM
To: Adelino Silva <adelino.silva@pt.ibm.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: [EXTERNAL] Re: Postgres Stale Statistics
=C2=A0
Hi Adelino, I had gone through that thread before, we cannot move the stats= to RAM as of now. Thanks, Nikhil On Wed, Apr 27, 2022 at 6:16 PM Adelino S= ilva <adel= ino.silva@pt.ibm.com> wrote: Hi, Found this thread that explains the warning.
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
=C2= =A0
ZjQcmQRYFpfptBannerEnd
Hi Adelino,

I had gone through that thread before, we cannot move the stats to RAM= as of now.

Thanks,
Nikhil

On Wed, Apr 27, 2022 at 6:16 PM Adelino Silva <adelino.silva@pt.ibm= .com> wrote:
Hi,

Found this thread that explains the warning.

using stale statistics instead of current ones because stats collector is n= ot responding



Regards,

Adelino Silva


From: Nikhil Shetty <nikhil.dba04@gmail.com>
Sent: Wednesday, April 27, 2022 12:08 PM
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: [EXTERNAL] Postgres Stale Statistics
=C2=A0
Hi, We are getting below=C2=A0WARNING=C2=A0on one of the standby instances.= Not sure what caused it but to resolve it we tried restarting the database= instances but it is still not working WARNING - using stale statistics ins= tead of current ones because
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
=C2= =A0
ZjQcmQRYFpfptBannerEnd
Hi,

We are getting below=C2=A0WARNING=C2=A0on one of the standby instances. Not= sure what caused it but to resolve it we tried restarting the database ins= tances but it is still not working


WARNING - using stale statistics instead of current ones because stats coll= ector is not responding


Postgresql version - 11.7


Any other option to resolve this? We are thinking of building the standby a= gain but what if the WARNING is for a primary database instance and a resta= rt won't solve it?


Thanks and Regards,

Nikhil

--000000000000918ec405de7a64eb--