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 1noUNH-0005vM-RE for pgsql-admin@arkaria.postgresql.org; Tue, 10 May 2022 18:14:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1noUNG-000359-Nj for pgsql-admin@arkaria.postgresql.org; Tue, 10 May 2022 18:14:18 +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 1noUNF-000350-Ue for pgsql-admin@lists.postgresql.org; Tue, 10 May 2022 18:14:18 +0000 Received: from mail-vs1-xe29.google.com ([2607:f8b0:4864:20::e29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1noUNC-0001a8-Vv for pgsql-admin@lists.postgresql.org; Tue, 10 May 2022 18:14:16 +0000 Received: by mail-vs1-xe29.google.com with SMTP id e19so17712759vsu.12 for ; Tue, 10 May 2022 11:14:14 -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=gQKX42ElNXQcPtMheeDfzxODYk4UfjMCAD7IBT1kofE=; b=leN45zK/2DVoM7ypCwBJMVHovTCyKbk0b1m2HJsD5wzVJs2hbJc18+WIESPFCBP5PW YzrOWambfJ6BspznIr8GjVY/+1Rt20YpqnEL3IZvg7T1XoUtZjI+x2SNI3jvBJddkZLH IFbTyur8I6CMMVgbtxXgczE5kjLJawGg97xLqQwNIrHcLoMDkgNcuXWpn+0v3F/rq1Ve uSAZYXfbkc1RfSUQ6OiOYxGXuDj1WVMtjAHvAAK6/YXXm7FisBoEYr4icfLF4vjafftz LZVn+XkX+/K72bO6T2xK+mZpxTtlsRiB5X9Furrz/3Z6Id100aQuVt+XaCEztHt7hDfr x1Fg== 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=gQKX42ElNXQcPtMheeDfzxODYk4UfjMCAD7IBT1kofE=; b=UfWXt965PwC7KTLJgmDqPVIE3YJ5IG3ZkeMi4T4NCzGLQTqv6aBNuYEdZKSIP1Alkw CybgRE6HlgdUuGpRGXDqXCiBzsFifZNm7MBtjyEat9etmiLeFEjBZ4v6b2ncsLlTg3d/ EgRB2jWb3fOokLfkzvBvmpzrQIQ8u7a4Urzn9389hjlvzXoXDLMgp5vdOZO8fcbCcO6p PkbxvwL+zYCj+idBDqku6Ysefrc7HuEFLptxgfsTTz9WPf9fK0b43M2nP08z/W/PCmeM Mht7Rm1SoqT902MrZwXX1RT97hbwpsyUNYniAwogARlkCr2VhLk9r49RwNg7DM1yBWhd oJ1w== X-Gm-Message-State: AOAM5335rxU1khGh990Y9GN7G2WJLYCDaDtL+AUE5WMEUvl916epAaQ1 yLCz0g6qbTt6LFO4YgYJFhVKC9DIy2+rj2jYU27vcEpEyyA= X-Google-Smtp-Source: ABdhPJxw/7HTLwtuTJ758wwMlVBn0AktFCuRG59SeXj93ElOr1/WkOO2QsfLCSswaejJJzLGH7+hyhCMRIi1917OTLc= X-Received: by 2002:a67:f684:0:b0:32c:c15d:48aa with SMTP id n4-20020a67f684000000b0032cc15d48aamr12261364vso.1.1652206453930; Tue, 10 May 2022 11:14:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nikhil Shetty Date: Tue, 10 May 2022 23:44:02 +0530 Message-ID: Subject: Re: Postgres Stale Statistics To: Adelino Silva Cc: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000c8423505deac4ac3" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c8423505deac4ac3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Any inputs on how we can debug this further? Thanks, Nikhil On Sun, 8 May 2022 at 12:12 PM, Nikhil Shetty wrote: > Hi Adelino, > > About the EAGAIN (Resource temporarily unavailable). >> UDP is a stateless protocol, unlike TCP which is connection oriented. Th= e >> 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 >> for 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 = to >> 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 i= s >> 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. Th= e >> 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 >> for 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 = to >> EAGAIN. >> >> >> may you need to explore other option like disk saturation. >> using stale statistics instead of current ones because stats collector i= s >> 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 th= is >> 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 (Resourc= e >> temporarily unavailable) >> >> epoll_create1(EPOLL_CLOEXEC) =3D 3 >> >> epoll_ctl(3, EPOLL_CTL_ADD, 11, {EPOLLIN|EPOLLERR|EPOLLHUP, >> {u32=3D31860176, u64=3D31860176}}) =3D 0 >> >> epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D318602= 00, >> u64=3D31860200}}) =3D 0 >> >> epoll_ctl(3, EPOLL_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) =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 (Resourc= e >> temporarily unavailable) >> >> epoll_create1(EPOLL_CLOEXEC) =3D 3 >> >> epoll_ctl(3, EPOLL_CTL_ADD, 11, {EPOLLIN|EPOLLERR|EPOLLHUP, >> {u32=3D31860176, u64=3D31860176}}) =3D 0 >> >> epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3D318602= 00, >> u64=3D31860200}}) =3D 0 >> >> epoll_ctl(3, EPOLL_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) >> >> >> 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-inst= ead-of-current-ones >> >> >> Using stale statistics instead of current ones - Stack Overflow >> >> Teams. Q&A for work. Connect and share knowledge within a single locatio= n >> 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 a= s >> 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 i= s >> not responding >> >> https://www.postgresql.org/message-id/1457523467.24545.43.camel@2ndquadr= ant.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 >> the 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 >> sure what caused it but to resolve it we tried restarting the database >> instances 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 instan= ces >> 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 standb= y >> again but what if the WARNING is for a primary database instance and a >> restart won't solve it? >> >> >> Thanks and Regards, >> >> Nikhil >> >> --000000000000c8423505deac4ac3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

An= y inputs on how we can debug this further?

Thanks,
Nikhil

On Sun, 8 May = 2022 at 12:12 PM, Nikhil Shetty <nikhil.dba04@gmail.com> wrote:
Hi Adelino,

About the EAGAIN (Resource te= mporarily unavailable).
UDP is a stateless protocol, unlike TCP w= hich is connection oriented. The recvfrom() code will not know whether or n= ot 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:=C2=A0 =C2=A0 If no messages are av= ailable at the socket, the receive calls wait for a message to arrive, unle= ss the socket is nonblocking (see fcntl(2)) in which case the value -1 is r= eturned and the external variable errno set to EAGAIN.
<= div>
Are you saying the message '-1 EAGAIN (Resource temporarily u= navailable)' is normal?


There is no disk sat= uration from what we see.

Thanks,
Nikhil=

On Thu, Apr 28, 2022 at 2:52 PM Adelino S= ilva <adel= ino.silva@pt.ibm.com> wrote:
Hi=C2=A0Nikhil,

About the EAGAIN (Resource temporarily unavailable).
UDP is a stat= eless protocol, unlike TCP which is connection oriented. The recvfrom() cod= e will not know whether or not the sender has closed its socket, it only kn= ows whether or not there is data waiting to be read. According to the man p= age for recvfrom on Linux:

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


may you need = to explore other option like disk saturation.

Regards,

Adelino Silva
<= /div>
From: 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: Pos= tgres 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, "\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)=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =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)=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, "\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)=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =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)=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.

3D""
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


<= b style=3D"font-family:Calibri,sans-serif">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: Pos= tgres 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

3D""
Hi, On Tue, 2016-03-08 at 16:18 -0800, Tory M Blue wrote: > No hits on t= he intratubes on this. > =E2=80=A6


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] Postgre= s 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

--000000000000c8423505deac4ac3--