Autovacuum potential bug

"maschka, sam" <[email protected]> Fri, 10 Jan 2020 14:13:47 -0700
Newsgroups gmane.comp.db.postgresql.bugs
Message-ID <CACydT65+Z_B80xnc+byYxrm0gzGW+Ko+HMxBDb+5ks0C1ctiAQ@mail.gmail.com>
--000000000000a470a3059bcf9a58
Content-Type: text/plain; charset="UTF-8"

We have been seeing an issue where reads on a table seem to slowly degrade
over time. When we run VACUUM ANALYZE on the table the operations perform
much better. It usually takes about a week or two for the reads to degrade
to a point where we have to manually run VACUUM ANALYZE. This has been
happening to a handful of our tables. The mutation operations ran against
these tables are mainly update operations. Very few insert and delete
operations are ran against these tables. Also a jsonb object stores most of
the data within each record. The size of the jsonb object can vary widely
between records. We thought the autovacuum facility would have prevented us
from having to periodically run VACUUM ANALYZE. Is this a bug or is it a
configuration issue on our tables?

*Sam Maschka*

Software Engineer
651-245-4054

*ne**x**tw**o**rld* <http://www.nextworld.net/>

7979 E. Tufts Ave. Suite 900
<https://maps.google.com/?q=7979+E.+Tufts+Ave.+Suite+900+%0D+Denver,+CO+80237&entry=gmail&source=g>
Denver, CO 80237

--000000000000a470a3059bcf9a58
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><span style=3D"color:rgb(29,28,29);font-family:Slack-Lato,=
appleLogo,sans-serif;font-size:15px;font-variant-ligatures:common-ligatures=
;white-space:pre-wrap">We have been seeing an issue where reads on a table =
seem to slowly degrade over time. When we run VACUUM ANALYZE on the table t=
he operations perform much better. It usually takes about a week or two for=
 the reads to degrade to a point where we have to manually run VACUUM ANALY=
ZE. This has been happening to a handful of our tables. The mutation operat=
ions ran against these tables are mainly update operations. Very few insert=
 and delete operations are ran against these tables. Also a jsonb object st=
ores most of the data within each record. The size of the jsonb object can =
vary widely between records. We thought the autovacuum facility would have =
prevented us from having to periodically run VACUUM ANALYZE. Is this a bug =
or is it a configuration issue on our tables?</span>=C2=A0<div dir=3D"ltr" =
class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"lt=
r"><p style=3D"color:rgb(136,136,136);font-size:12.8px;margin-bottom:0.0001=
pt;line-height:normal"><b><span style=3D"font-size:10.5pt;font-family:Arial=
,sans-serif;color:black">Sam Maschka</span></b></p><p style=3D"color:rgb(13=
6,136,136);font-size:12.8px;margin-bottom:0.0001pt;line-height:normal"><spa=
n style=3D"font-size:9pt;font-family:Arial,sans-serif;color:black">Software=
 Engineer<br>651-245-4054</span><span style=3D"font-size:12pt;font-family:&=
quot;Times New Roman&quot;,serif"></span></p><p style=3D"color:rgb(136,136,=
136);font-size:12.8px;margin-bottom:0.0001pt;line-height:normal"><span styl=
e=3D"font-size:9pt;font-family:Arial,sans-serif;color:black"><a href=3D"htt=
p://www.nextworld.net/" style=3D"color:rgb(17,85,204)" target=3D"_blank"><b=
><span style=3D"font-size:15pt;color:rgb(37,55,70);letter-spacing:-0.4pt">n=
e</span></b><b><span style=3D"font-size:15pt;color:rgb(67,152,201);letter-s=
pacing:-0.4pt">x</span></b><b><span style=3D"font-size:15pt;color:rgb(37,55=
,70);letter-spacing:-0.4pt">tw</span></b><b><span style=3D"font-size:15pt;c=
olor:rgb(67,152,201);letter-spacing:-0.4pt">o</span></b><b><span style=3D"f=
ont-size:15pt;color:rgb(37,55,70);letter-spacing:-0.4pt">rld</span></b></a>=
</span></p><p style=3D"color:rgb(136,136,136);font-size:12.8px;margin-botto=
m:0.0001pt;line-height:normal"><span style=3D"font-size:9pt;font-family:Ari=
al,sans-serif;color:black"><a href=3D"https://maps.google.com/?q=3D7979+E.+=
Tufts+Ave.+Suite+900+%0D+Denver,+CO+80237&amp;entry=3Dgmail&amp;source=3Dg"=
 style=3D"color:rgb(17,85,204)" target=3D"_blank">7979 E. Tufts Ave. Suite =
900</a><br>Denver, CO 80237</span></p></div></div></div>

--000000000000a470a3059bcf9a58--