confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""
hi,
in our test enviroment, if one database's have major update operations, autovacuum does not work and cause major performance degradation.
if found this issue may be resolved by revert this Skip redundant anti-wraparound vacuums · postgres/postgres@2aa6e33 (github.com) commit.
after fetch some disccusion about this revert, i have some question as follow:
1. i understand that anti-wraparound and no-aggressive autovacuum will be skipped for shared catalog tables, but why this can trigger autovacuum does not work for others tables ?
2. "this could cause autovacuum to lock down", this lock down implict that autovacuum can make a dead lock problem ?
3. how to reproduce this lock down or autovacuum invalid issue, must be cluster enviroment ?
so is there any body know these issuse or commits can give me some suggestion about my confusion.
| |
jiye
|
|
jiye_sw@126.com
|
jiye <jiye_sw@126.com> writes:
in our test enviroment, if one database's have major update operations, autovacuum does not work and cause major performance degradation.
if found this issue may be resolved by revert this Skip redundant anti-wraparound vacuums · postgres/postgres@2aa6e33 (github.com) commit.
Please provide a self-contained test case illustrating this report.
regards, tom lane
we can not get determinate test case as this issue reproduce only once, and currently autovaccum can works as we using vacuum freeze for each tables of each database.
our client's application is real online bank business, and have serveral customer database, do a majority of update opertaion as result trigger some table dead_tup_ratio nealy 100%, but can not find any autovacuum process work for a very long time before we do vacuum freeze manally.
and out autovacuum params as follow:
| |
jiye
|
|
jiye_sw@126.com
|
---- Replied Message ----
| From | Tom Lane<tgl@sss.pgh.pa.us> |
| Date | 6/5/2023 11:37 |
| To | jiye<jiye_sw@126.com> |
| Cc | pgsql-hackers@lists.postgresql.org<pgsql-hackers@lists.postgresql.org> |
| Subject | Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums"" |
jiye <jiye_sw@126.com> writes:
in our test enviroment, if one database's have major update operations, autovacuum does not work and cause major performance degradation.
if found this issue may be resolved by revert this Skip redundant anti-wraparound vacuums · postgres/postgres@2aa6e33 (github.com) commit.
Please provide a self-contained test case illustrating this report.
regards, tom lane
Attachments:
D78EDB51-228E-4407-9AE9-916319778E91.pngimage/png; name=D78EDB51-228E-4407-9AE9-916319778E91.pngDownload
�PNG
IHDR � 8 ��[, sRGB ��� gAMA ���a pHYs � ����e ��IDATx^L�w���Q������������������ggfgvg���v��GI$���Ax#��a������@<w���������k�?���_�/Mdf|#"##o����cy�T�u�����~c<�������b�5��X���by2�S������t��gHS�� �f��{K��XkM�bm"/�)�:���Xm�E�����'b�1�]�wGc�y<:�G�U>��1�1+��X����(u�b�D�5�c�=��E�����T�G�r�t�zGc�:N���dl��c�z�'��q�9A��3�S�J}�:��y�v��#��D,��CLk��X���z}4��c��7�������.���ahEY�u��k�c�?�����5��
���X�;����A]k���,V��J����y���k�J��!�;�c�����<?�����K�>e,��%���=��C�n�+�:���w4��G����a�{$��(���8N���Mk�e��5�V���q����Q�v�~�~�a����
����em�^*C�m������X����P�e�A���GZh�~/6�3��s����>]���+�%�A������e2���'�ho���R&�7� ���R�D�)w�:�y�������q2���[f�0�C�1c�oh�����Gr��yo0��c��������T��t������{ z/Z?i0����{��X=B{i�'��'���h�zz>n;��
��
m[��%��2�-�����iO��{��\�Y��r=�����!�A_�����i��tiO�~w����s��dy����W��\m}1
���;
Rs�O���-[s��6}$��G�6E;K��1�� �3�����?u����������5cm����j�I�����������K�i�q�8� ��>J_�D��j�]�9D=�y�X4iC�:;���>5��Z�4�NDe�v�9/����#k���7����=+���p4�G�ql8��I9U�Z�:��y�:j��6w�2G�r ��������tT����;������e����K[�t�����[�
5��nM������M�Z�m%�G��|�1j�v�����^�;�M���u:7fy�q��m��������|j0�5�g�yW�������%�ZC�A����y��_e��f���C����������5����.Z-��Y������C�z�`��F��3�S�9�b�9w�����I���}\j���b�3�S�A:�/�f���&��7��q�|7��_��\,w&bIl�O���d���J������'P�b�5�=N^�l��w(�.X��8�c�K9=pc��`�{��+���^�<�I&��+����X_��
������i���|*�h�i>O����6�(q$������Z�[-�Y�8�R��|�Z���K���������X�T`"�6@���k%�ip�b���)&�$�R�����!�$� � �� ��5���V;�L�Q��X� �%�~ B/+]U�m��$Z P;,�k��`!D� $��l����e����&��[�c�6,e�>V���R�����.1a�����hS�+L�%�� ��y.s��������5���m`����x�L�5�W0X��
{U&�"� �J��V2\�=�+��~�K���e��h�8R�@� h��XW�*qvQ��8�����5K;Y� ������s�>� �-V�d��Y��/�*@,�k�[\�
|.
���J]�c���,�M�����U�
cX��,�(�h�
�`�K���*dm�x�w�rW ��i���@�H������B��X��H�qX��*�X��}�}���C�� B!i���l�,7-Ca�~ �]�����c���z��Ba[��a.1�����t�Kf�U �q��q8�Oi�#o��;����6/�V����K�����3�i9K2;�����el��A�g}���E�v.����s-��y�tq
�x:���N
o�9���
����@�DYO
+)�@�M ��`)���k�K9�o
����R�f�4B���l�5 �@ZDg�s�O��)��U���� 0jP�@o�������f��?��LnL"L� ��;I���CQ`���Y~������t�OD�6U&�
x�����~Ts�b�~6x.�
��S�5�h��H��4��t��:��B�B��Ha���]q�;�Q���1�=�q�����n���c�|�F_ ��I�$�� M����#��>�G�/T�����:����������Vy�2OR���-��P����s�E{���z!�q(J�{c���(��'�����4�wR� ��� ~���'��;���J��i^0��/��9W~����Z����h?�q^�/���S`��k����>|s�����_���������|_����g��z����Vw0��@����n-����@����r���.����
���^n����
��[�[��a|��6���8g����ll!p�/���u�N�_-����~@�%�T�B ������(�'��
�-������3����9�r�p���F�_��`��4 ���e[��L��'ru�����iN'������+�)����n��e�# 2�{0J%���4��Hp���:0��� �"���%���h�bj�3y8�`�����e�����FN�
z�
2�e��}��3�7-� Vxo�v�d�} b�I)��]5�^j>2C�V'��\��#���������@�����L�-��F;�,g~&:������|� )D,A7��~��>�� �}_?U��J��/�\\�m@�]�yi
`��������$\��`*K ���K�TX|h���!����2�2`���7)p� u�k,�u���0�b�Q�4X�� ��.�+�����
.�Zr_��� �>�����
0_�+��wdDp���<_i�M��>D9C�8��^�O�_-�rh�&����L�Y��C�Pc�Yl
������#�������q�u,����a_fX b���"��� �UKnD0a�L�qI�@���D0���5��f�� � ���kE�S(�}����QF`Xb����/#�;��#�?�P���w�[�M
�
]�!������u��S80y.(+����IRp��kjg�����_WSHO��z�*��R#g�;�#5����;-���wM��H ��4e�]w�������
��([`m�'��$x�|��l��u�&(����� �u �u~�P(C�^"H��n� ;��&���q�()������BO:6s��n{��{����}�)HB�2B������� 5�
#u�j����CQ�������������O?#����s7Fu~_��
�l-]�oR�/hA�iO�}Z������tS@+��1y�B���u�2�
��>c�<��j�-�@����VM�|����3�j�C1�������X���u&jo���j���v�����z~��p<�����O,��#{c����h|��Z�������(��p���V�����W��r��-�o0������Q0�������|\P+_n���c������jWLB���3���������/�� (>�������)e�(�B����KA�6-�l]�y��yg��k���)@}"6��y�Fl���]� �x!���l �k�qza����r�?��zq�2�L������08���O�8C�s���Jlt��o{��cy�4�_��.u��,������ �)�(5�e�9 HB�� �� ��+�����0��
��5��s���!�����I)Y>�J-~��A'�p��/Q�����`n�A�i��&�o5p��~/��1��FY�oy��L]0� �gYI�h�����f�����������Q|i ��M�� �dX��k��� (q�v��4�n$��|�yY�br���Y����X��j�Z�PS���j5�^� ��3�h���e�u���\���Y�O�5��s�Bq��\�c�-n �r���N>�
���
4\���L�c�09��H��i�P��W��M�HZkQ6�����������n������7O�h���Q�@�[h�~� �r?L`?��������P�)�2����<���u�����:������
�L
�qh�
����'u��\>��� /��8s���*��m�����K��^�^
� ���A�>u�i����j�]�Y�,��0�E�e)����(k/�_i���-�1�1� +�����]-��������@O����6�6P% d�j��+��oV��r ��������E� ��{�v[`Jm�A�d5��% T��LJ��y� ��`�
W��n
h&�N������7�HM�;���o���>�ZaD�������,G:�- ��.��G��n���F��bK���U����2BS
Nu�C�:������B���C(- ��O<3��Dc����:��
����G[��S�Q��?nG���4�~���c��'�jIC��9��(�6���5��������,����4�CU�g�����g.4x^gmV:�c .?�2���X��f���x��m_Lw��|�Q��l���[Z�f9���G��'�N�����w�+�s�w$��v����������'��M��r����Y����'5(2��ip]��%�@� �.nk��h�}�
�����J������\���W7�3qjpD^T7�'�5���\u+�a9�w�R���>��H� ���QX�P(
���(��&���E���?������{�y������V�*���M���7h�e����������D]'� y�����5���O�#�����T�<��;%�4`�i&�~&�C�YfsA���g0�
\m� k5W� j�hS��W�S����d�����r/GFcZ`��0�+D��/�TL��&�U�����6�4{R�
`�F�U}
HE}0C-
%����q�k���E� �O��X2��xN~.�����]�����P���/h���hlP�����6�����b�>j���y�=�>���x���;���A�����@���B?��_(!��{�i�G X�A��������D�0� AmyK���+�q�|�G���&�}4�e�e������V��x�2%?S���|�N���V
�!��]1������;�K ���4�ad�}�s8f�{cj���E��_����h��G��'Z{��J9�7EyyGTwF��W�� �iu��������G��/���bncWTVvGcq(zZh�s�1��+i*��<����i�.@��[�l�}����8�
^��1��C+����VZ�~���]�k,`���&8#�-1�O�r��s�'-h�'�t������sO��m�l����h-��3�+|9 B{5Gk�����"u|�>��Bd�y�o�k3Oj���^�����I ��(�h-q����"�X�I-y;����W�y���N{��&�5�u9��TK��'������gn���=�&�W� 4�T')(��H���mPxp/\��R��������ci���Q!�C^�RW����Ah�B���s��0.��5�+D��h��/����U������5c�*~}o1��-��uw�tT )h�U
�����Wik��~� D���$����L-�����]1s����{_L��'&�����������Qm��|�@T�8s�������=1��;�����{w�����G�q�����������q�����6�Gc���~�H{�p��R�����_���)��C1{�@T��i��C1���8��cq�����c��3����6Bp(*����Q��u~?��a�����v > �����|;�Rn?����'�c���(=o,Z���=`�i�2��(���T, �+(�����m������~�� Nj�W�_b���[�_�k����Z?��|}���MP�����i6��n=������ �Z{ ��B�����'�������0�8�V_����Sqvy&����n���NSa-c���\t�+��i�{� �j�+
Tg�5�5~�\�`�i�OM�
� �Xf".�" �L��6���Y�$+4�)���R��|2��]�_�y��!� y��Wg���W�H=�f��=j��E!E-���s3�(7lMD�Hl�0|�2V*��O�V��t�|��G@A��&�����Dq[N�
����e� �|O� A���E���+���m^|aK��{&��y�w_c��gJ�OK y �UA�
p�u�~�x��n��V���C
�n�����ec�b�6�(��I#���q����?�xrg�>�;:���������wqo,uw"d�b�����������1��VT_5����,�-������H��A�-s�~�x�=��I�����
�C`h!,,��#N���������Q{�TT�!��g�H'�Hh, �5��\���'���8)�h�D����)w �)@����R�d~P����AC5�s+�����~��\�"��V�{�: �9�=���=�����P��_����O��%���g�:�5����@G���Q��G�K�*�<I��b�����Z5�-�B�����I�' �:��7��%�����
� gy|(��4O�U�N�oa�r `���)��� ��Bn���]��?��uj�?���[��*�f�A���@�]� �G3Nab�$L ��
aB��E�
b ��.����Jm���W�W����V�*~
C�@���� �/G���&�O\�)��������{u�����q>���#��k�������n3�%��7��3�=1���X���h}h&f>4+����?�c������x ��_9W~�w��r��{����J���D������x���F4���}�{���������_^������h�|c)�e%����1���b������G����<�������Q��P4����b��G�����v.f~���#����;���C ���8�����+q�/�q�O�q�GjQ�A`�PL]�O�,���q�������+���J����8����/��_���eo�>
\W�h�f�u�K�W���`���Z�[������9���z��^�k}�������SK3i���u��s�~S���9�{ ��x��s���N����L:���k�Lg���l <�p��7����4 �?����
�Mig��������VS������oMg��^�vZ-�����O��6
jN�w�����<`~��}w�*Z�*�D@�Dl�t�SkOA�0�/iEp 8
a�g���f����mcu���50���{?�C�F�����n�M�*��N�:}Y���`�� ��G��Ym����3�����������"���"LH�Y0��_0�[ ��aiV�{�����28LXf���I
� i4u@���]�,��X4���� ��([��0�p��L�0��] `����NEz�f����ua��x����G���[������ocq��]�����x����o�Y��!��c���8���q�7�k{k��������4V~�z?z8&;��X��?� ��B����g>z���B\��g�c��X��NL^��{n���2/���q�_����^�{���������s�@
S�Y�K�&�������Y{f���9d���]8Dh��V���O�R
P��:��w ��/�g
�Z��n�����3��0��c��G��2; ~ ����������=�)�a;�������}3 �
�iR��j�:��G��{��f��K�.���UC w��U��I��Z���^�����������i��B��W@�#P�5 ����Mk�?I��)�GP��@\8�N �j���=�vO���*jh���cU =m�v��[��mP��+$�.A�6���jGP.4�}�����Hm�+�u���g^`W��FU�K�W��Q1���
-*�y�,}������;���/�����vD�2�P�pE��I�v��D/���/�h�����K>��t�k�fn��������Q�����y=��������1����Z�������N=������Z���-����?���w"�����N,��"�kq�������b���G������T����o���o^���y-�?����{!�#����X������[1wJ�u���m���<3�t9���K1��n��/��Y@��v ���3V>�G����}"�>>��A��L=Z���o����/<�_:��{%��t3&>�S��R����?��/.���I���V8�/6p��h�� � ��d����+]�zy�DA���62�y^'A���_j��W�_�}�g7��5�o�oK`'m-��~��e�x���^�e|a�����}�R�I�?
�{@=�� �S
��t:���
g��X\;��:�gS�_����������F�eQ�*O�'