Parallel safety tagging of extension functions

Started by Andreas Karlssonover 9 years ago59 messages
#1Andreas Karlsson
andreas@proxel.se
2 attachment(s)

Hi,

I have gone through all our extensions and tried to tag all functions
correctly according to their parallel safety.

I also did the same for the aggregate functions in a second patch, and
for min(citext)/max(citext) set a COMBINEFUNC.

The changes for the functions is attached as one huge patch. Feel free
to suggest a way to split it up or change it in any way if that would
make it easier to review/apply.

Some open questions:

- How should we modify the aggregate functions when upgrading
extensions? ALTER AGGREGATE cannot change COMBINEFUNC or PARALLEL. My
current patch updates the system catalogs directly, which should be safe
in this case, but is this an acceptable solution?

- Do you think we should add PARALLEL UNSAFE to the functions which we
know are unsafe to make it obvious that it is intentional?

- I have not added the parallel tags to the functions used by our
procedural languages. Should we do so?

- I have marked uuid-ossp, chkpass_in() and pgcrypto functions which
generate random data as safe, despite that they depend on state in the
backend. My reasoning is that, especially for the pgcrypto functions,
that nobody should not rely on the PRNG state. For uuid-ossp I am on the
fence.

- I have touched a lot of legacy libraries, like tsearch2 and the spi/*
stuff. Is that a good idea?

- I decided to ignore that isn_weak() exists (and would make all input
functions PARALLEL RESTRICTED) since it is only there is ISN_WEAK_MODE
is defined. Is that ok?

Andreas

Attachments:

parallel-contrib-1-funcs-v1.patch.gzapplication/gzip; name=parallel-contrib-1-funcs-v1.patch.gzDownload
��%>Wparallel-contrib-funcs-v1.patch��yWG�8�7|����O#-�Hl_;��/�Y���NKj	]k�j���9��o-���TuU�"'>�
]������T�����hL�k�{:\.�����7�O����w�G<���@S�;]�������h��6�'�����uZ�����n�����������/���������/�?���y��5�K����^\u�7��Ov��o����sy�Wk\|�?�>���p4]�
�������n/���~v�����/�F�y�>�v]�������w����������P���jN�	6���o��t���r�<L�p��0����;n������vw�'
 [U�.�/��r�G�G����i6�:�v���1}:�??]lf3�� ��<<8t��A��t�}�'���?=�uw]��p9�y�b�W���3
�`�Y
����?����[��+g}�-��S�9��;�I$`����/���|'�%c�|x�$����v�"{�9��3[z#�/��t~����1r��7�^��^&����f�I�������k�]8���r9{��?�9��<�tn����h���_xs�+�w!]e�d��M�34G� �����l�{���t2]��f�l�/&���DPt�k����J�
��h����k$�
�����f3Tf�]��R�D�����:����o�@}#�m�5���9��Du������jt�A��������'���i�F8N?��%���������e�!�b���C:��p��V��`lv7�wn�nCE�m��:{��_�Dn������w�{����n����������+�/��gw��9�w7��~4�He�����n`�2�"q{~y��N������}����py��L=���,�H,���5����M��c����^���?\�F:<���X�����.&�����
�<@�/Fp�D,���t6]3���H����:�
7 MYR.��c�:�<�����3�`�o�yss�N�%@>�t���I~�}Y�B����G��b�
cY�0������,a���F����t��@� o�]�fs��T���p���e��t��K
��S:D�3�i�E���@���GWg����9K;>F���qf]��N
V�����(Q��T\�����+;R7�od����
o�V�U�����uN��Y�.�I��)7�����i��7�'���7:J[���Iu�qM:=���;_��:
d q��"<�k������*�����������7F�W�o������
?�-������g�R�wTm���x�3\e��y�{������i0[.��z,_�F�3uNO�M�������� b�w�l����V
)B�����e�!bhs�~�.E�����YOg���7�l������������R8�*-�M^��?�ac\K�2K�D���_�/Gx�v:Yx�������H\��Kho��"oc�4�� 1B�$�#��O�����a��*`���Y|����_�#{�����j4v)�f�w2�N�Z�58�Kh��u�������I����W�Z�������ax������XE�8{�
�������_��v����=�>�������K4,1NQo���~�LG������!�^]��R?�_>�����}��s��2�9.r>�^\�
A���6v��;����������E�Ae�^p���*O~T#�#�(&t��ihb&�)��b/������6�C��9%V�R]��0����$�nf���%��n*�t�$��H���H%�D�@�j$RB�F"�X(
E�;����A��{�a[#B��R)��GdE&�	)�p<h���	|)(\�6�����������H������V�9w�����rs��r&���`T?		�/)�]�0���/�N>mHl�M��-[bK.���@J�b��FB�S���(�@Q,���W���Ga�\��D�Q`���Y?�i|��W����L��!IZ����t�pM���p*���������D�>R!1��DZHM'��H4�<�(j:�2@3R$0�k$N�}�x�o(�����	�wRb!H����!2M�l��q���U/d)h��
)�W��o{�>m��71����w�yFf$���[�"bE����r�t�+�p�B	��s����x�+��|,P�X<zFN�b�,�
2������}�w>&p%����]����a��������|TK8J�z:�Q�5���G=�!�w>~h1.�7��3?��SBA\R�^8����	��;����	9\�`0]1]�g�b�l�;���|,`��;�G<�X�q��B?�G?����>�hg�%U�ExCo4Z�����$���^s�*<O\�u^�`�	;�+b�>�"�����tw��p�b�B�.��!$����t2b���������]�1g;b:�9�z�2`�m�{���|�:J��G?�]��O������G�D=��Z��P�?{+����n�+��|P�X(�9>|����Rgl��x��3'7���C4-�6<E�X�7��09U1��O���T��k�t�q�Lm��RmjS��>�I<xX���I�	��I�x�����O���-.�|*��f�Q,#�l��"��C[}"�? ��<����=�Z�����vT�\Q���*����PU8�*��1�kL6�����'�&�f����t�E�w���1
@G �V%q���q�R��5�M���W���nVh2,6+0��~K&���.��n&�!	r�a!�m2�	7�LF��dH��U��{�&�b[���S���o�d�B������d2$A�b2,�`�MF/��������J������������
EEaB���1#B��f$���)Q	��9��-6)<1�?���V�1-����MK�q�JM��!�JL�*:	Om�MK/6-=*����g3-Vb����������F-�A�J
����������m
�DaRh�o������,� �X��M��,l�!aI��[R������+5 �s�U����e�
���h�������I�d`������,����f���LDd���
�eh�G�+5����2Y���mHblTwD��-���=��$�����u���d�-�>I�O��(�kk��I/�X&�t���S�$��l���iVj�����B�s�


�sk����+�=�%���la�����^b"Z��J��V�i2O|��i��o���v�H|6K#�q&�b.[nMn�epVn5�s?��v�U�m�[a��%��YcH�3Y;��r���cfW�c()�R���N]�=�K�.��`D����![�~�������z���[���W�������*o�����=��p{AGo	2������eUb��S�t8�2��U�}�S��d�-�L�C�I]R�������j���^�Q�	�W��~
���:CK[�'"��	�"�7������� [lqDr���MX�8�����8��_�S]lcsO�1������L
"��r�1e�����0�(g]l�`�
HBH�Wz���
�t�T�F#�B�����5Ve
���h�"+�!+��~���MIz������
L��(��@`mk��g�mMB�+���j��C�Mn�n��W�����q�o�&��F���Dv�0�����&�] @��w���`�MFB�+�d�jy������
�K�<�4��Z7���U�Z7������0o�0��hn�wzVp�ZY�my�h�a���P,k���G8��14(��Q��8l�aI	�I�%���)�o������[�%����lKB0Q�R��$�$lH�����,��f�V����������gjD�+��5 ���+3WZ�n6���8*����)��`���3It�
���o������������6�JM��=�U�
������b�o�nP���G��co@T�mmF��b��	OL���2��aQ�oP�i1~�*���=�r9�}��P�f-�����e�T���mm��jfm��H�9����t;��{v��)t�W�O{�^;�+��������y�\zr����B��'G\��4r���I�������`[����}���<A�L��8I���3�S%n�S%�]����Y�V`<X�z.���\����*�h���J�N�{�����T�?Ubj\��Jj5.��K�2.6��Tm\�j���
�Q{�<jbo\�5�f��}�2.]s�"?jR�q�?qR�q�y��j��S��o��H�����{�b���6��'�q���'���Pj13�F���0���Fz(�7an��X�C)��'�C)[k|�J�LP�P���J���?�R��{D�z#��x�'U~;F|R%��T�b�,�T�n#���
l�L#!��*�� �Vj�?���Tj}��Wd�#>���=��W,����K�c�������W${>�bdn��W�35��Xj12V�Tj`�gZd��?��0.�3-��z�����=���E�L�dJ�3-F�$��������-����O�Tjr�]d�=��0?&�X���],mS�]��NY>�"Y.�A;��~�el���.�Z�,���c��+�5���7��d�R�~�j�4O�d�m��~�~�f�������������K��M�LmF��Y�����^����HL�$?��
�<��vG�Hhb,l�HL����������2�[ml�[���d�9�s2���s2[m{���-�q|>'S��I}\��c��L�V'~xF�9��3��><cik��g,����3[kc����}x������Z�B�?CS���,��T}<:y�<"->Q��?1��'j�OLk���?9������M2A�����'j�������,���5��(��|M�����l�sE�c6��������1�CF���Z�d���|�(z��0���3vJy���x���������(F����
�S�a���u8d�������go��?{cd^�go�3/����b^,���������Ex '���*�y �.�@N��I�?�S�U����J��l�UJ{ G�J����1�)�:7����r���zj���0��*����
=��#�;`��#��_���l�qI{}D�����5��>�#���������Z�+S��O�������S:���s���Y?�Sco��N=���3;���j%=���p��Gwl�r��;�����;[kqL���N�����Q<�S��1y���c� O�6'y�G6:��<��?�cipT��X��y���<�#���y3s#?�S���>�S���y��Z3U-�r�������Y��5)V�l�9�=�#���n��!������>�X���Tj[�'�E����Q?�cij�O�X�,O�l��1{�Z�17A�'�3B��b�2=T!7����2��O��P~*�7`U�O�
�4����,Mc�����8?$�G�����l��RPT+|�3h�Q�9:=�v�����@F���
�k�W�ZG���#�f����}I��g���/�qp�;{���a�Z;���!OR�\��
o���P����jo�1���f���_��p��!2`Ako���������o����g��h�J@�V�l9D�3\e����a	�O�y}����4���ax�l�:��I[?l{��l
���������/�?���$u�����z:��
_����`�E���K*��+*�~��W������]g�y��9s���������u�|�,��Go��p�!)�e����;L�r���R���� �
�rwR��u��}sqy������]R�i8?5�o��i3E��������|�W�I�p��|�9us�1
�t��
s��"�W/��:�S_�H�`K�Cb/�%U>����m����xp��F���`1����;�g�t��}}�����F���P������ky�]c����?FF�IB%��G�[���0@�.&O��F�j�Y�'����e������[��3D�8��c���v&����6o�mi&��!ImO�L!!�.�MmFRFI�$�8�Qx!?i��h`���4��!Om��$mU����j�(|:��Q/n>	c��&�E
�������mtiijr�	i��y��(H���4^�[h.\f"���H8Fg�j�/�4���-�~�}����~��v=+?�Z��l�����6#�>����/O�20�a:�<��k�;�N6��� @���8��V�����f��
�^@���4� A�]a"D{�+C��\BDz����HQ����R����������f��nF)�*E�B���[������R�z��������f��^F)�*E�B���[�z���1��Xu���$�����:3������IT�8�L�-�����r��K��>��P��P-Y9�	3��$+�9$+��
[+YX�����U��B�^P����� �ObUH���@-������a������iEB�
S"�W^B}�R��P�!W���0��DKW����U�4�D�r"�dFhem�I�q��D���[�q/���P���;!�ao���xa]�z�����f�#��09����#�K.9"=:����]sw'f�V����9�,�s��f�8��s�S���L�?���D��fd�������	#������{��$�m6I"M3HiW�$���J�%�$��t��26�(�w-��z�w�a�m3�;mX�����y�M���]��KJ�H����~�$�������)�YD*F+S���k��r����|�6��)�U�����$�}6/9�`�=g}�����;���\cH�(z�C��0
�����e(���
f�a���:�5�Q'���Ta����:9�l��ZT�Ynm�������������x�9.�7���/p�ho�gi~��#=d��,�h�&��G��_�#������=�������:���N�r����������/_�6LNfF��z�C�a^Wr*�����c��c�)e
<�����������v��%
��JL�Z��F��~L�@8��`�e�����t�w;WH��8_����y�t������/\r��=��m<�S�K�w�t~Kg�+�w�w�wO�����s��[��s8�_1�[�0��=�N�����w>�{�]:�������i�|��a���|����]��8����{E�G���0����������HD���(��9����_G#�hDk�qz\qL���0�����+qn�������7wg7o�*�ts��g�����W��?�`cDq��k
w���C���$��I�������# y��O,i1�v�i2����H�D&Y2|3
�3	�*����A��@B{�B�W��*�V�<y�'��Gk��������H�4���49��#�D�$ %�$��q�&M�o��I>�J*/�HNp�#[�L�D��G"��S~a	����	�c�r�X���K]��%y����������9��L�����B4BBA6-�	i���cY�rQ�`H�>�������}z-Dt���_�/G8[Pf�b�#�/���9&<,�y�)�!��H����G�C��i�[������	��*�*s�|����+!�P�����+wA��\�7;qY��}���C���������^�����K7�a���7:��K!a;��g�s�~i�<{���<�tw^u�v^�:Q��Op�qT^s���������k��-a��������������*t�w$5J��d��?']������F$Rg�Q�r�������|E�t��6[M�������n6�����g�{���fH����f�e��[q�9����7nl��,���zV%2|����	|��d/����l"��!��wV��j9��m��/2:���a��F�3^-���&j�+���w��4�����kVv�w�� ,���������b�Y�7�����<L�����r��qC�c[����:��� ����������,�k��%t
��F�x��������Q�E�B��6F8^�0NU�M>T2�+1|���G�A����\?;���b���4��
��8y�d�f�~lA�C��Cb���q3&�w�
7@��H�i���b�V1�^�L#�X�tI�C�.�-MIOj���"`+�B���_���^r=f���y��v��C�����6pA���#�R:t�G��E������S��~m+S�+����w��[�C����Z��w�z�x�������z����C��:��U�C�+dt�q{�������>����B]:|�.���C7"��Q�K�nP*��H7/Uq\z�=O��q��c�9���ql�W���z�^��S{u��j�W�Y{�^�^�����2y�����������c��:���s�c�+dt�q{������>�f��3�9v������*���*M\�w���7�u5���������\Z	����.(�O����Z���%��l�����g%���&���+�������3�Y��>��T�/�h��_��
H9�=��T��@@��y8P�<_s�q��Qy8��
p))�~�?o[��v�����)7C�>��]+�-�j���#�
@�gX�V��� �J��gVA��H���l�����1(`z���`�A��QP���)���Q�3�$�T������P)��+o�g�p��x��):ep���Hq�~�@�
������^(z}a���[r������P_��9�7�<:�]�d��\��*&�J��>�b��4�
�������0~�������dE]pWB�`![R���
��*-�f)j��w����@ {UO������]}S��J��K/!��X��O���� �J��
�d>�2�L��"w3T:W�_+J���I���������R��A��R�`+���/8U>uI}���5N_l���	�&�3���������X ��L�0��!��t�8��D����8�	�jRG:Q���M������c�>U'�S�L;�H�i�h�n���N;���kdR����i���pDA8��Q��B����#��_ep�x�:����%���-��[�y��~�����}�U���7S�(>LW��X��Q��@�=BMS���s�x�r�S�-�4���/<���o��2�SO��b�$���~�W(S?byG#�Iu����pl�V������\���H�)��y�"��M��T�`m�Q�����F����=�[zZ��n`�����:f��>�[|��A�(H��ooA��.���������� xb��JS�J7?$�a���0~�LjN��\9��3�D~��d�aD�m���:�E�W�+�#�������$7i.dP������yR\����r��J������tD�D�����'�+�X{D���{�����z;~"�/
U�+,k��W���DL��\�����}���iKb���������1���UT.����o/9!C����[C?���h�*���a'OAU��#l�u�j��������h��_)�9X
�y�P+UN645�Y��p624'����SW�[�b|-����VP0So��e����t��_�����qe8
{���u��<��]�>��
*uo�2ZT�9Q��j}m�����bZkw��Omb�6�V��rxo�A8����q	��e������a��a�f|�,�cd���;Z�!���d��f8H�i��A�H$S����W+�<Y(K����������LY�a��1�������G�'��+e�;��D���*`��X�*A��)+�X�W&�|[�^q&���pI�!f�K�Q�Z{|�Q_�E�3��<��"��4DWkt4�rs~�����a����p�\�������zf�g����DB��g�0�/���\�?Yl��j:,�����&,���$�T�q"�������N�B�~'���y�m��D�[�����5����z NPL}����y!A�����{�����*|#f��(���#�5���3@\*n�3�W���jg=�V��[��L��q�3�w=�d����L�\L�U���L���c�0��L�XHft3��f�a
-��Jf6S�Ed2p�/`N��{��r�Y-���������gSa�Bu
�,�b��D�F���i�G�p��l?���)���$7(�E�)g�]U��{�Am��7��*��O�)e_�"�4oP}s��H�y��o�\�3����W,�L3_�-e���9�55���B}Fh�R�r��P1U��$�(E�9����M�������W���0��e����t<v�	b����z5<%��1`��F��l7�O3g`Xqw�q������#�iw��������?���u���	Q��#����f6�u]����N����q[���C���]���Cj��t��uq>'����"���`��>�1���f5�G����~� kr��_���y�9�A9�����-��]�x�t>���X�$|���h��
��|j:�|�L� ~���ER�?e���]W
Y��.&8{�T`���u5a�����������={s�c
>��:Q�.�S��B������w�w���+�\W��������N��|}���A�q��%��p�s��]����^�X�*�?�z���E��r,zFc�:N�W;#n8Z���G����!�����:&�v��t��	���N��1���1���1!�����:&dF?*d���q!Xq#���;6xt�rvs�;��(�0<J��4Q1�^���F���3_��K�/N��3]���a�e�Q���_D���������
��ts��g�����W��?�`rc�q��kw���C���d8�a��',�����xR	<��'��c;B�������	��CU�h�$'Y��3��c�N���VV%������d�2��g��h:���b�����K���>���[��	��wk�_��D�$�1����bB���=����  *	o��5����X�R%�h��B�)2��g�	%vLXNG�~�p��b�F�UE0���~a��p��0�u��;���%H��F�XZc�-�
R����%��#S��2���~�hX�PR0���l)�3����XS����=m������A��������r{�ErW�J��-
�0	+�zW�-<�;_!��������C�B`rZ�j��G'*FF}��x!�(T��/�A��f��1��u�b��f�|��f�&^LN����=W:��J'�\���+���������]bW�%�eD����������~]�=bW�#f�8u����9�K��d��F�\�*Rg�Q���w������:]8��V�q��;�����M?�d�������b�eqN:�n�\�w�'�co>�}��3���t��aU"���z��'�aL���:�j��"��!��wV��j9��M��/�:���a��F�3^-���&j�x���+���3.^��[	�b��� n({lK1P2R��Y�t<4�Q�o�������b#@�C�FU�V�i����t
����"Y�`q�,Y�Q<���1������X�����3�"(�M�[NQ��%�"��T�.����U�qa�m���pHE�`}1�`6�x�mU%�bVq����Uh���W=��*K'].���KdK�&B�(�HFLx���V�������d���T�'B�D����
 ��]8��cUA��?���@t�0��nU�����#]�!�+�n�DW@tm��u�->���
 ���nk3��k@D��D\!c������@����D����
!z��=8��cUA��?���B��0��mU��
!T�C�8Uv���:���E��QD�&��YG����^�(��)����BqNL
$z��Dt�PH�2q{����H�}�D�����Qe(��6�L0���p�����ou�!5![VDXmK`��%�!6�t}"��-B�X_t!�S�AD�,�+5�1�`���2x%��3Du4�4A-o�"���PCHD��
��*� �`�!��BS��M���G��a��2��s-�Ig��z�3b��~���b�����k��l��F���]���D u�oHU��k��XE E�s�z�1�����j���H�!IZ�&a*eB��h*Xp�m���Nr[�u?�'��d�9j|�a�X�1���m��Z9��)x��\���9:��^��-1F�"\�% D�<�`067�x0�U�������mM�
#�HjL�A�
	&Jm��g��Yj���Pjf��a \U�	F.���A�+!���-)(�P��y�y��]��V��"0���r����� ~W�T���d����)J,U���RwRPm%oj�V2��O��u'�	K�3��y�R�!����;��cY��%bO�H�:����mEp����fk�R�G=��duFb�k=�y�q����0F�3�a��b�`���`�-n��+��9��:��3�C*�OU�A��i�>��@�m�
�7��i'?6��LJW���7�v��hB�������="�{�!�����3m����Sr=1�����k��)C*VeOB~�z9F�����������-1�fK�\�QW�;�����/�&�������9�S���b�2���~�W=S��ey[#�Iu��Sp,�V��A�������H�0��y*.��M�T��*��^�]_�@pn�1� ��s�I��k��� Qo���m�X(N��ll"��M�!��,�������A�(g�R��^b���\[.��������)��
��r�����9S�g1�Q�)�t�y���A.����2'X��i��Hr��B%
��7w�[S�e�����`��sU_$?��GB�h���3!(���[�P��%!�l�."A���"������B�r�^!|��0�Hd�4��LP1�&�J�������\����Oj���8	|U�A����o/�9C��
E����z������tT�aE�[����P���l���N��N�y�><�{�
PM�\4W�
��/g������o�)��;T���'BZ�Cg�)��G���N��`�N��s�]?u�{�@'�{�����(����y����N����S��[��)N���	66�?�W2:�w��������	DTT�Y_��r�)5>v����C��;�De��CF�3<�����a$����r�}���z�0�����d�����Z�,��zB�Y�C{K~�'���f�;��D���*`��X�*Au��)+�X�W&l|[�^q-��qI�!m�Y�q#�a�b��m	�(:��Q|u�FIPx/��5:/�`p���S������lBq���s{�%h���J$��	U����H�<W��q>j������8�vz���F�`W����2?��-�,Bh{|Y����f�?�,B}M6!�����W������v�8�&���o�������[�c�,����� {9����s�K�������^��lZ���t�V�	J���02���06���a3�i���y�fcS�e�XX�gb�2���0�fX?������l���{�%��(��V:�����.�F���T��P��%��Xn�������������KE��_gH�Uo��uA�i[�2����_$�<���{U������\I0�����U"1�	����2�}�sx+^�s}�_���o��0�t��5{��C��8H�K)_��TyV�8�y���_SN4ASN�BSNtD.�]a��Dbh�(�__F���i4&�	�S$��t���������t9sf�v������x��?h6O��C�������]|�������P_�t��#���|����Ij9�W$���.f�k�sg/�J��L���	)G�yko���P	�a�v(��63&�+����l!���v��r����o}����
��M�����[��%���p��j��#4�������w�Ga��eQ8^������M�38=�y�8H�y�K��������_�Xe0� ������O�M~o.����zq�i���>�uv�����_���)i�x}vw���h������,��Y<x�������rK�Z|+T�
�����������+��wa]���������9����jD���b����������W�5�~q
��1#��T|���~ha�����.�/$y~4�T��fsx���=*OG�����LT6=<���X�Z�X���r�����Wc�4��rM�N0\M��:��j�8��?��r�����{o�|�z5�����������!�����h���_c�wM��;g�Df��^H�������t�X�8��@>` ��'R��h������S���/�u�OQ���gJ�����X 
d�����XQ��=<��[��f(�
k$u�e4�Xj�O�bYDR�H��H^F�D����,hD� ����X<l�,F��c���{tlj��:�g�h���8$v���1c;��1;�$3�Z�����Y�	���k���
�o6����y9����g��
b�r��u�W���|�I�tu�p��@���3x�|����i:"�a6��_�{�q�x�0#�h,&�����1��6@��G���%���Yud��8*�:F�z�r�2��S���G�H��h��"��������@�#����9�Z�5��,���'?B�F�!����g/�w�:����;$����t�	�����b��@)���b#�v�����h��$Kg
m��2�j���bM��8�N�{����������������>���'d���y����Z"K�Y����$z�2y.�X�1��w�����QNz/�����"����G3�=�G�rL~6�,Q�y�������e�H���IlSLX#y7�W������*I����Wqa[�j����c�B}���c4l�|�+��%+���h�����qA����}.vs��=L��q ��l"����[����GHE�3$���-l����&�1�or!���n�|�+�&^<x���s�M���)��M��oV�5B'4u�Q��<������~�E�C��tk]���x��,uy���!/f��C�
WK���d��5%�@�[|I��������q�k�T��
LJ1s;xi�s�#���I�HUi��~�����ZS����Q��7l���L�� ��AW�HU����7��K�z���Np�\/
T����n�����2��
*��4P-���ht�w{#}�����}���iH�tA������\�"]��f�$~��6�j+��9Db�	���~��iX������Q�>�3�4���>25���6�
q��$+���!c�{/����~0��*+WQ,c��(�p6�h�!�r������_���il/�����AjB���F���F�g`�$mk;V>rICq�����'���_/��j�}��m'�!�i^|�N�A��a�AN��1lN�V�U'g��c�-���6$�04L�
M��N}�dx�Un/��B�K��)��#^���n���8���z��o���6���Ww��f\���\<�NV����Q����/�����)4
�K
��X�Y�&Y_�$�S��)�O0�]�"^4��������}�����:�Q��|%�����p�?���=���:10�m��t�/��Jh�/�DA�t&����iL����;2��a��$\�uk���0$�=��+B����_��?�q����������xdh���;���dH�
7���/�r.V�,
k��_�vd���	d,���z{�3�����Lc�= ��������'$����X.+��V�z�����8����%�,W�h�W�7o�o�w�w�������������h��?,|u}yyF�����pW(�;
.Xc���c���_"KL��~�����
�v7
��r�Gwl�B�r�C���q�l�t!��b���
qd���4�<�K�o����%�|Y�>����s8���.1�A0�,�R�::i��������sv�p���w?#�IpG���_^ �����goE����G�z�������+�,v5� ��B��>�:/cq�(�-Rzw8t������}�;�UG�-����l����$�����z	�3����<hT��Tp��`�N��pR������py�����-u�4p�����?�EB	��B�i?���W�o�R����N�����7�I0�t&�G�]?'|BaPX�����$���K�v�|v���m���������#$Y��(z��%s�Cd.�t.bB��F��5�5DM�"o5[+H�����%�<a ]�u���Ta/�#�(:�&�&z�&��G�X:�4�hKW4E��%��?��H���������k`�u�,u;��&@h:C�7��>�L�Nh�Y��8kHgT� 
��6��F��?-�?�=z �l���Mjv������_�y�k*���,�H-)"������0���'@T�WsJA+�,9g��
|�S�h�<�,.�7�
z���
�w��/�ES��|�b���!^J�F�o���c)�f��5
%���V�zt�f��H�%*p#�y�x�T��A���E�T�;*���+�X��.�������P%��9��18�+�
��$4x��������  ?���/���*�T��6�$�qX�Z~*	iQ
�q�K���q�v� I��P���Rq�@��������X�(}�:�f�k�_$�0��	��SC�����APuP�����?*����o��?~���]�#v����?ng_���.���$�����p�������]��v.F>9��G��/��l���)o��c��q�p^T�3s"7w{~w������'vw�.b�_�#0oz�]~�������}��7�s0k�����'>u&]Xws��[���k	���b�^���;�����.<��}g��=ABr���:���?�!�8�D
�����_u��~������" ,1bH��9C��=�2�R9A�Q�����G��G9/G���jm�x����9;E�:WBWe�l�zt��p��%������X��i�w�C@�1��Ja@��i����@8O��2_9\a�A[U��V���y����>k�����?��8�{��?-�e?�{��>�r�G��
�5��_�3��2�����|��gVn$�"&�_/%L_��4�PE�A$�W������?��^R�����[����c�-�@�NSs��I����@7��F��U* ���Iy	������Wxp)/���R)=��6�]6��M_
5����&�$@��p��"�
�0Jri:�6X.9&y��$��0irL���K�2J����`�I�!��T���hRe\j�5�2!�T��:U��gO�!��T��?��2��*^RI1�2�:UFuY�q�*�y�*S�z%�3 �$q�P�4�����d��W��~<2&���&���'��D���R�dH��;��T#��3���-oRM"_PR�V����
��	��)6��n*_/�`2N��+�^������]!�<��o�%b���o9��w4$�u\~/��u\~��uHa��C~	u���e%SL��i����!2J:�D9�Q�$GG�l
Q����$��,*�rI�����\G8L���8�����#l�!l�'l�JXqt����K#��tE)�:��J�a�(��v��j�i;%���f�I<
W#e���F�I<tJm��#�T&�H5�I<RMe�TS��Cj�$����'�dg��I< ���2J�I�a�x���J���e�pJO�((|��"�'\�o��$�����P��c��`c�	>��'kp���=�[�Z	�N�Q�_��*�G�B|��p$�T -����N��t�VF�����=,���Z!��*�%rF��T��6��'�q��HH�*IH��h��C^"~��=�Y�$����g�{*q�@��������X�(}�:�f�k�_$�0��	�v�U�A��C��C�a�
�8dx��o \x���#q������$�"�%����F��"�hR|B���8�y�8���<�����,�lz6.���!�H��\�F�f&�r�
J=*�?�������T}���������:I��IY��*�1=e�,J�I,��(3��a�����T��T�dInb����ME�&S��B��+���;��O���Py����O���f�d8���F��>�4�O�GU���o��>��|]��z]����*A��q����Ve�G�n{G�����'^k0T0�k)0�+����GU��Q��M��`JFUw����|Kn.�?�������zq�i�y���U�2~x�����v(~�>�6js]��O�c�����VQE����`OG�9+���~\S�R�AZ
�T��x�;9��S	����GR*��J�R����*��o��*��?F��{�����d���6}l�`Vo���&x���lm�db�df����	9�f��>�� kCd�r�����Gu�@F�����nL��[�j�~$�L��J����[��:j����o���9S���u:���A���3����j���p�W�h����l��F��ndf��P|���j����%"��N/�iE��PL��I%
`�h*�9q�>8��� ��6�y���������������G���R�����?�I(��i�lfo��1��6.��������m���;<��o��B��vNz���2����`�����Z�hOr�7����B�����U���_�|�AA�7����g T�k:0�B�q����//p[��%���m��<��	x������.>����x@
����1������H��g�a.1�>ZnP��f��w�;�*�{��'���4����sy}v����?��f��v���I�����^�y�5<�����"�4HR��_�/GA���*������[
z�.��v�������{j9��I%c(��0����+��58����q&�G�JI���I�HNd$'�`��9�r�g�x'�t����6H��K_�Dx"#���ea�m�����L#M���c8:�����0�QA:���C5�
��$H� 
,w��2�����/t�0w��6"�O�U$������7%�J�| 4��
���=
�B�j\��bHG=��_����[<�J<�����#��k�X+
&
9��>)�������km�0:V��b6���^�k�&�$�	2^�4�����&��60s����:,fV�f���~��K@d�;
o,�!��j��-���s��8 7�������
=����i����/Oykg���DN��4�c�jqQ�������U=�J^�����?�$�#���h~8W���-*{/��G������p���=�
=lo�uF<'��x<�)��x��)M_��P`�s��E24+��g��
�����0�����E�<��j������<�% $rOg�a�\Q��	�$S�cV�Y@�,(��7�E�+`/����$_�X��,Z��4-~�/|����KiT3 �He�H�B���5�<��O��?d`q*��^�)A��H1v\^C�y�9dS����l1d��� X�M��#�a����G?�U�f�Z���Z�^e@�p���������.^�w6��M�OO��7r�>nr�y1�\*\��yn�L>:P:P�4��C8�N!�]y~�����S��Yh#��S1g�������x$}�[)�%xx
)�@�p�?�=x�O+���s����*=���8Q���R7�����QT���^���N��_z��	��9qu��������8�_�w��Nv^����vP��}iuv�/��_�/G;8���	�����������0b:�F�;$:bw'L���������i3�0�������������Z22e\������&|�����TU�vxa���xG��4��0v��
)������������|�}����HY���.�����6��a�L����>7��0����\/�19*������-�@g���/�}�P��;T����\�P�*�nW��PYr5������-�P�j��Cee������
_��Y���8Sa,8����g*�'���~M���$��h�����owPME�xP��*�<�[S�[�r(L�� /b���#m�8�V%����pS�'p�(F��U�9��
�I�������)1������`�
+�`\)��<&W-���R0H=B���(�z:�u��^������[>zW�A<����%�)�
C�2��a)d�$2i���?�W�S�E�S�Kh����������>�cL�����\��}��Y4��n��xB��<�G��/f<�'18�WC�":���Qr�/���>[r��5=��@++��5���\��}���{��I��s��)�{������K+�a�^���<m���X#�a��}����tJ�����,����S�Lg�b���}����<$2��d��M?�'�V���k��k	z�-����}R��p_�z����Syz�L����`r�b�����E}D������K�����V��6U8L�&tM*+q�	������J�aBe-�0a\��0��{�a�TF�	]�0�+&t����t�����aB7�aB7�aB7�aB7�aB4(�&t-���	]���n���n�����aB�������bYxjp������fsp���C�e�\k�qB���X�M�ox.�p���
������BI��Aot�::i6�Z�����X�-�V�3��~Lo������7�go�U�����m���j�(|����|y�S��������T��B����&w&��u�'
�BG-��p-��p18�������?$o�.�Y���`=Y���},b9u��p,A�����Kc�2:������=����^~,����P����H��:�v��z����v�\��5p���2|�4K��&;��m��YDdnh���(��d��9{)������~?~�%W�P(���g����q���3���:Y�8�L��������E!3�L`'��������`3����w��B�j�(~�32��U�u}��/@P��/�M����m���a��tj��p��g���6������(l�U��.�2�X�|�2�7�2h�E���aK�
�s�0�R{V���?G�m�g��\O��C�4��:}��f�^�#�qb�J�]�.��!��%���N������]�)t�{�s^��@����)�������Y,��9N�����l�N�pW^|!��`�m������9�r(�`�0%��W�5i{|S>A]we#1�X���x��8�l����@Z����j6"3���gO�S�$vx-��3���
���y���j9w6�a+~����=������x������`<"$
����\��s4Q���lq��\�y��e��%�](���	�};$-m��i���p��/����y!&�g
��"�b����IVb���cd���}h!�^��������P++��>���
s@�(����Aj�+H��%Z)����~
WO*Y��.��u^��9�J�,�>rX#��W��E��������;/�#�3�#K�����)���BH��-�u<��k���x,���"]����7�wv���b��� �]�8i;%�s�u �5M���=�[���P;�aS[��2j��������8{R/9��+�u`�-�������f:07y�H�c�l{k$/"��:���p%��Xx����������� )"��F���]�����nRu�aqCG��&K���R��O����	����2��-��y:��_����jb���S�����pe?����f�	^����L>������������+��v�������7��_�./^�s�P��{����O����ng`w�H:\�7�N�q?`�~C�y�q����7�wO��
.g��oi����P�	f�Ea�������y_�5��HaO�/Q"k�
��q�**G/���]cp�B� ~���/�>B~��4��E������������lk��A���F�zl�������S;^[���c�c����@�d��rP��lc,���h��PTr�P�8m��`��Fp�fF�Xd������A�|�����E�w��w���;�gt��(�����th�o���3�
�hg�L����!�S�AX����������H*v�.4�w��+	��e�H���i�+F��kJA��k*�hlK0�w�8i��?M��v�r�4�[f�[����+��f����V�pE[R�z����\`����+�����w�#��o�%~���v�\q��%����&��Y������+5��p��s:�vN�fs0�NFm��B�9���,�/�0����|��������/����\�1�����bYt������hz�'��U��Z`�T���Wp���/�8�r� ���\���[�Cs�|�����Ni�|G�,��#��x�|�����k	���;����k�������F�7��ps����5��e���� ������U1��QV��
\�h3��h�:��7�S�0��'��x
5���
 w�F���
�A�s�^z�o�l���w�.abn82K�yl$,&���p���������dME������5C���M)>��"yqV~�8*�_��J
Fe�������B��������%�a�}����]��rZ����������e����,���7g7�`�W�cD�K���1��;����N�^���'(
��QV#�nn�{��A���u����CNj�+>�����c8���JMp���*5��e�lj[%��J���TbW���M��J�j�xd�|%��E�:����Q{���u[')���K�:k�HQ O���U��RL�U��V��(D�vZ�5��P�����X������<���qK�~�9�w�35��S#\���/�#����/���~J�E-[bK�
B}�d��*�s���> C�B��)\+�L*ET�@c��k�d��Qopx��d��R�NZ�*�=�Q�5}"�a9w"m��86���Sgt<�'O��m�O*Jj�@a,gP�`T6}� `u�����C	?k��k6e"�.��8���%�����hc�$
}X.����
�d�6������3��O�s�9���fM)�	�T ��g��EWk�0����8�uA�5�'����5�x�T���&Ip����G��#M�;G��n���'U�S�J���J�%����r����R�O]��B~}]����
��G~�������������St�����Ou�|j7�P���B�1��������H�g��I��� �� �$�����
7D�������<�Y��!y)�z�[
�N<;$AG�j�4m�V.�T����������N���*gY����i���S'W�?�����0~9����G�L�f�EG|�7�����7#��N��\Ll��Z��������`�5jf�>�@$�	�g����iRk��&S��7>=<n���F ���i��QX���C"�*�H�V�z����A�l�3����#����s�{����Et��[�o����-��?�Ot���>������ q�x��n�E!@���O2�,X>>��lPT8��#��k�����m��o�H���'Mh��+�K�����o���n�/�Q��w�9���{{{?�@��E���(&���������-�".F��1���f|���������?Y�>f��-�0F!�r�&�{��g���H�{z�.V���X���/M�jI^O�,�������}�b�!$��}��`4���WS���*�b�%�m��>L���<}M��-�Xe� ���_�#	��
y���AN��Eq%y������u�����"��������8B(u?~u=�q�J7���~�,���|���qs��>�?z%�;��9� ���E�x>%��C���.P<�fl1�c�k��|�1.��)��bK��R���$�D&��j:A�%�Qh?�I����]�����r�q^]_��&*",���H���}�=z��O�m:#�bSX?��,��L�����\������i,}T�)�&����B��p��o��J
_l&��-%�
�m�r�������������[�C��|�=�o�)D����i�jXK����%�)��'��>���z�%�G����PBk�UY�����H�aXt���"���`k���O�m����*&�����O~��)(�������b&1A����=C����0��v��2��`�.n�������t.N�!C�Pj?9h��#���s!�X%��at�X����	*��[�H�_����BOL���[���s�h��r���h<#-��b�|s�����/��_����+�M��y�;�����B;�.�y���T��2��\�0_�8>:u��<����i�r������E����[���-xf�u(&.���4�D;��L-n��5�r�g��<�H_�6d�z��*�Y��������,��y�[�<��?�rs����Yn�y��&e��3�r
�Y���Y��\X�Ja��6-uL��iW
44����\~���m��A&e������ ��s��k��
gTS��6��)�fp.7���^�:@h&t���L��l&t���]
~��.�W��������w�nz��;7��8�bP;�����q��<B1��mt��x�'�Y9�3����
���H��� ����t5�,(��
�/|p}C�@�����#���8�:�"�E��#�t�5������:�GOn���\��[9��D��#+����J�A>�����;W7Y�D�P��v:Y�I��e�= ����Q�@8>���;��'�&�%�v����h�K�����QS���x����:�#F3�~,$n���X��F�`�����<��%h:�N#�z�i

��A�������Y�M>��>��"+&odyc 1�������K�[B��\z"#j#�F����
:�Q��1�l��������]�Z@j]Hj��t��!�&�7����'�hW#�n1
��:�]2����4��������@I�%E�u��c/G�a$��#�RM����u��k���q�������Wso=��T�Bd>:��������#O1p������\�8����\:������_����������
�u'��ZP�	mb0��@u0�O��~����7�d�h���������	
��c$r��[dC����DZt�V���O��������OCd���'eNl�87�y�������?]p�|�k����F����{:}4��f���tc�\l0��1A��%u����R��E��;�m�j�SbQ��E7��M�Rt��&�L�Z���@}�h����S/
+���H����	oR�c�d$��d��iO����@�X5��m���
��p��|�0D@�����P�����|���E��������a���4z�2l�`�K�(zS���E-������Q����MF��i�,.�2�����5�OS��4��])�����W_���l��7�s��|����t^�(q��8�L]���+��\�T8��x��9j�q��������]PN�i.�l��Qy�9��"�w�J��g��u�6���Nh!7�v�#��������<�{���r"���;�.�rK-�Z���������m����hZ,����
�bC(�v8������lz~gxz���#��GB,�\?:8u�#��.��j�����~^>$?Og���/8��p�/���f��V�Wy��82���(���|�e�����7����nR[�<�4�
�u��>�>:\��dZ�i8�oOi���7]����p#d�N�@�$��j�m_��G�S�M:L,}�ci	U.������v��|#�Z��5J]��o���?��X�����*���SS�pBS�M��iS��*����jj0��]��o\�����m�i�E�.������$�{k�����=q$������^I����*���$�������p��N��)�M��k��]�L�?i�[���#��2�!�e������������2���dl��>}��k�,��@t5�j�������hWlzlz����i���9������,2x�`�����'{%'
,
�3X$�0+�YV�������-���X
&��W��^K08�9��X�r�go�����o��P�;�?3����l(4��A�&�����~p�,
���3�D�s@��	�������O�.�����GP�#|YS�����mH���b��n�[���Z�T�����t�=��T�
�B����
��=R@��% �{�����l����������d�R���2��P�����%����P�ok��	�B����+��WX�����74�����?�1kt����W����������_��b�F�����uR��f��o0E������M���/��(}d@q���
�09!"�`<�kl�[kv���	���j$�1���i�������-���3�:�Q4�(�F�.O%C��P%�:e�I��g"qH"�Fx
�}��RR�p�a����K �z�3�����?�_�|}q~���t���F^^������,L�Ov�N����f�����c~f�fE0CZ������
Y+hveS�ld
i������[G�@A�&lP�u���j)`A����5������������#�@���2�����������?]��>2M;���(�X���/�;�	�����c����^��4��������l4�� Xb��`gI���f�Z/�������������**����[,���erd�aP�������\}��|���>���s��"���4	I�[@���[:v9�2?������	�K�b��8���Y��n�C��L��_�h���Q J�E����63C�����w3��b1���A*S\��jLQN�F;������U��?�@���k+ �x[�f�X����f�_!�������*m��G�g��y��`U�q�,i"m3��![��m�Lg���]h��AFZ�Vs��%',.���br���J����'zHU�~n����8T���<|t�K���eIY��z�l���K��������A�$��d�"������=<,W`�q��O�	���<~<n����-��9f���G����������tNV�9(���\������Y���Ft��H�C���q��,;�c�?%����y����mt�N2�?��xXN��O��<)yw~���6�������o����f^�@��W��R���$w���	f,(y�����(��/�E���L�}�����@���\#�6��r����=�����k��/yGa4
���������l6Z;�p�A��[x�?�=o������
�����:A�����p��a�����������F�/���`����l
�JT�
�L��RTIO	KaY�(���r���=��DC�$��Rp��g�|V�2��.�no��F��H[_��9�py����}���zK�co�b�����V��S{����������!|���`���"7��W:��,�#�q%{2������,e3nl�e\]f�s[X�"�����!�������a�����nY�>��2}B�%��,[�
�0��jB}��?���R�55�����Jg���@BwF�|����YT�
r����i���h����iv%���1:���	�fW�n��'��/_p�**>
��� X�uV��pr��
k��Uj4�f���g/�zR���(}g�.��W�Z<�Q��_Y��
���(�i�����%��I?��]�uba��	�C[	aF���ad�l�r"t����3$L_�	l��#�DPP���LrUJ�Zd���]�1�Z����]��Ws�je]��+g���k\	OE��P��^8���lo/�P�]����-��i:V����~t���Q�kw��t���J�����>���������R�������+���!�x�U�M�r�i_���4�*i���b�4i�H�|
�i$8�eJ���L��K)\q9����)\.�Fh�L�r����{@�N�r�)�$	]�P�S�\���+w��.�5�]�p�AO���U�����L����$Xg2��^9�
N�r�(O�Q��� �:,���L����Q`:
��uZ�=;hZX^��'�N�Ib��FN���Y~IR�r�f6+�5��1��y[9y������m�NV8"�v�O.+!)��A(���2��0��W�ne�,���cj���gv�%�����~��$
MK*��fc.�4���*uRZ��[0>E-���*JQ��u������*A��f� ��&��$n�Z3-��y������$&	��W��0������������eAHfK�5�Y��W���i�m� 1�-��d��P���!'\[�����n�D	YYH���r�-�w:�Q�4(���T�,8.&�e��P��)qY�5��cR�9-�9����VI�\��9��H�.�_y����I�������<���s
b��9;
����a=�Jg�M-��A��IpKY�-��s,
��t��{BL�]��M��Q���R�H�]N�
R�b����*��bb��<@�IB��H�3�j�	y���O�S�=9!��\����1�T����g����RvT�d=KT&�W{�S�lQ)�+r"�%*�[T9P���Ya\��,w�I�_���94���	���)�w>�/�#��E%r�_T��E��)���)E������q)��^&�/���S��BR�\��?��=�C	�1[+�d���A���2��Q3�@YS�
'P%m<%B�_)�(���r���=��DC�$��Rp��g�|V�2���?�$��&UJ).����).����)�a�5�\����r)�����t�p`
�I����
&�	��=\�p.0>��
J��e-�rBL,�\��hyJ�M��I����eMr '�$� ��k��T��q0I�%ma����
3�g<RS+��}����������}�~����p��r�2�P��K?jk�c���~��FM���36�0�VV���M�����Cek��Ce�����m��eH?����8b�!+b�~X�E+"�B\�HM��/�L�"��b+;le���@\9�NT���%*���MT��/<Q�����$_��<��<�H
���q����z���(_Q�F\��&]1�>G�q����H�I"�o��K�x!*��iw����k�5��_�rL<���'�]w|?��{��:J�������`Awo'fnf�x�{�*���M��*D�Y���!3����j�}$��0{�W�����>���"V����z�G]�
|��}8��_���T	��������8�����<}~�
����iDc�4d���Q�������W����<{{�g������`5D�{����a�4�K(���uv�|�x%*l����m�>�;+���C������#��h����VI�/H�n�v�!&�������m
Q�p�������7g����;�-�����OG�JP4m�2�G��oph��l�In>�S�Mh���L�����2a�?�MVm���i��S���P��������=u�LBd)?&o�z���d���I�z��u�<P�z�#+�Bkl��}�CV>b~0]���+o5����?�xy}������~�m��_�������(jo�/+Gy)��W��
�r |�|��8�0��������-
F���4tq�������~�������(��m-Hs�Vj�&��ejK�hn��'G�S?�=�La����
������	���6<���HY�w�(
��Q��,��fv�|@[;���q��d|�l��;��a�$<��3Va�p�����9D��@$���_��E4v��A��9��j��2�3������C�t���ytP� �o;��,�������A�t8f5e"����Hnm�����nc�m���6���8�k�~��d��6�%���q)	���oS^�w����6�XF��p��L��&�-57�^op:�2���*@��Ve�h��(�]����76�#�Y���]�"�ao����
��G~�mAn�C��q��Dn�*����������~}��
`w����������i(t�4��J}�[�&�4����b�����>��?]g��<��'�W�IW�C[���V�ichq;�EY��.}'����D�8l�6h�Q7�����qQ�������|}���C�����K���C!j�Mii����ad`�l�eF}=S�H]
�m���[�I3.�3I�����ig4<M�{�'`�M�(�s�p`K��8�y�$+������8�T�b:&*M��L�0��#����_�9��1��)��{��G��z/�.f�����ou�a;����������f�
��a���H+����V3!�u�bJ�����P�Q��P�����m�Q�$4�M��������E]�Ak���Md��Zj���4bj�ii����ih)l&�1NY^��3\�S�i�����<fZ��#���1��w���NY�x'K<����{G���(c<��4����;[�w�?�����xT���x�_���w,��#�wz�6=��
��x��7O���qc���x�c�w��qXG���U��}<���Q�x����f���{��^-��"����;e���x��1��g����A��x��l�`|�b��Cq�H��@<Kn��m�{�ne��^�y��������.�3$Ek�G6$�+%�%��������T���P�l�q�p��h�G�%������h|�����2�]s��u����J��zj�����F����}<.��=�t�9B�����G��L�x�h�&��o���*G��M&��-�$>o=�OOO�Am���@�I,���I,��q��h4TU��P�8>�DM�������~�&�H>���iqm�(\�Bi:F��|�E����n�����7�b��	N�O'Z��P%�A�S,F�������`0��'NhtT9{�����.���~����}
��IK�x<Em�W�g<�1n���9n��W��ud��
��,f|z<8�����N�)K�(��h�&��U��
���FH(.�8�;f�kl��AP���+������7�a��r|{����yt�lX�i����#
_�p}2C�Q���:��|}ty��������>�m��}�&j}@|��_oV�����i�Ic4�a�&iH�E�H+=aw,		uS|C����a��
���*��#zEBL�tJ/������K<{��_Vz��o�����tv{N��yNoa�/�c������O�������/�B����.d6�Fd2�!��0#"��u�D&|��h:��N~#���{��hh����j\%���'}�!����b�khD�[�L�^��4w�������v�R��i�O�s^)<7������
����o��
���.�����0Y��d���*��+�?Wa�����C�hs��CW6�����9tS�arS���9����Cx�es�������<�����G`��Ga_�5�Z��w��c��N�Ac"��w[�n8�wx��@(HHa��Ec�~����|�i�mz���j�����<���q�k6�G�G�����|k��|9f��0�����3Na�c	��6��g|�j���!�iMk�������	Wq2]D?b{�'@������N����	4	��3����s����6C����Z�g!KHI��*;
�2b�K����>W������"��aRP>\�(�������`!
����������qm����'�{�{���6���������!5��m�v/���}:��Va������U
b��zx���q�D`��lvH�&aS��-�tV3�!CKr��}3���
_�m���qn��Iv�������G�>��5�);���P6��2@L�k��Fy�5��r�{j�`��5���n���j��6�G�q}����NG_#"�P���1�(GS������Mp�����9����:��L��pRk��5�����I�{��N���n}���wH��A/������.�6�J�^�Y�W>��K>����i�E5�!`������Y\�4A��g��4�8���I�-�P�^�����3�����<��n����}AV�7�g�e�6
I�;Y�ZLz���&���8:�t����M����r�RAD�;�~��%��]��+���_�e2/&7���V�5��8a�C�!=�/�U�N��f��VP<��Qj�]�;�	w.z"-0�wO6�����g��Y��-~�,F5��#��b����f"S-
$����3�pR����#�deer�-}a_#���R�����
$|�W��Q���l$X��$�����{���JB?�������O:>���gB0����I��rO{�����"y�����/wb���VP��WE�u��
��/s���������F�j�u��A^�����(`l���)��P!��Yy�[��"i�Y�TW
��!�4����u�����&1�a�����d����U�V���T�"Z2��uX�s\������^!�����0	1ID��X�M�"����y�g�:\�w���\:����!�g���a�J�2.��W*D�m����h��A+r���?����L�IX2�Q~�1n@87@�����"��{�k�4����7��%���
��_o�o�Z��^��M?��U�={Qq���(��aH|.S��I\�4&H���\���,O�������@��A�?3�������p��ij�X'��9z�?�`|I|�'UE�]�a��B���&�[�%�E�N'�='�x(�@�"��a8�{�%����-��[&f#�$0��qY�)l;�)�zk
���Rb���e�9�m^���w�����u�$lU�����HY��sH��X.�FI-xf�$Ry1BVC��,EIT�';U<����,!�C1�������xdU���r�#�@2����8���to��H������q���t�A�V<���|`>o��(g��:����,
"tJ�l������Q��)�� ���[@��k*�b��@���g^�\�m�����[g���*�����o�>\��kL��:A��p{q���u�n��y��Ng������w�;���qg8������t��������%����>tw~�>�w�nh��d���������
�c~r������IW���[&�����m������
*d�wML��d'�dG%��Z�!B;%G���Lu<���pP����PX��1�)�RN�0����LRJ�$�a
�#1�PJ{0�&��,���aV�~�z���~�N�����6-�$E;d:��;���gC���O���8PF���V*gK�q �Z��X��%)�c2D����;&OoM��A����T	�����X���.��s^�P)���	���xt�>X�
���hUL����`�K��2����L�H��"O�&vmR�R��������Qgd��.'���2��Ir���'��?��`���?�������?����W�$����Y-.w���\qJT$h)5��S\ 5��R��k���V05 ���B(�eU���9�b�\p�@�:m�"zr%�k�D�h3&�6E9��W�;p).�R�B)������.V�R
\8���8\8�@���d�1���)�}R
T��H)�H�5(�	)H	5P`�n�"N7�����@�A����"��V�"T��ib�m}b��N(1����J��������%-��
s�0T��qBCEh�Jo�z@�YS��2p�D�0�!�"H04cH��H"��q��6"��A�.�+����:�!\ �!\0�!\!�%i m$"/qL"�LaL�����.�S&Bd��@�(O��x�?���O�+f(�L&Q�8�#��$����L>�5s&?�t7I��_���`l���q�P�s��+��D�*/>-����P��	��1	�$���$IT�*6e�*xlEe0�t�*�������jQ�������J-�$^T"+`F%���Q"\"C��S4����R4��������#�{�2a�
�y8N�P��K�����d�QH�Pe&`����d=C��"3p�#�v(�i5�S;v�
L�L�!���4S;l�p�^��C���x������J109"Z-B������>8jm<2��M)���]�`����(y����&��\�<�+�'s��d�x��59O��<��%����#�q���=y��Oq��G\yu$-�M�G2�Lum����<�jd|���-20���sSS.���&����W�X���'�TV(�L��]��������"=!�jl�;c��d����-u%=�RW\u�����+r���"�!��9������M�������!�e���H]!B�SW 5+!u�*sUR"Ky>Y���2�GgTi-n��������7[Z���U�N����;~o�l��G��a'��P�����#���<�J�L��`��$`���)��T�X�D"���z���z�����S|63����������g��h�z������`���|�������f������� �
��E���L+���Z&�4(�'=��>�/���uR����TZ����_YU��=
��"���(h"����!?��� �]l�O�`��[���O15���q��������pp�O�{gr��Gr��q�o�����3m�=g�{�V�o��m���O����h[� �f � SF�@#3��E�:��td�<H�|�0��7jfRw���c*���o���d�dbebO��J�1c�dXf�&��y�I8��,2�a�fhr8���a�f�f��$=�pX��Q�o�mX����d�3�@�"^O���^G�5�^?���^7�5�^/���^'�5�^���^�5�^����W���o� ��a��-��-
[�(��)�!n�7�d�4�B�"$�{x��s���kxf�1����
�3����Mz��|��3k)��1k	��/k��`�2X�v,��`�2X0{m��E{M��C{-�����4����m�IH�,4-�@���w8��o���g���N�6��4��Mz��|��3k)��1k	��/k��`�2X�v,��`�2X0{m��E{M��C{-����~�����m�IH�,4-�@���w8��o���g���N�6��4��Mz��|��3k)��1k	��/k��`�2X�v,��`�2X0{m��E{M��C{-������f���:��M��]�;�v�G��"�wlD���-
+�5�7�?��&���{R��(��p�	jhqC
���jFD3�����N������vpZ��h�TX`4
F�E����A�P�#f�l3�j��R5��e�020s� 4
F�E��pA�P�#f�,�a5m�Tt�����:M��Q3�Fe��@�P�#f�YM��8����zFg��m������Tl*#{h��
�U1��j���~��7����a���!�Z����-N���7���� �n��h��������6v���6���������Y	�At��kM3E��Mr�������*�c��t���f3L�q��p�G��AS�:��c���/_�6yQJ}���|�|��&��"r��C��?�_g��B2��~�v�����`����*�BWk����u��l�`����8ltN;����a�q�G���4�55���|=�%��������Q�q���s�x��I��r��?&Y��I��Q�?��i��p�j���i�()C��O��$�����3T�)�@��b�	������K��E��1������������&}�%7[N�H(z��U�M���;B����:�����9[��C$xW$���??�B�����	Ach��/�^�$�o8BQ�x����i.fDb.�Cr&�9?-�����\���1���y�����y�c2��d^���S���&��Ay�1��� eP�"%(wPyP�b%H�[5E�s�r��
rl��a��[��2i�V�K��9e�/�z�Cb��r��-b�4&Kc�����L��E�����<���]"FIc�4��e2=��� ����!FG�u!�a*)��x�X�Q��)iE0�����b�o�@�}�I�
��?��tb����'��G���������b�1��p�2S8[s|��n�3H1IY��NLp���?�'&Gk�MrS'&V���;1)[naG]�l�3�r��^��i�H�4�W�|�+P@M�-��<�l	5�W����+VB��+��
��txEK�8i.[B
�*������tx�J��B%4^�^�Z_�����W�����U{�j�z�^�Z�^�G���W������z�j�x�^�Z^�T
Kt�
e:�e2X�"�
�H�LV�@�����k�t�Y�(*� /_��!�6n����"��`A��K!�VJ+���%�b��X:+���v�l�)�U�-Y�+T>��]��Wi��
*5���J�n�F�R�[���8d�8`�8\�8X�8T�<P�6�6�6�6�6����~���\�B�-#���os����b��`a��I]�VJ+���%�b��X:+����sxEJgu�1�B��� �^�a�6H���Vjx+5���JMn���������p��`��P��@��P��@��0�� ��`��[�:wcV�m��6X�|�,H�-#��3���i�Ji�2Z��V,�Kg��Y]p`�H��.@0�W�|V$��4L�	���J
o�f�R�[�����V�V�V�V�V�V�V
TTTTlW���+���oj._�
A!�f�
e3P���!�"��TAv����")����+N�����
��r,*1�W�/���w��-X��Wqr��T���^�?�9���q��K���\�:������5�w~���;�y���?�\��Y����B����;/��������I��2j�!z3o5[���������K|/������AD���>0-
QO�SV<4��x��x�O!n������������n>���}"<���g"� c' c'cS����L��,�>1]dg��U"�Q�<a�^~��U���0�:�W ��z��x_��j�
�ZT?Af��
�����[�����6����6�n���o���`��^DtKT��BT�`�#Z����aLk���G���1���#�%�o�q�>���}�9�[���-T}L�����n��[`��>Ft}>��)�`�8��s�@s�U�wBs��s��}�H��s�@s���w�Bs��s��=x$�������������������5���,=]��:U���bM���>E��>=�������5��#�����������|lP�}���"�I�����g�-�N�t��h���}��D�a�#�!���<2��H��c��X�"};g�e���f
�f��xf	�>G���s��xn��o��@C|�O���<�)������������+T��t�v���\�5�@�v�b���$l��#D�S���?�<j_j Qs�Hl��� ��~<��XlG%��HE����c�+<�����'<�Y�����t���mS�-_f4�w�~[�M-lvp[�2cM��1��
����9�[cJ�Q���X�Z�A����B���Q�����N���?��f�����9����[>{0�x[g��8��y�H���<<�����%l����l&�����!������0"��*�U��e��Hf	�m��Xf�f~P�����W5N�� ���C$k5f8n��0C�f�a�d����Zb��
���2������S����,(*�#g�����8c�~P����.7A38��~��A����w����/�����[g�^�>�B������o�|$��`Mf8��#$?r9]��������q�*g{t5������[
��������w��Tz������e����[T=���P��?��P��/��?t��F�_�j%c��nUb	���Q$��:6�Z��
.:e��Le�s�x��PB��H?#�B:�����t��Y����	�y@�W�+:X���X[1H�!�l�������q�^�M�#�����<�B�V��@J��b�W�nk�k���5de(i0� ��%"�+��(T�I*�J R�t�)��#~UK�XC�O�!(CI��AW.�C-�B�D��L�"@J����:}��P�VqnZ10�R���A5�cSM�+�R�������45�@�H�^Ss#���tF��7����7e�����R���t;&"J6)�"�|_����Hi��>#����$�M�����OzM�|��J�@����<����D�_A��5=5T^U�_A��Tf��E��X�L�m����V������m�9��5���n�
������bGo�54�	��2��(�`�SL�v&�l�������l�f�l����X��l�r�I���F�G~#�b�yp�M�;u�=�]����Tc����q�E���M�=�q���ncf�1�,U�g}�|���C��m���h��aS��A��Z����WP��izj��4=��=*	3��b�n,E&�6�JM�h+E��VHg�������}
�
7���g��Y�������gU�m~��/����oq�AN3��= e{�X���l���70���b��$Q&�ZT��;���&�V}�
�u�jLu�
�-��l�����nl�����x�T%��8��X��Fo�9���3���Z��PC����������� �P�	kz�+(�QUf���v�X�L�m����V������m�9��5���n�
������bG/<04�	��2��(m_���oq�AN3��V��l�����=W�>�l�+��@e��EE���I�e�?�*��a����
%�����2/�h;����eF��j�j�����*G�D6���d�S������2n�bj�T��eRS�#�����+�gM��B��Cc��`]D�pLFx)�x��gD	�w��?\������|u��|�
7�W�������OZ�������!�����z��"@0�@:(�`��|f��.�� ��e26�"T�M	�d[���uv{/EV:��v�zq��B�~���Z����0�F0�������A*L���f�`�(�IxN�,�/�M�?�%�Q��o���_��`������`��������Q�E[�Y%�0Q��Y�*S��N����Re�D�R���f����.N����$�x��8X��������M��P�!E[����&�(��Z��L��#�R�I+a,RE&��B����Od^)��9"�)����%�N
���XM1(Y���%�T��D�*���q�:�UI����b��'�_|��~��������\�����a�v�����s��i��7�!���g����#z������A�q��}�/�7J`��C3o8���}�`��bL�[���{�M����	�}����)
6��t�xO���z5<E����F��j�f�@Y����8����D�����)���!��l��O�[�9OG�����l�������/�������:�N�y�r�}�'G�������.�0\�f�I��	�����P����H���T��Yyt1��[8����������n� ����������wb!�����h���1����i3]����&����|o�:o������w�#����8���f����u�vn�`����8ltN;����a�q�G�����t�����C������a����q�m�=F��\q�#g�Y�#��G�zQ�6�_sE�'n���0@#��<�u�������
�+	;�����������={s��
4�5��	���a37����W�?�E�!&�oh
�~D��������0��0���&^�u� �K���A$%����t���7s�7��*v�V��	��f>@j�O�dy��#�x�R1D�d�S��6];\Q�T�x�\v�b�3b1�!�]#��V#����c4^�����n��)c6/c�����\�y�c6O�w�`:���n���)��1hA����;hA�����)����d��c��_"�������Ae25�<�F��BY�}���8d!fY,��]$FQc5��1�W9&sqL����<eL8�G����i^�T9(�8(Aq��
o��QS�
���/��>&dq��!�'��P���*<���*@��Z�6hB�
���?���W��H��W��Vrq'���Z�����(�1��5�g��I����6������,����?��~R8����>����O�}y&Y���/Q�M��)�&���#�%*�	��5@��W��K��t��j@:�r5�~���l
9����j@:�r5 ~�`�T
H�_~ToToTo�So�So�Sw�So�So�So�So�So�Sw�So�So�So�So�So�S��K��
}:�e>x�"�
�L�O^����-�Y����
#\_��X!P��� P��� P�Y!P�� P����7�Wj���5�f��Y�k���v�m��)�u�
[�/U�����_k�
�ju�:�Z�F�N�V�Q���y�P�����B�����
�O�
��
��
��
��
��=@z�_g�_��As,(Gy�(I�(I�,(G��(�}����5�@�P���,���~}��9�2����~��__e��0JD��:ju���Z�F�.�f�Q����	C����'5Oj�(�*�(�&�$�"m{�t�_g��E�As,(Gy�(I�(I�,(G��(�}�O���5�@�P���,���~}��9�2����~��__e��0JD��:ju���Z�F�.�f�Q����	C����'5Oj�(�*�(�&�$�"mw�D�U�L�h�
c�m1]����.EOA��$f�K��3��Hy]^�xy�^�O0^��W����Z~!O�,�[X��W�
�6U�8�?	)�_�}F.�}s������sz����9{�����mt�9�ts��g��~��;{��evw���F�>'��)��`����l�3\����+���-��$�'?x>�3#�\��(DA<�OY��|&���1�?���o��o�����~>��������$3c��������D�u@LAD3��3OXT� ��t����V��.D!X�R������>��|Z��t��^�����-T|�[��*TkQ��mw�6�����n��[`\���`Z�����E^���o��z}�-Q}�Q���>�h�_���1������7��f�o���(����|sLk����n���P�m0�B�"�%�o��6�|�m��0�[�����P{�-Tz��Vy�mTx�mTw�-R��#Qv�-Tv��Vv�mTv�mTv�-R���(;��*;��V+;��6*;��6*;���(;>��tDs�T�r�5Bw��r��D3��s/��x�����C>V�n�V�v��A���T�0'E��o�I�m\�@t;������Q�����5����<����#���vTb9�T���-<�����)<�y���%l�A�oK����m*��g
��>�������6;xW�2#pr;�
�P������W`�r�����
����\����,�N�t��h���}��D�a�#�!���<2��H��c��X�"};g�e���f
�f��xf	�>G���eFS<�M��|����S�m]f4E����m���4!��Df+Tk�#��n�)1G�vkb�j����B��F���?:�4��x�~��~Kg��n��o����mT�m�A��Z����#	G���B�G8<��a�����v��V�fxn��og�`��v��V-<�y�#�%<�9�c�!<��A����_�89o���KV���p���%V���M�!�5�C,k�
d��240Fs�|�St�N��3,0�����:���7���~���/�A���j��q��g^��B�+o��]\�s��|��Wo��z�����^pRT�������5���a������t����/k��%�\�#�1G^]���R��%����}��m������?��,cE6����q�-��@����Z�8����63�r�P��u��KX\�*)������Up�����T�>�!�Jp�Z�g�vH�"~{ �.}4��T�3Ab�
H���`Q;
��Q�FAxx��|vyw~c������ES��{��0O��U@2������Y�Z��2}b
�@J�4�r�H�
�4
d�
2��)�k�%��_��'���k��P�`�A��KD�PEK�PA&Q� S(�H����8�Nw1T�U��VL+���6kP
s��T�xN��z=h��y+M�%)R�����:%�7��Q)�
f}xOq�*���U1<-�����m��-��r7evTs���x*�9Rx���$I�k��tS�������q�@!����*����WP���*������pl*	4�E�-�X�L�����V������fm�;��u�~�������bIo�54�	�2��(�`�SL�v&�l�������l�f�l����x��l�r�I��nG�M~#�b�yp�M�;u�?�]���
�c���u�E���m�?�q���%~c��1�,��xg��|��
@�������
R`S��A��Z����WP�jzj��4=��U*	4��8�X�L�����V������fm�;��u�~�������bI/�34�	�2��(n�?�G�!*��f�u{`��l�f�I��+Wo�(����H�Lt���_=v"�9M��:�b�����@�[�+��1���5�-��37��g�L��q�/��7���;�_�+`H�M�����H����r�_��PC���������VI��
(�1��RdBn������J�_m�t6k{���,�#����t'`��|`�Kz����OxX���Gq���@�3��z���pS�g�5�����r��,e{�Xy�	�8�.*�W��Hz.���+P�6CLN^���-l�\�9BE�a�E>)-;*�W3�T�n���V=�,��8-�����+�������1TS[�*
-���*�T-L�I>�#���;4����E$��d�'�"�%�|F� xw����y�����Wg������s
��x���Ik$
�|��2��4nN�������G$�	���#2X�S����R���R�p`C+���)Q�v?�Oyuv{8F~!:w�����g�.��k�Lo7a��`��s�30�0�T���
����Q��d�Y��H�^�KZ�"\��zw~u'�%���7���=�;�;��Mm,g��n�DE�g9�LY�;Q({��J�e��J�z����MG�z�\8�z3����2���
L��G��7�3���0@-/�������N��Q%��M�0����F@�]dze,^�EfWX����(�P$����r9C��9-�t��E��������>����z :]8����%�/��q?��i8��: ��g�x����r�7�*��4p������g����#zO������A��r1��_pl �5&�����X��}���+��_�|�x�`�~��&H!�����>�<3-�)
���t�xO���z5<EH��������Jv�h�:��������nw0������q���@,R��������/�F���q�_/_�:��r��Hl$C��p9�������Ca�G�J"N�*%5o�<����p�,6����b�x�y�b[c����l����p���V��,h���1�������_xs|?�F�&UX���a4����j��l�-��Cy<E��������c��6�'���pp��m���-�l��8.���J�-Bt��uv�����_�b�$_��������K3�4#?o���7�G��]������r���y���������W���fK�Qso�*�A&so5A�a��p|�����(9n�v������]������A!�2��!��l������<���.63Q���1��Xc��O���0���p}I����"�9v��j���V4XnVCdD��T��Yyt��[8���C���A�u���K�2��	ehh��_c�twM��;g�D����o�������t�,w��l��/��-��+Z)�����?���O�#2t�}4"���Z�v�(.jc����!A��G#��;�@��?�3b!�����������}�tb�4�Mg�����&@�vF�9�v���s}����m� __�;� C�\������l9i���1��A�7@:�[M�d]��t���A:8]�T���]���;�Ch����"��Q����}C�}���V>"�l��!��z(4 �`Z�h�C$Md[����"�Ywg�
6HBP���������!V�;fd8r�<S��\c��������}����='����{-���8d)����("2H�&�g@��DB@)l��C�F�i��0���a�u2t�l�d�GJ{X�)�4����q�I]�
G�&�f.
���j�[������5�l��#�^���F��!vH��@��}��=�G�f�}�i�q!��F]�����/I,vMb19��-�~��liP��`L�����-�{t��V��u|�Q��o*��/�<���1	�������R�?]6�=!?.���6�����|���6���_�����-��������7�����R���'�:��	�����=j�b[����1x':���_y���t��a3o��#I�����h2z��U#q �:F���}z����K	��a'�S"_idO$WpOEx�?�x-��p��f�O~2��O����f�u�V~�V��,�&�`M2����l�b�
��4�V����m����&71������������U6�U�����tCo�o��j'4B����i^h/etVb�v�>
P���d)Vy{�g6,�&�r���i����Dm�`RB���!����W�
�������7c=���8��6���h6$-��� ��A�c�}[�_�Van@�
��!~����&�j�v6[Y:q4����H�8|"���PhV�'�H��N\_[{�^�+?�-����-��r�����'��iW����a6]�v�Y�)k����2Cy��?��L~�����W��0�,��y�K^�~d��vF�XEs�}��a����pl���v��0\vC�|���s
\�K���t�q��2}d����F�e1�q��v�_�����c)�9Me?��4Z;JY62�p<���QW��u	m;�N���#�r����~RZ��)�r��*R��Ao��p�e�L8' ��G�v�w;WH@���]�����������UKD5�v�����P�_o��o0��t}��vO@<���6��O�m�1�/��d�L��$���xUM��'��T�~W>�IuTM��ET����H�bf�	�$�Q�H�����o����$�p/�����M����^<�c*3�b�L^lD��/�3��>�oi@��&��DA��(�����g�
%����LB�P	*���]T�2�U���A���^�����_��W��3B��IJ���Hb��g�~��YOg��	�D
{)dC��7���(5�+�qc�8{QL��V$�D���S���Q����#no�5Hv�� ��Q���`Q,�V��V��o�-B�dT���W��������C�H+`*��Z��%���������M�������8h}YL���:t}��TyF�M)�U��R��m2���W�x�T��rq�2����?����B���``��QA�1���C3RB{�.�:?5p�=<,Wk6����|(��pN|-)��D�M0�;����9�J���s]�N���R7�����QT���pu���g�Y��G��@:��8RV�������@�5�v�H��b4��c���H4��%Da�P�ja�(6����������,���*cl��R���Pl4�u�,b`���Y�L�W1\U�X[�!�>p�/Y���(e�����I_%'}���O!r���o#'}��dC2M��e�����
��X�M��Sv��*N���%_�7;�@9����H�����DRrw"�5���e=���r���T/�H��Q���,D?�X2�+h����L�}e3�_�pW�gQ���h��vz{MU���g���=R^�A��{y��H��LF�31Y��f�^���g.@(J%�����7�����^�V�8��'���xy3>���,�d.8�[�4|�O�r;��S�����r!J�d��F@w��\��#��B	��,o���nD7m���[|E�Nk���%�;tM-���>tw^_�v^�Z�;/�O�K�S{Mh��)<�����|v_������.���$�9���w�'���s����`�J$����s����^�;�|;��s�;;��KZ���;��R�<�����
���,����h���VL�����HV�����8�q�j�H9*s�T��$�(h-��;�eS*$4����^�M���U����U6����Ra��J�K+v������:Pm���]����J���_������mA��`C
��Q/VZ�0��%�>����k�k�Jf3����\�6_6�s��0��S	�V|��2�P���b���-�)�GX����f��J@;\!u4+������xY���4>'����Y4��:��e����B�������`�+r��*��mB�p��]��W��X���x������N��D���+g�)�}���N@���R.���M	
���d�E�bI-�Uq�k�T�w�,��Z����=��S)��k�l���-F�a�K~����Af��,�����[�~;�hN4�-��=�~�&�!��n�:6/��7�d/S������e�}��Ly���$�e�=��J~3����e2�0{���q���i��k��)X�"�3y�a��)j���&�'y�4M��J�5����Q�x|4�\/�����__��'��f����\>�H}�������\��X�`�k�\�L�\�������Z�I����Z0�k�\��t���0�����X�@�2��ub��k����J��.s�U2}q����x,�E�x��.�+C�.��Z�����<�((���0Q�L"�Y���Z��I�*A��_<��_f�J��[�b��������c.w��JE���F�$%W��B$��x,D_�x0��������������ea�xMX�H������P�2�(�����f�Lv���L�E���ie��n�[��V����l-J�"F�9x�Ye�6�5k���/]����l�A�.d����l1R��lEb��
��'��T��KEt���n�������l/A{���K��1�+C�_J�3��\p���������Ph�n$������6fi]��
�-^�F�0��-�XwY��wY��{Y��wY��{Y[\�������em�w�/kK��/��$_�V�>Qt�J�FQr��_���*2�����Kq�[y��dS��5�E|,�nPs�[6l,�
��ts�A-E���	����U%���5���U���+�*���1��J��J!��BdH�c�F��j!��d�n����Y�E�6�����rt�YI�	\W�!��r8��,��p.x9�.:�^����r�J�����
����3>6-�L��!j��B�Z�%�Q�b3���f3�f���������Q��q�#C��q�$=i]��%����F�����r��R9W}��+]*�ip�g��o�2 ���%�v��1t���
���aT��6#�BD����(
�<�2���.}2��p�k�\��:W������s�k�\��:W���M���M���5���5���M���M���-��:���:���:�8���~m�km����:������k���_[W�t"��
Q�&�.���uw�/����*�����U_wM^u(/��bUAq� J�N�NJ����(�A_��*�b��U�[s<��lK;�MRX��z����
�Y.���)P�����q%����
PV���o<pw)p��Jp��s?���"mg@����?*�Q���K%��������Zqe.���wVG��:��O�)q/�m�z���h���u��PGdu�#��,�����
uEv��9h�hW�B�U�6V�D�!�]��Z�I�B����B�"��t���D���z�_�O���SS�r�^%�������$\�W��j����RN���J=��z�vA,�v��">io�T2������p��X�
��I���B�J�����sS��sS����x����{�`���t{�`O����{�L/�\��Z^���^��q���:?7�u~n���[�i��5����6��4��o�;9�������3��[��h���+���F����������!<�A��h�w��}s,D(�yk��H�y?�W�jx?z3�j��}'X�6��
��nc���
�A}�W�7�I�y�	X����nfh����*�~6��+�;���g�!Be0�����x�a��m}�\<}�}����������V�x�j6����;�4�����#prp��'�h��o�\\��>�}�H��o�4��A��"@C0'���Z�_������-j���~�|��!b��������qw������p����?|"��(�uv����~Q��������m�>�;�[�+#���b��NR���;mMi�����X�m;�qG��#4���9�����qI�������|}���C�9����K��~

J9��3�nt��v[���F��2��������z��������B����&Go�����[J{�KX&�%>T�2�G� �3�g��M!����`�A����S5,B�@QW�j;.
$�����E��������L���|
�^S?p�e����E������^m�������9�n�>\^���F� 67&��gL�E�%[3c����o�b��q����]�� �������0��r�����s���4��H��M�Ye*��1�4H������HF�E�:� O�,O.$O���6�d��r�/]L���t�Y���(]��:�E(F4z��Igx��v��=e�VR'����g��q�m��y���_���-F����'����C��pK:�d1�l1�2e�}����x���	j��E�����Sp��)2|���/�����G�q���Si����t�5|�X�/���K�>|�X�/���9���Z����N��%U��#|�X�/���K�:|�����������lvOO�v����)|�X�/�<�K����c�t2�/��,��w�u�G9�^
�]�'t)8r)2p��[�����q�h4��T���8X0�PO|<6��aA�v|���R �A]a(���	w��v���&wXc�X5G����u����$�]�rCe�B�a�u��;���y�����w�!�v�yc�0C��)��x��;[�Z��v��?]���5��
GAk��Z�8P��;'><�`�x�U���:��A{'���?���<G�����t�}��L���E��/�`�������8��t}�$?~�����N������9� o{2��a��+|�$%��6v��6��k�bU;&��J6�o�}���BG�nR��B�����1�����A�[�L}���J�-��|���#E��]���)���Y���MW	5�`�U�7[��G'������Ac�m�+�fV���E�Gv��_�������E��)�7hg���#k4�W��ok�Km�M�G��<0l��< ����OOK�#`�m|�=�y��>�YK��z�
	E��O�3/
�*����?�����_Pm0X{��F���t`m"E��SZ�"A���xi�p��#����i&
��  �L�Gv��$#������ic�t�{�T5�v"���L����T���C����d]��uD^�A(������`�� �8;��~�{*���N�@�I���V�7��(�>��|T���z.;�*���=����w�,@�9�����{�1���`��fS�X��g�$�
f�/H����\����@	������h�5[m~��t����(��0&����W�Z��d�����"�D��d�@6��_�HM���W��x��F"��w�#}*c<����8��J��{���`�b~�H�3��<�����<������7��
���r���Iu)�R�T���Y��O
N��pI4)�����=;�j���AO�e�������4�,�JP��P�H���QH����Sq|���n
�dP��
�� ����x�b����Pfs�s_c��);����������a�:^-����{9���%����q�����j2�E�A�����O�����X��d�[����'HU��>Y ���K�D�����F�����O�x�����?�e�{�@)�5��<.��@���d:�E�����\��}#o��H����{�@�Fx��(�*��	L%�XO�����+��$�}7��V��<�~�X�?B�5\�}���'�PH�
�x*������,X J��2���Jxj:J��_�x�pu�����t����Z���@O>{+��E��P��#2�m����o|-�	0��7�hq}��/f�p�k
N*�@�Y��]��g�h�"��\���H��NP�Fx%��HfWu���8y'���$>��k�os����PM�"�*�G��G5i'2��9��7��l�i�x�����7����>�|���6~6%�)N�������\1�2J��!������d��TU�����1�.&d�(T5�t�Mgr)��W��E?jM5Dj�T Q>Xc�\{3u���o�b2o�6�BEl���;��F\���TW5����~���G���Y�;HL�����(�`B��M��P���o<]�����b@/�`�r:"���feJd�`rm�X,���w�[~�p�f���7�ON-v������W���+!����B>o����*K��^����������p����W���*���O�����#�����(�^�q�%.��^�"`���=���zQ���z�a��2>e#&a��Hq�-Q�_\�K�E �c��|�����D��,�`���Bn��/1���t���6bld���@��A���1�O
����m�����`���A�
������IS����[6�m��!#�G%����v���/��	�]f�&��2��a~�l�/d�&�=��a����G[6��a�:G��?���9��]���%���e_��l�$��-����]~�&��l���-WX�70_�7p~��zu0���x�������z;'&����"V�3�C��������v����Q�;�v�M�#n��Xb��c~�6w���;q����@�;��,�l�������
�����f����,c����m����[=��Q�2�VO\��3'j�l�$c�l�����V��������[kV")l�Xc)�-�1��r���/��Z3��R���r�M!W����m
e4��f�"r�-"W�"r�-"�"r�-"W�E�J[D��+n�p�0���ad�����
�����,���x��Q����#���>J4�}��t��PA�>bj@�GL1�}��GB�)T�o)l��+�f�r8�6��0R�Lb�Qf3IX��6�t���I�K[KJz�[K	���R2���R"�����	�������hR�Sj�;J�������l�;����fNC}m<�ng�)2��R|o�:�����t���|��2��������?L���x������S���������on�����@1F�>��Q��c����wz8�=�bdp�6�h���K���L�d�;�����L~���P]��?�:j+p���Nn��q���@�����(D�`a�|�G��Tqh��	�7k��s�<o�f-�J���2�������F�]j��[�l(�4��q.��m�Q���a
h*w�E�(�38����tP3 `Rh�	5����P���P����p~�7�lHP�S/7���o^�3�N��#�2Bk9��S�����g1���� Hp����_E�?��m��+������
�F��G��i�t��
 ��9���FVf���d{�OqT@O���v���gId��
�g>���#G��F'��&@
���::h��<L<� c�� �
\���������-H�����o��|�D
�j��`66�P�����#{r��MSt���~��������U�f����_8���Q/�n3p����O(�Xd2�'�5��������0h
�v��l���
��mp�
nq��U��'����
n���j�������v����������j�i�����N>y���O��7�.���@���i�T3�v�L���n��W������l����������`x��)G�D�Z���m��8����M�f��~O�J�
R��b/-���18���m#�q�C�*��'r��G^=��vfs���I^ZL`�	
N���������@��d��k����n��^%�6�n��7�D�L9��hp��4SN30���H5�4���i'�����U��S#W��E��g��&���<���;�.�#n�C��_�K��n����&C������������IwBBd#���h�$q�	�Y����V������.����������;L���mD�-C��8O��f�_!G�k��������~�x#O�"P<���0;�A/r��39�)l��1�[�1�#3�a~k�kw�o�dg�G�W1��znkhr�������������Lo�c��X�i�;���zn�9Z ��b�R�P9[66GV}`����I���t����#<Q;������}Z����4��������������/-���Q?��/�j��L�������;:l���F����Rr��4R
f�|�����9��:g��2���8	f���/[?qh��6��,�oKzV���	�!1�[l���Th��Va���]�m+e�3������h�����0�ZH�����g�
>���s�ON�5�N]��c8]�\SGO�3��"75%�m��?�C9�%!z;����a���W��Zs��9��i�^\�[�DV����=�\7�J�[��Yc�e��q���w�,0���|������'��j��&��k$�������������f���f��\z�XW]/��4���fs8n����
��@�S������lT��.%D�����8����ctE���B���S<��p4h���~�1P����)lO��Vh��BQj�+v��B�RX�=A���+�/���]"���
)��� �>��@��F�|bRO�)]�tAh��
�W�!J�?#�=�C�xU!�H����\�����^:�s$H��yo�������n�<1V�T~j�=���������5Ns���Sv��9Q�$D�n2������W~���3��-����[�Z�Y�Lf5�mtxt�����f9��j�cC����O��O}���2>/U�J�^����Y�&�g(��Uj�����K
�O�6����?��w=��G����m$S�pw���\�|�P�x_U%�EQ�!T�����=��"��A�~���p������*_V�5�2�*8��)q`J!�bL
Hd��REsTF*���qK�-�m�^�hP���6���\_�����GQC�C�(�`g~�P�O
��b�G�E���;�[0��FQq�N���9�����y�x�T�����b�h���9�n�����N�����FG��h||XL`$�D�^����x�z���W	+����=T���|��`y?���Jn	d<Wr��@�$z.�@����\IR�����Y�s�����s�E��b��"�{.��1�`9�7�*��O�\�<T
���\P
��J�a�������Vy.��B����
�~L<��1���!$����o��4��%�1x-��]t��3�����v�����Y[������}�C�|�|�Q�����"V�G�u��j����N*`l�^�^MT��\Q8����Io�Acx8:�{�1�K��������O�K�������'?/�W����~^��������e����}muS�,����6�U>Io[^V�u���t����7����������E��Mp��~A���J+F01�������p0��B]
&��������������j���t>]�'�>���������R3�v6-0�f�;����B�o�������
u8�YhZ�>v%d���L�1=����C
n�����O={=]��5N�1l�����O����8P\��q��j���#6�{4c2*6�S�-�~��b#���`�?k��E���!�d��t���������@��(N��q��������hQ��b1|
[b�2�B��P/a�����0��NA%�-)p����$gmp�l
�m4W�5�@p�p
��\�~�{;|���k�4��L�����q$���C�N�j��>�d}{w�S�D:	���U,���w4P�0E�eK�)��o�oT/�d��{�W<��S��
����@�X."�k2����i��0,������]�8��0O�^���;�y����V�ss��g��������n�QG1S��5a�&����v�b��o����?__\����.P�n�	�k0-utU�k�C,���M��e��"��H��M-�/���D�^�H7�J��������
L��Q$+���k��3�B��Rk��8�; ������������q3�>V��u�����^6����M��j1�#N�0!��������aG��
�t��d������3(�gK��&)�St���-Cx3�6��:�q&�T��*��i�x�/2�3(k�����FE^�0B$:�R$*�R��B>L<��R6LiaF��|t:eW.�[����(��|z���^>�Dt|�����B�(^]�����~��6��b��)��Wo���lVh��>�?��_�2���%��"4
�c�����uNF���^�EG���k���m�k�(�Y�#�u���f���E*h���,��J��^n��`�u������F����m}��&_����.��f��8E�����M?�}<��t��|�3��i���n�\�w��c�2����r� g\�ag>��qtB8��x��-���9��q�����Z�6x�m�!w�����d��|���i���|_�����9F�Kc�{s��������:g�_��5R���,X��o^#@?������&������He�f����b�.��O����S!��6MY;���@�)����<�L�:v��M�V�]��EV��_���K$�VT��d`��l���P����r�-a���i�AL�P�D���hQR@4Xcf
��ju�'�M�PvQxMbP
��,��$^���)B�4	���8���p![�����/�qf�tU��tq"�����-��r�74�����"��*����M�U���f���?���c�=8=�=�'���������9�g�����6��y#����T�����i8������xJd�6�]~��l����;�of����R\..+��y6���
���rq�#.��=��\G��O:��B`{�}�_��_�����k�>�
����&�?P�dC�T���8����E��1���Yz�9P��
�J������x����A�j�h�#�V���<@�5i����f���t���k�.��W�`I�	\�8A�`��1���L�x� .$��.Pp��p���g���cw�����p���j�dt�RL%T����B���,X[��8h�/��
�����3���.M�
���}�������3(�08��lkt�A�:�aewv���Xf�{Qf�"[�a���nQ��B3�Y�V��Ju�s�A��������a�tw�Mp���1�R�5�2�K�*�J����E����X+7<�PUPS���
q/��C	S �c��i�;-J
�T���"�c��Q9��#���=(Cz�������S�%]�g-����U���:��3gE{p�c�X��F&�Qo�!��4�Ft��`|��z�����}�y)�C{"��3"t>|�v!�0��1���Ucd�DQ|oE.�r�C�#r�^*P�x�V�x�I���kw���i0L�|����3�B8*�����~��99=:my�Q�������Y��}�!��z��s�Y����/��>Z�^;K����T�a�L(���Dl^7c��AF�sFw�����q�]�����������b2fs�|����{��N����� #d{��`3�{+M��RL��yG�~�Hy'N:�~����z�t
+�*'A"���������w>�?��V�6n����N���7��Vh������|��j�o�Va����2�#�{���	��7f�g��iI��3T�`k<���~2r��[O������3���r�bd�d�`=���<k��XU��e`�	+C���)�:���B���I>�y���2z�;��(z�<�5���(�yZ[�`Dj����m�Q!��K,�B���uN�2�7���'���v�(^
�Qc����QCQJ
a��+C�����������1�r�k�9=Ryc���q��M&����yx�A�X�]����k�7���X���*�/s�k�����B��V,	}L�`i^���:*�] d�EV�EB�.BZ�0�i�NZ���xN;���e�v
�g��40z�7�_��tA��%����')���g�Y�g��0\}{X/���,�����f�wx4��Kl-�X��}|�s\�7������i������
��yu�Cs���|��Z�&�
��4I��������/�$t�.��g��f	=�6��������{����^�Y��	�|t��k9�so�����'�����������b��W��)(d�i���>�;i�z8���-y��'��]�pT���2�N|��9��ok�3l���a�*c�p��q�����e�vx�(����He�f�gnB�O?�3���	��
9������|�t�1�6�����o�|��#v[������Y	�xQ(X�#HN��9�@/
�~�,A��m[�L]��� a�dKl�aE[��E��$^iYt����Gv����j�\�����������6��T�����a�f��Q�ht6�xt����g��/��NG�DT}������p��-��n��6�p�RVK- ���LW����(I��@$M�\������v<���'S�a�n���yn�=xM�o1�a/Y�I�dm���
�h�a�	�_vf�L�_FU�gA�������N%����q5nx���7q"4����(�yB���Y�9o��n�<i���dE���������m���i[��*>Sy����~����L32��m[�q=�b�g�����[�����.���j��ev��Z�S=��a�� �R�P���%����ml�re�B{�������d����X���KN�[�J��Q K�*Q����jW���o�c�:�����-�F���X
:]|��a�0����U������[G��rf�/��#���o�R��w����4<��~���
8=�v�������N���rx:u����}]^@5��������@���#�X6��.����+�C^�q9+������_<6��,��E2[��R�5�Rr>dt���/,�UWM�k��~1��-:[s������Pc��P/`A�~A:�����1dy:
�<
b3'NY�XM��,V�
Zq5:�a�:#R�����������%C����1X���\�6�`��lN�c��m�Ta�l}����F��Y�fV��p�������q����"m�<#V��v����$�2���-{ml�zQ��"�k�X��%vK�jT��\���5�:� W��p1>#���f�^�h~�����B}f���A��e{���p;��j�+��_����?��m:���o���r?�?����������<�uN{�vJ"��K���>C��Q$�B)���+F) ������y!�S~��h������G����2�Wn/rY���+
��F
����[���q�$�7��&����}�/�A���*���q�����Uw�h<��o���o���l���C�$PUm����?uS���a1�t��]:e������%��mo(���J�Q��x�MRn���'���:�F�9�v�:Rd�h��:�&��.����+l���'><�����>V����;;����Pi��-��������L�%7��U������(����0��a�H��E^��>S����|{~�"�=�8��?���[�B�X��Sc+gn��z��I����I��udn�j9�`�`8�V�D\p
�5P�J\[���H_�2W00���r-��Q�Z��O�����]O���c�
���l�	���&U��RE����=$����z�0���].����yh���t���C� ���0q�)��-��=��"w��4��{@
�5-�O�N���{����,��s���
0%���E�������S��
��T"����U2H�z:�b�!Up���R��o6�hu����?0������sM�vJ�#7����)�~L��ce6m�oF�W�)�-0��tA�X<f��b��RBR����Y?��B3���;�����z6��=4�;U��R��zF�`;�K�O=�#A@�/��.������������bO���"r��iM�g�����m��������M?����L�^�1DR7
���x�����>����v
�������F}WU\KB�i
���R#��"b�:b���|� �s��g�~�a�6<�'@���Lhc���@K��Z�����(F�z|��t�����O�V���On��/�rq�Y��D�|�{cU�?XS�vJU�}��I�#���E�,@��	�����AJ�
�I<�0 L��_�}v��,�����y$W(t>r�����ZKX^b��`����M����/Fh���0T+Jh�#|,�m�Z��t��1�������x��A�k��F9�Q��0��w��E@�Y;�M�L�����c��[,�h���v��
��g����a���R&��/^�����?q�~���=<I��\_�\_�@	D�u
0���~��h�I��eq��
��L07��%�i���f=�!e�
�����=	�<�I0�0f�>T4�m$�\�b��|u��t�><L{(��u
l&���+�N2�}��I��w�!�)�KZ[|B3��Ohk���n|PS����$���Y||��O�����3c���cD��/_!����/.��>�)�%�r��Aa3�P���/�
�x�p���p��qx43sW�t�����
�y�R���tH���gh�.
�t=��yzF��Y���C�����F�����Y��\�y��L�<�0���3ut��z�����������xe��9�?���*d~w�c~�j�Y\5��c�������z����Ef���=�����x~���87��ik����ag����~�N�7����2���O�%'G4����A�sr�9�n�99f�e~Pn�'+?��G_��rPy8
��n��j7��A��5R�{x�����r�/�����W����<{��R5.��G�?|��!b��]��������W���O��R�(+9�|N�	��q1�Mr�?��t�A���eTL�:������/��c������������ey�����0�����[l���l:��an$N�D1���&-k�d��T�w8>[�SM��<�|�)���O618Xm�$�9c>�����u�r�@��T=d��������C��_o���G��X��������=!�q�rvy�:��Q �E������<m{���R�������%1�L���,�.$�`�qZk �.'�O�7E��5����F�VO�Q�����;��T������6�f=4f��+:Y4������ q�o����r�;�i��{���3�p����$-����@Q7�9y���y(�����
�������<�>��j���ss��~�V��O2�����������m�X�?�+7�v���z��I*����V���N���RQ$%k�W�R�s��� 	�q�%��Mu�m������jw&�^�(r����=�,/�������Lq�D#�?���"���X��j���n��7�vf��t��|L�}�����q����Mf�}�����vy�<��	)�2p*��M������3(��S�����c�EJ�y�J���Gk�BZ��J��$��E��SGd�%����������oj=���1o��x��=_}��=-�$�e[<���5��"���aKL���B��������[�$�,�NQ����o�5��o�z>�u���k�oin&i
�c�Nl���H����W�,�� EG�����	��������2��m�����K)1����j�&��-~�{�B���:~d���A��+��-}
!��`w�����=y���kb���6N0���g���?<�
����K����Cn4������U�v�x�Wz�����������6��
����M�l�W7g�������qv�a*�>;;c?s�G>��w
��EF���/��E�}\%Y���������a��z��l@1_bY�S��T�2ZlD��N�a9�p��d�&gj�l�#@
:;��L�C���Qe�U%Q��8�G��F�Y���O�R�����:]8�&(�a�M�Es5����8��8%�� ���$9�$�"��|H:,`�PF`��F����(P�� ���V�}�;~S�������BR8��8-�4�3�aQB�l�>(�� C���fl�}�4"7��Q�X�
M^�Z�?�R�/x����Tc6���S��8��-x�u;0w��t��>&�eq:�G�t�S���������C�R�L�j�4n�\��+���(Q�_���I���/Ww�>1��|����������w��1j�	N�lA���^go�p���4�5I��.P�������o�t������g&�����������7�@�Z�[+�7�`��h_�X_)D;�N�`�E;D�J��Z���W[tFTA��*��c9�L5���=K�
��}� �G�O?�������)&d�s�:��)�7�x(a"Hz�>�I�MC�<K�y���M+ ��O�w�����[��:*�1�:�1/)h���P����������R�vOhi"c{+��6dP���
���X���E�B�^��sW>q���?���yI_��e6�&��d����Xg��m��w�"I�6]��I�:O���t��n[y��z��oRu�X_O�[�:��(������7�U��������X��������VH_�o>r���}���TVT�k?_/���e���\���6S���F��W�b3���K~p��7E���JO#9�2��+�8i��"b�R�'?	)�d�r)�����)��7BJ��5�08y+d��=�KiuN�����$��,,��m�WM����4'���n��
���'�����;a�C�}��	����N�J@K�9�@�g��\��hl�'���\3��F�g�p�H�@lw&����a�]���h��
>���:�dBB8!�BB9!|�W
�"�
E�>�g�@��@(�j �P��3L����P����xy~����RO��uEW�n4������$f2)�!��x�a�:�4(���tF	���W��>���`�PvP�}")���2�A}8"|8"d!���@���"B1,B�+�aG��� ��
�P��$�Y���	\(d���!@��@�
�X��C(��N�
�b8�q�bp�qZ�B-B!F��&����0�b�8Z�LP�A���*D�8bA!�x}J�!�!��*�BU�Cyn�B4������Z���;D�J��J!�)vj�-�) �W�h_��������I���n�C�M��O��������!
��hpi�F�h��y�6D�>I���C�!�����y���N���<(�B D#,C4T��[�L��$Pi�������	�P@}�
�
/�����[���WI����p�����4�V��
Y�����ZD��!$������!Y�>!��H�Z���Ul�������7�	�&���x���D��p<��P�}H
�]�>X�� ��6$�	Qf��@��� e&.D��
���@����@BSH�%'��RH(��RH(��bH(��RH(��RHXOH�����A �wH��0�	OJB�V{���7��v�"����\lY0D�����@�DW������X�^��hau���6]���3��I.���������N����W�-(H�}���{��B��V���i����(�A���p$�$�4x����	�"�}��~G����Y�iPp��+j�0��Ec����,�}=��1��/���zR��/U��z���lr�����s�i����*�E�C[��Bv���x��pyVYLB)�����/��j�2����	�e���l:EK��{�O���Q�d��d�G�,��D��4{�B��Gll��*R���'mC���%&t�/��tL�>qI���O�Kf�vc����}_�'J�']��%L���q��n��0V����6������T�����`|���bi_ZN�����g��,�s(���|�9�!�Z������B��l^/z��Dm���1j����J1��������1�� ��5��o�lj��n��2��g71��q��S��ikU����*k����2���i��~��r�����f�N�~k<�m�`�n)���(�m����<qh��an&��e��:7�6L�q7K��6J~<��$]��b�r�[d'�Dq�i��#�	��k���.wN��<����l2����:��x�����<��f5���Ek�2�;e#��-i;q���'Q�vTUu�G�xr���Q�#������_J;R6�j������nW�j?���U!���T+n{*3f~[*H���%g��2���?��d������ha�mZ*�y-�_���4$�eL�h>@��k=X).`<p��n;(B����m�V"�z
\�C�|h
�0����4����q��Bfp<�T�N@:=�YN��hc8���|Q\�s+/\��T�r1���l9Y�7x���S������^t9h'�/��a���_6�sW_7��6|��(D?m��-~��J�w/r���L�n������&�4�c��
�h��m�x>��u�1���6������C
����g�}L����VW�}h[a7�.A���~*��
n;Z��|���(K7�h�rAg�&.E����H<[?�_?5��;��rT�.xO���,�'�[NR�v���,m�mH�n��1�:��f��,�9�\���^�Q^T�B��.�X%�#e%o�������Y�()������T�����Tg���h�m�(��R�BP������S3tU�n%/����H��������/��2�:h�.[���N#[���[S��mS�
`��E�bh��
&4��{4�I�h�"�l^�[������d�������n�v��0��������������J�NV"?2?�q����x��7
���
gz����@7�=[Wl(�����g��&�|�������c���S*�fd����VK��WNv��K.N�RmZ����yf#�o�44on!�����-Tln�����m�l6<�w�(��=�'�A�?�<�u'*������}�p&��C��#�}���-���m���88
I�������B��V���4���d�t��@q^�@,�vv��T�M�[tVJ!Ma���$�w���-�$���Q�
��AM��l��������-��n�������W}4�
-$uE^�o�Oz�x�7!�-����}:�:�}���xA��6�2��Mu_�o
��.%�|,����4�[�IW�Y�V
y���wI��#_���|L�qei���I��8=�1�������x�p���#���^���P����2�
���,�-����M{�=+���Y������2���	�6�w�v� /�5�u��P�U��k�t\Fe�Q�P���@lV�Gd+|@�	���:]m~�ZrR�$	��P����
.���l��f��.�DR�6��8��)*k�CA�ZCP��8��C,���$���v�X.F�Q����j�L���G�<�?������.\;���AJ�������t�[Nx@��N��5��n��#�����,�n�h3
�qC�����l6F'�i~P^���D��R�ojd.6��	no}���q2��X���=����^9���<4f{,�1����c��S�p�6���FAmV��V�P��9��l���F1�`���!J6O,���|���:.�vkn�K�BH�6Zha���)&��s(]k�HH��"3��l���Z����Fsl��FsC$XE5C:(��m4�.�'z�m�~#P�0� �����M��M��p|
��NG�HA8���h�iC��C��L���h9[���%��#Z�
73\���|�����F3�H]�%�%x#�$�����n��lN�~�5�(��-(��}������J�w��N���"Ge��w�2h�/'P3����G�#��Jr���F��M�����(�+t^�es����K�{sp�Z�?����~4�����K�QN80"�W�_�2��B3lV,�A�M�,Ru�o�K ������o�������#�P�W�����32��?���K�����A�X������|� Bou1�b���r���Iy��'I���L���I�{[X�i��0�(x(W����jgD8\��,�6�c���g�@;��a�lF�K4'Z
�J��J�uf@�Y��tj	LM�� 0�ZB9>A[�h[���1Fy�G��A>������u�g��G4�m�qe/�C�@��i�����k
��������ECw�j�����m2O���"���K6�2\���K��X�nG�n��b���Q��1�@�����6v�(:�`������Q�tl�����4<���
�Z/K�������|�Ufo�pTb�V�B�E��.sl�*g@�,�\}C�����v���VK��mr�7����9,�h����y~��*`�h�%�lm��	�����[��B�vJA�J��3���R�J=�Q�9���\(@<��k
.��g=����,���t�x��~O��jc1_Fe^�dK9��X�,ed��;���=%�\.���������(2����)g��o�t��&����duy^�U�U)����>����5���Q�Sb-����^�����f7^�
,WLR�g���9����o���?����O���J�45���&�w�@���j��MdTH�%CNK@�]��������9�b�-��C���3"V�f4�����6%�x���/w��*q�G�|#xT��ca���]���`7���l���)�\�kQ�(���B��?����	:<e�.�3Z`������i��bx\dV�1������{�Ty������
�����G��)������d��C����s�mq)db���c������l2C7)�f�f8��Gh���~�'k�������n>�M8�����������T)�TQ�TY?z��X9��E(1�����I��U��-<m��+����$���m��8C	���3�<��>2�,�e�#�(M �_&c�{��,*���?rVvZ����kwZD��mr��Q��Uf@~Gc[�S��w��*yl}�Tc��������Zzp-��c3K3��#f*�/��-��1�b����/]����3f���S��@ ������C �C�[��h`��^����Z��a�6�{�&i%�-���L�{��ta����l.;��r_Q�nQ�!�Y�E}�	�e��d�h ��1O1��l��o5��l��H������=Bv0J�m�$E|n���.�pE,>���2h;�%��#c���>h�M�D���di��JM*���h�(v0��8�
���|��{�0<�Gi��v[`��G��R�6j��V������"���������bHsP�:_~�x�����mwUM���
W�E����@����]�:����mK������jl[���Mb�R� i4
���MfS�JW�c�,t�lM�-�����z_�3�s$8�w�7�W�Z�r���V�+D
�/OA�|<��{@�������X>-�T�=�@��N�Hi�T@e��}��
���j�8�Q
�����Qd�@*�K��pT^�vHr	�%w��8hN������@�:�_�nzK$J8�{�tn7�uOm&B�BH��G��D#9��i�O�[���F���[f��C�n��Z4��ES���cEI���K����u�IcT�$�F�����U-���#�8Y\Y ����,3_IXP�4�e�Z������a\����p^z�2;����*S�����9Z�&@]x���#S/�;���] ���Q��{�jW�F�����5�_���n��xeU�M~����>���mu�_�Q�_���g^�.}�����d���W�h]��V����XW_V����S�t���m��`RU�-����d�S�������n���^`�U��.��#��&]��T>I�j�I5�STd���]��r���[������HUe���i5x��P��H��T���;�m�
��K�W<89O%W<�W��X���*..{�H�6?��T����P����o�`����v�
�vi���z�A���FS�9�H��l	8��Hqyi���e������_�\�1E�IDzpN��^���b��r�����?E'�7�O�&��O�v�|�S��U�H	��c����Q^�O'1�5!(���K�S(�C�h���=+���q��sJ��|�sDh�y�<C��x�o{p�?�L�blH,��������+�<�.�8@�D�Y^�&R���c�I�����������^����s�\\�[u5������`��M�(�������B�Mv��6��5R��4"AO�a2��Dm������������w�����X�~���I�4�����t��_�n?�:>B
�h��\������!���b�>����
�$$2@��2��"Y��r0�B@�
#������(D���9�7xl���v��y<o���8��W�q��
����qL?�?,UTt�Uy��/���|�*<�yYh���(�^���������`���<����c@e�]r������W�qd�q��%��|���'��M�����7����8�������,@k|
\���%��V�W ���l���������RS�i����kr�y]�aG��{�=�:]=����_n�@
%s�*�����<b��t��UU~E�����7=�jz`���N���o���`����7�,���r������r�M_��)���o�7�������������+��gS�X��&�)���gS2R�O_M�W��Kk��&w�X�M�:*�[l&��5{Co����(�&��L|S�@�d�Qh���B^���;u��U�]�Uy�����P�m��4�d�?�;�����K���*}�VT;%���FK_���.W9��L����*E�&������Xs�����J�����a1Y��
��w��������Z���2/x�cE��$l�f��+{q��@��l�9 ��r�-8�0���9 1;����9��!pgj�,�C��C�����i(�)��9h��/�/�8��9}��>���������;�������w����NTT'x�V��R�q �8�&��.�>Tr�vZp��V{I*����8g�Yp"�:��	> y�/�)8�A�s&��� > Ng��'����X�Y�e�gx?�g�����aD��dp�(r28�����b=��9�/QRZ�������
1BBC g���7c8��z���eU�������aO������a�������Z�m�B��+�5�TZ��
�����>%$&���n������5B����R���a+�$\7�K�y?t���pu-01�~�x�	��]qM��,sOx�
���Ca�E��z5��L��P�����c&��!*�
?p��!<U�9>
����R�XX)��k!M���
a�3�a����*x.��s�Z�^��g���N�����%�b��'�b��q`�j�3��7��
[~�#�h����@"i`�����0��1���A��g��K	K�`������P��y8����a^���8��a)��eZ�v��Y�v0���v��2��!A0�xT��W�C���������}�-����)����i$�+����#Dj_r�����=�y��z]0��k�����l�?�0Q!������
����mKr�G�^��`Gu~BMvT���r���0r��Z��������2-xH�e#n�'�j,�O����O�5�s�(�t�>QV��}Bk�p���������� �5�	�����H�}�^�'���P���kB��F�
)�EZ��k�2����&��sZ�	�u�2K�r�n
L*��I���3�T�<�
M��T�"�JUBbR�� &���j&����>-�J���ba|�*!�*��*a��B����B�0��T:��0Oa^������:xU�^��xU�b���H���*U�9^�l��^�J�.�*���xU��W�P�W%��U�~�B�Z������L�V����G-����Ni����)�1��u���>a8�7�����M<.�C�qq������dA����'������{��)i�U$�	��`B:%6�!�(3�1�S�!�H�0�(�QC�4��qETS�!��VF=q�c7���Q|2��OF��2��(��dl�a{������|26�0
���'L�'c�s�����������,�d����OF��Kk��&�3��Q�|2fv��1+�!�d����|2�9��'�TU��`�'�TR��b�R��b�H�����r�(3q\(�\,�Q��|2)�w��!2��O�I���t2e��8���Z�x�lF��d�NJZ�c���Y����2��}B,�ie��E��4�R�D����=f�m����?��l<C;��`���iJ�h^7��N�-^�(�����xh�=��@�������N1��n��P{����<����l��*"
C�,3�?trF&�|�]m�y��8�e)����qv�u�yr.ON��u=ob���E��h����1��?�����l� �}��/�p���b1������{��O������Y
��_\F�n���;�ng�R	E%�F(�a���!������~O1\��*x~��������������_n>^������gB��#��������"�>��c{�����6�^�q�	V����N�`>[���N�S�aHBr�x�p%���=
�r�$�dE���G�C�M@���`k[����
����$�Nj��ri������\��/7��Gt�SPS	����~yOnuo��FOX�W�p�z�3�xp��� ����t�����$�]���,T��l�gR�J����2�F eh8*C��gu��(k�9�8����
=�yT7B���w�5��2��Q�wA~C��E���_^Z�x�5EZN.=���a��� �������U�BI��X�@���D�8�qr�����V���/b;�EU���	vn�Y���������K�/�efM]d�lv�q���Ej�=�,�������L�^/��C�W�3>������mO����$��������,E0[�,P���@��JK�-P���%2���=2����nu�v�v��h�����Y�D�j�@q=��R>*ac������-,P}3^���Of�b^(?��(�f?T%X���~M�O��d`bS�l���w��,P��-PA�|-P^���@!1�-P]�r�iw��Zz�q��N��U�Nzfi��-��5�/�Cq�v�n�!/��*=+�n_v���������\�$�9�.�5���Yh�x�C-����	Z&��'o�b�EX&T;M�x�����k	�8F_]��=�__�����
�L�����df=�U�+^��}��=��<s�Le�R�+������H�/��`jG��zsLK��>&dY�9�\\�KQ0��N��S�b"E)p�D9Xm8�pZ����{y1��QWe�j*���N�n5}8�=[��f�j��;`�P%���'�B�w(-Y��hT$�Z�vf9�/�@����W���T��� = �	���58��h������f�"]|�������\�O������
��!�����m���p�zu�G��������~_K�x�����5iKC�������8�������*��E����<%+�q�������e�������P�������6/<!�����'�^x��2O���/.�v�6��`�{�#u-�%Hw����������������Y�Xe�<�JK�3���z�f�k��aG!}�� v9��\[���e
9�~�z�~����j����vi]��[�0��*I{�eK�����W_�x�-s�C-�\0M���p�=��Up���a�U��QQ������x�N�����c�z�`��Q��t��:��q\�����%����ef�y�q�y5K�3������](q:���^b;����[�_���ZO�������6'��n{�i_(O����3}Oq���������3�,�V�g��������j
�)���hG��

��t�e��Ss��-����ETf������
��y��/K�M�B�mr��K�LA���";���i�Jz6���n�s�-��7i�/����Ug����J���<z���g���Fci�DX��$��~�����>�^����&y�M&�t@um]m2�f�m|����x����~���O6�����#���vTS���� ���@�oU(��*T��@���o\���nc^;u\�WZ��e������de��A�Fu�bg���Q�����Aw�W����1n~Z�#u-�.�Rh�n9���h>���m��e���dq�e/jw;����,�m�������� ��H��Irwa��%yy���>��e���?p�����d�Y����'�?��o����X�o1�9o��
�m�3���/|����rD�$������9$��c��rX���E4�C^T��n��h�`�HF`? �`�{4G���
gO�1�6�Xr<��#�A���4�r��������+�)��t��i;WB^Cqos�����2�_Yo!�)]��d%V�mE���f����g�������:�G�����B��A�}X������05�ds���c�M�a��7)����<��7�/,�l����H��!�U�qh������#`���
���:��?Av&��@E�7)-��n������,��m�����j���&����!U�8�t�%��@��E�|sPKk/��y������3���a<�U���&Z��"B�K�4.T�`&^��m4��e�&xB[+"����,RB'�m��L/(�;�r| G�1,4_+�9�4ZdW��R�{6���AI��^b6J?A���� ��1���J��Q�6�>;�Lw�x�v��;����3�S��[\�Vg���0��Y���S�2��0"r�F��O����
F��#���]W�[c.t�V�[�77	�d|�m�)RK��a��c6L(����)�v{�%�a�������j���3n&�0b���X0h�XMM4�*�\�e���3oi� ��  &c��7`�@�M��CzV�8�V���f����{]W�\Za�������P����� ���\-����N#�oQ��D�,=��x&�	�
parallel-contrib-2-aggs-v1.patchtext/x-patch; name=parallel-contrib-2-aggs-v1.patchDownload
diff --git a/contrib/citext/citext--1.1--1.2.sql b/contrib/citext/citext--1.1--1.2.sql
index 5d5e48d..074eec1 100644
--- a/contrib/citext/citext--1.1--1.2.sql
+++ b/contrib/citext/citext--1.1--1.2.sql
@@ -40,3 +40,29 @@ ALTER FUNCTION strpos(citext, citext) PARALLEL SAFE;
 ALTER FUNCTION replace(citext, citext, citext) PARALLEL SAFE;
 ALTER FUNCTION split_part(citext, citext, int) PARALLEL SAFE;
 ALTER FUNCTION translate(citext, citext, text) PARALLEL SAFE;
+
+UPDATE pg_proc SET proparallel = 's'
+WHERE proname = 'min'
+AND proargtypes = 'citext'::regtype::oid::text::oidvector
+AND pronamespace = current_schema()::regnamespace;
+
+UPDATE pg_proc SET proparallel = 's'
+WHERE proname = 'max'
+AND proargtypes = 'citext'::regtype::oid::text::oidvector
+AND pronamespace = current_schema()::regnamespace;
+
+UPDATE pg_aggregate SET aggcombinefn = 'citext_smaller'
+WHERE aggfnoid = (
+	SELECT oid FROM pg_proc
+	WHERE proname = 'min'
+	AND proargtypes = 'citext'::regtype::oid::text::oidvector
+	AND pronamespace = current_schema()::regnamespace
+);
+
+UPDATE pg_aggregate SET aggcombinefn = 'citext_larger'
+WHERE aggfnoid = (
+	SELECT oid FROM pg_proc
+	WHERE proname = 'max'
+	AND proargtypes = 'citext'::regtype::oid::text::oidvector
+	AND pronamespace = current_schema()::regnamespace
+);
diff --git a/contrib/citext/citext--1.2.sql b/contrib/citext/citext--1.2.sql
index 01fbb93..c2d0c0c 100644
--- a/contrib/citext/citext--1.2.sql
+++ b/contrib/citext/citext--1.2.sql
@@ -242,13 +242,17 @@ LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
 CREATE AGGREGATE min(citext)  (
     SFUNC = citext_smaller,
     STYPE = citext,
-    SORTOP = <
+    SORTOP = <,
+    PARALLEL = SAFE,
+    COMBINEFUNC = citext_smaller
 );
 
 CREATE AGGREGATE max(citext)  (
     SFUNC = citext_larger,
     STYPE = citext,
-    SORTOP = >
+    SORTOP = >,
+    PARALLEL = SAFE,
+    COMBINEFUNC = citext_larger
 );
 
 --
diff --git a/contrib/intagg/intagg--1.0--1.1.sql b/contrib/intagg/intagg--1.0--1.1.sql
index 9bdf355..ad69146 100644
--- a/contrib/intagg/intagg--1.0--1.1.sql
+++ b/contrib/intagg/intagg--1.0--1.1.sql
@@ -6,3 +6,8 @@
 ALTER FUNCTION int_agg_state(internal, int4) PARALLEL SAFE;
 ALTER FUNCTION int_agg_final_array(internal) PARALLEL SAFE;
 ALTER FUNCTION int_array_enum(int4[]) PARALLEL SAFE;
+
+UPDATE pg_proc SET proparallel = 's'
+WHERE proname = 'int_array_aggregate'
+AND proargtypes = 'int4'::regtype::oid::text::oidvector
+AND pronamespace = current_schema()::regnamespace;
diff --git a/contrib/intagg/intagg--1.1.sql b/contrib/intagg/intagg--1.1.sql
index 32b84e4..3796a2a 100644
--- a/contrib/intagg/intagg--1.1.sql
+++ b/contrib/intagg/intagg--1.1.sql
@@ -21,11 +21,11 @@ LANGUAGE INTERNAL;
 
 -- The aggregate function itself
 -- uses the above functions to create an array of integers from an aggregation.
-CREATE AGGREGATE int_array_aggregate (
-	BASETYPE = int4,
+CREATE AGGREGATE int_array_aggregate(int4) (
 	SFUNC = int_agg_state,
 	STYPE = internal,
-	FINALFUNC = int_agg_final_array
+	FINALFUNC = int_agg_final_array,
+	PARALLEL = SAFE
 );
 
 -- The enumeration function
diff --git a/contrib/tsearch2/tsearch2--1.0--1.1.sql b/contrib/tsearch2/tsearch2--1.0--1.1.sql
index e8d3518..b3687e8 100644
--- a/contrib/tsearch2/tsearch2--1.0--1.1.sql
+++ b/contrib/tsearch2/tsearch2--1.0--1.1.sql
@@ -82,3 +82,8 @@ ALTER FUNCTION rewrite_accum(tsquery, tsquery[]) PARALLEL SAFE;
 ALTER FUNCTION rewrite_finish(tsquery) PARALLEL SAFE;
 ALTER FUNCTION tsq_mcontains(tsquery, tsquery) PARALLEL SAFE;
 ALTER FUNCTION tsq_mcontained(tsquery, tsquery) PARALLEL SAFE;
+
+UPDATE pg_proc SET proparallel = 's'
+WHERE proname = 'rewrite'
+AND proargtypes = 'tsquery[]'::regtype::oid::text::oidvector
+AND pronamespace = current_schema()::regnamespace;
diff --git a/contrib/tsearch2/tsearch2--1.1.sql b/contrib/tsearch2/tsearch2--1.1.sql
index 3eca510..f65c6ac 100644
--- a/contrib/tsearch2/tsearch2--1.1.sql
+++ b/contrib/tsearch2/tsearch2--1.1.sql
@@ -587,11 +587,11 @@ CREATE FUNCTION rewrite_finish(tsquery)
       LANGUAGE C
       PARALLEL SAFE;
 
-CREATE AGGREGATE rewrite (
-      BASETYPE = tsquery[],
+CREATE AGGREGATE rewrite(tsquery[]) (
       SFUNC = rewrite_accum,
       STYPE = tsquery,
-      FINALFUNC = rewrite_finish
+      FINALFUNC = rewrite_finish,
+      PARALLEL = SAFE
 );
 
 CREATE FUNCTION tsq_mcontains(tsquery, tsquery)
#2David Fetter
david@fetter.org
In reply to: Andreas Karlsson (#1)
Re: Parallel safety tagging of extension functions

On Thu, May 19, 2016 at 05:50:01PM -0400, Andreas Karlsson wrote:

Hi,

I have gone through all our extensions and tried to tag all functions
correctly according to their parallel safety.

I also did the same for the aggregate functions in a second patch, and for
min(citext)/max(citext) set a COMBINEFUNC.

The changes for the functions is attached as one huge patch. Feel free to
suggest a way to split it up or change it in any way if that would make it
easier to review/apply.

Some open questions:

- How should we modify the aggregate functions when upgrading extensions?
ALTER AGGREGATE cannot change COMBINEFUNC or PARALLEL.

At the moment, it basically changes namespace and ownership but
doesn't touch the actual implementation. Maybe it should be able to
tweak those. A brief check implies that it's not a gigantic amount of
work. Is it worth making ALTER AGGREGATE support the things CREATE
AGGREGATE does?

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Robert Haas
robertmhaas@gmail.com
In reply to: Andreas Karlsson (#1)
Re: Parallel safety tagging of extension functions

On Thu, May 19, 2016 at 5:50 PM, Andreas Karlsson <andreas@proxel.se> wrote:

I have gone through all our extensions and tried to tag all functions
correctly according to their parallel safety.

I also did the same for the aggregate functions in a second patch, and for
min(citext)/max(citext) set a COMBINEFUNC.

The changes for the functions is attached as one huge patch. Feel free to
suggest a way to split it up or change it in any way if that would make it
easier to review/apply.

Some open questions:

- How should we modify the aggregate functions when upgrading extensions?
ALTER AGGREGATE cannot change COMBINEFUNC or PARALLEL. My current patch
updates the system catalogs directly, which should be safe in this case, but
is this an acceptable solution?

- Do you think we should add PARALLEL UNSAFE to the functions which we know
are unsafe to make it obvious that it is intentional?

- I have not added the parallel tags to the functions used by our procedural
languages. Should we do so?

- I have marked uuid-ossp, chkpass_in() and pgcrypto functions which
generate random data as safe, despite that they depend on state in the
backend. My reasoning is that, especially for the pgcrypto functions, that
nobody should not rely on the PRNG state. For uuid-ossp I am on the fence.

- I have touched a lot of legacy libraries, like tsearch2 and the spi/*
stuff. Is that a good idea?

- I decided to ignore that isn_weak() exists (and would make all input
functions PARALLEL RESTRICTED) since it is only there is ISN_WEAK_MODE is
defined. Is that ok?

I guess my first question is whether we have consensus on the release
into which we should put this. Some people (Noah, among others)
thought it should wait because we're after feature freeze, while
others thought we should do it now. If we're going to try to get this
into 9.6, I'll work on reviewing this sooner rather than later, but if
we're not going to do that I'm going to postpone dealing with it until
after we branch.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Peter Eisentraut
peter.eisentraut@2ndquadrant.com
In reply to: Robert Haas (#3)
Re: Parallel safety tagging of extension functions

On 5/20/16 7:37 PM, Robert Haas wrote:

I guess my first question is whether we have consensus on the release
into which we should put this. Some people (Noah, among others)
thought it should wait because we're after feature freeze, while
others thought we should do it now. If we're going to try to get this
into 9.6, I'll work on reviewing this sooner rather than later, but if
we're not going to do that I'm going to postpone dealing with it until
after we branch.

Sounds to me that this is part of the cleanup of a 9.6 feature and
should be in that release.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Michael Paquier
michael.paquier@gmail.com
In reply to: Peter Eisentraut (#4)
Re: Parallel safety tagging of extension functions

On Fri, May 20, 2016 at 10:30 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

On 5/20/16 7:37 PM, Robert Haas wrote:

I guess my first question is whether we have consensus on the release
into which we should put this. Some people (Noah, among others)
thought it should wait because we're after feature freeze, while
others thought we should do it now. If we're going to try to get this
into 9.6, I'll work on reviewing this sooner rather than later, but if
we're not going to do that I'm going to postpone dealing with it until
after we branch.

Sounds to me that this is part of the cleanup of a 9.6 feature and should be
in that release.

Yes, I agree. By the way, the patch completely ignores the fact that
some of the modules already had a version bump in the 9.6 development
cycle, like pageinpect. You don't need to create a new version script
in such cases.
--
Michael

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Andreas Karlsson
andreas@proxel.se
In reply to: Michael Paquier (#5)
Re: Parallel safety tagging of extension functions

On 05/20/2016 11:45 PM, Michael Paquier wrote:

Yes, I agree. By the way, the patch completely ignores the fact that
some of the modules already had a version bump in the 9.6 development
cycle, like pageinpect. You don't need to create a new version script
in such cases.

I assumed this was too large change after beta1 had been released, but
if people feel otherwise I have no problem adapting this patch for 9.6.

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#4)
Re: Parallel safety tagging of extension functions

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

On 5/20/16 7:37 PM, Robert Haas wrote:

I guess my first question is whether we have consensus on the release
into which we should put this. Some people (Noah, among others)
thought it should wait because we're after feature freeze, while
others thought we should do it now. If we're going to try to get this
into 9.6, I'll work on reviewing this sooner rather than later, but if
we're not going to do that I'm going to postpone dealing with it until
after we branch.

Sounds to me that this is part of the cleanup of a 9.6 feature and
should be in that release.

Yes, let's fix it. This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#8Andreas Karlsson
andreas@proxel.se
In reply to: Andreas Karlsson (#1)
Re: Parallel safety tagging of extension functions

Another question which I thought of is what we should do with functions
like pg_file_write() in adminpack.

While it is perfectly fine to modify files from the parallel workers, a
user could get race conditions if he tries to modify the same file
multiple times. Is this a kind of problem the PARALLEL tagging should
try to prevent, or is that something we should leave to the user?

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#9Michael Paquier
michael.paquier@gmail.com
In reply to: Andreas Karlsson (#8)
Re: Parallel safety tagging of extension functions

On Sat, May 21, 2016 at 1:01 PM, Andreas Karlsson <andreas@proxel.se> wrote:

Another question which I thought of is what we should do with functions like
pg_file_write() in adminpack.

While it is perfectly fine to modify files from the parallel workers, a user
could get race conditions if he tries to modify the same file multiple
times. Is this a kind of problem the PARALLEL tagging should try to prevent,
or is that something we should leave to the user?

Having multiple processes trying to write to a file on Windows is no
good either and would need some extra logic with EventWaitHandle().
I'd rather have those be marked as unsafe for now.
--
Michael

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#10Andreas Karlsson
andreas@proxel.se
In reply to: Tom Lane (#7)
Re: Parallel safety tagging of extension functions

On 05/21/2016 11:45 AM, Tom Lane wrote:

Yes, let's fix it. This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

Do you have any idea what the best way to add these tweaks to the
upgrade scripts would be?

My immediate thought is first doing an UPDATE of pg_proc and then
updating the catcache with CREATE OR REPLACE with the new arguments.
Does that work? Is there a less ugly way to accomplish this?

Example:

UPDATE pg_proc SET proargtypes = ('internal'::regtype::oid || ' ' ||
'internal'::regtype::oid)::oidvector
WHERE proname = 'gbt_oid_union'
AND proargtypes = ('bytea'::regtype::oid || ' ' ||
'internal'::regtype::oid)::oidvector
AND pronamespace = current_schema()::regnamespace;

CREATE OR REPLACE FUNCTION gbt_oid_union(internal, internal)
RETURNS gbtreekey8
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#11Michael Paquier
michael.paquier@gmail.com
In reply to: Andreas Karlsson (#10)
Re: Parallel safety tagging of extension functions

On Sat, May 21, 2016 at 6:16 PM, Andreas Karlsson <andreas@proxel.se> wrote:

My immediate thought is first doing an UPDATE of pg_proc and then updating
the catcache with CREATE OR REPLACE with the new arguments. Does that work?
Is there a less ugly way to accomplish this?

Example:

UPDATE pg_proc SET proargtypes = ('internal'::regtype::oid || ' ' ||
'internal'::regtype::oid)::oidvector
WHERE proname = 'gbt_oid_union'
AND proargtypes = ('bytea'::regtype::oid || ' ' ||
'internal'::regtype::oid)::oidvector
AND pronamespace = current_schema()::regnamespace;

CREATE OR REPLACE FUNCTION gbt_oid_union(internal, internal)
RETURNS gbtreekey8
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;

Isn't it better to just drop and recreate the function? pageinspect
did so for example for heap_page_items in 1.4 to update its OUT
arguments.
--
Michael

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#12Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Paquier (#11)
Re: Parallel safety tagging of extension functions

Michael Paquier <michael.paquier@gmail.com> writes:

On Sat, May 21, 2016 at 6:16 PM, Andreas Karlsson <andreas@proxel.se> wrote:

My immediate thought is first doing an UPDATE of pg_proc and then updating
the catcache with CREATE OR REPLACE with the new arguments. Does that work?
Is there a less ugly way to accomplish this?

Isn't it better to just drop and recreate the function? pageinspect
did so for example for heap_page_items in 1.4 to update its OUT
arguments.

You'd have to alter the index opfamily to disconnect the function from it,
drop/recreate the function, then re-add it to the opfamily. Kind of icky,
but probably better than the alternatives.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#13Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Tom Lane (#12)
Re: Parallel safety tagging of extension functions

Tom Lane wrote:

Michael Paquier <michael.paquier@gmail.com> writes:

On Sat, May 21, 2016 at 6:16 PM, Andreas Karlsson <andreas@proxel.se> wrote:

My immediate thought is first doing an UPDATE of pg_proc and then updating
the catcache with CREATE OR REPLACE with the new arguments. Does that work?
Is there a less ugly way to accomplish this?

Isn't it better to just drop and recreate the function? pageinspect
did so for example for heap_page_items in 1.4 to update its OUT
arguments.

You'd have to alter the index opfamily to disconnect the function from it,
drop/recreate the function, then re-add it to the opfamily. Kind of icky,
but probably better than the alternatives.

What happens if the upgraded database contains indexes using those
opfamilies? I suppose getting such indexes dropped because of ALTER
EXTENSION UPDATE is not very nice.

--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#14Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#13)
Re: Parallel safety tagging of extension functions

Alvaro Herrera <alvherre@2ndquadrant.com> writes:

Tom Lane wrote:

You'd have to alter the index opfamily to disconnect the function from it,
drop/recreate the function, then re-add it to the opfamily. Kind of icky,
but probably better than the alternatives.

What happens if the upgraded database contains indexes using those
opfamilies? I suppose getting such indexes dropped because of ALTER
EXTENSION UPDATE is not very nice.

Sure, that's why we mustn't drop and recreate the whole opfamily.
But we can do ALTER OPERATOR FAMILY ... DROP ... without causing
dependent indexes to be dropped. Semi-bad things would happen if
someone tried to access such an index partway through; but as long
as the extension upgrade script itself doesn't do that, it should
be okay. We run extension scripts as single transactions so the
change should appear atomic.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#15Robert Haas
robertmhaas@gmail.com
In reply to: Michael Paquier (#5)
Re: Parallel safety tagging of extension functions

On Fri, May 20, 2016 at 11:45 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:

Sounds to me that this is part of the cleanup of a 9.6 feature and should be
in that release.

Yes, I agree. By the way, the patch completely ignores the fact that
some of the modules already had a version bump in the 9.6 development
cycle, like pageinpect. You don't need to create a new version script
in such cases.

I think now that beta1 has shipped we would want to bump the version either way.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#16Robert Haas
robertmhaas@gmail.com
In reply to: Andreas Karlsson (#8)
Re: Parallel safety tagging of extension functions

On Sat, May 21, 2016 at 1:01 PM, Andreas Karlsson <andreas@proxel.se> wrote:

Another question which I thought of is what we should do with functions like
pg_file_write() in adminpack.

While it is perfectly fine to modify files from the parallel workers, a user
could get race conditions if he tries to modify the same file multiple
times. Is this a kind of problem the PARALLEL tagging should try to prevent,
or is that something we should leave to the user?

I think there's little value in marking such things parallel-safe,
even though by some definition they may be. Parallelizing queries
involving pg_file_write() is not really a useful thing to do. What we
really want to do is nail the functions that people might be likely to
use as scan quals, plus any generally useful aggregates.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#17Robert Haas
robertmhaas@gmail.com
In reply to: Andreas Karlsson (#1)
Re: Parallel safety tagging of extension functions

On Thu, May 19, 2016 at 5:50 PM, Andreas Karlsson <andreas@proxel.se> wrote:

- How should we modify the aggregate functions when upgrading extensions?
ALTER AGGREGATE cannot change COMBINEFUNC or PARALLEL. My current patch
updates the system catalogs directly, which should be safe in this case, but
is this an acceptable solution?

I'd rather extend see us ALTER AGGREGATE to do this.

- Do you think we should add PARALLEL UNSAFE to the functions which we know
are unsafe to make it obvious that it is intentional?

That seems likely unnecessary churn from here.

- I have not added the parallel tags to the functions used by our procedural
languages. Should we do so?

I don't think that accomplishes anything.

- I have marked uuid-ossp, chkpass_in() and pgcrypto functions which
generate random data as safe, despite that they depend on state in the
backend. My reasoning is that, especially for the pgcrypto functions, that
nobody should not rely on the PRNG state. For uuid-ossp I am on the fence.

random() is marked parallel-restricted because of setseed(). If
there's no equivalent for other random number generators then I think
they can be construed as safe.

- I have touched a lot of legacy libraries, like tsearch2 and the spi/*
stuff. Is that a good idea?

I don't know. It doesn't seem particularly important, but I can't
immediately see a reason not to do it either. You could argue it
might allow for better test coverage...

- I decided to ignore that isn_weak() exists (and would make all input
functions PARALLEL RESTRICTED) since it is only there is ISN_WEAK_MODE is
defined. Is that ok?

That seems fine.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#18Robert Haas
robertmhaas@gmail.com
In reply to: Robert Haas (#17)
Re: Parallel safety tagging of extension functions

On Tue, May 24, 2016 at 8:41 PM, Robert Haas <robertmhaas@gmail.com> wrote:

- Do you think we should add PARALLEL UNSAFE to the functions which we know
are unsafe to make it obvious that it is intentional?

That seems likely unnecessary churn from here.

A general point here is that there's no point in marking a function
PARALLEL SAFE unless it's going to be referenced in a query. So for
example I'm pretty sure the parallel markings on blhandler() don't
matter at all, and therefore there's no need to update the bloom
contrib module. Yeah, that function might get called, but it's not
going to be mentioned textually in the query.

I think this patch can get somewhat smaller if you update it that way.
I suggest merging the function and aggregate stuff together and
instead splitting this by contrib module.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#19Andreas Karlsson
andreas@proxel.se
In reply to: Robert Haas (#15)
Re: Parallel safety tagging of extension functions

On 05/25/2016 02:34 AM, Robert Haas wrote:

On Fri, May 20, 2016 at 11:45 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:

Sounds to me that this is part of the cleanup of a 9.6 feature and should be
in that release.

Yes, I agree. By the way, the patch completely ignores the fact that
some of the modules already had a version bump in the 9.6 development
cycle, like pageinpect. You don't need to create a new version script
in such cases.

I think now that beta1 has shipped we would want to bump the version either way.

I am fine with doing it either way. I will leave it as new versions for
everything now then and if people want to I can merge the two upgrade
scripts.

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#20Andreas Karlsson
andreas@proxel.se
In reply to: Robert Haas (#17)
Re: Parallel safety tagging of extension functions

On 05/25/2016 02:41 AM, Robert Haas wrote:

On Thu, May 19, 2016 at 5:50 PM, Andreas Karlsson <andreas@proxel.se> wrote:

- How should we modify the aggregate functions when upgrading extensions?
ALTER AGGREGATE cannot change COMBINEFUNC or PARALLEL. My current patch
updates the system catalogs directly, which should be safe in this case, but
is this an acceptable solution?

I'd rather extend see us ALTER AGGREGATE to do this.

Wouldn't that prevent this from going into 9.6? I do not think changing
ALTER AGGREGATE is 9.6 materials.

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#21Andreas Karlsson
andreas@proxel.se
In reply to: Robert Haas (#18)
Re: Parallel safety tagging of extension functions

On 05/25/2016 03:09 AM, Robert Haas wrote:

On Tue, May 24, 2016 at 8:41 PM, Robert Haas <robertmhaas@gmail.com> wrote:

- Do you think we should add PARALLEL UNSAFE to the functions which we know
are unsafe to make it obvious that it is intentional?

That seems likely unnecessary churn from here.

A general point here is that there's no point in marking a function
PARALLEL SAFE unless it's going to be referenced in a query. So for
example I'm pretty sure the parallel markings on blhandler() don't
matter at all, and therefore there's no need to update the bloom
contrib module. Yeah, that function might get called, but it's not
going to be mentioned textually in the query.

I think this patch can get somewhat smaller if you update it that way.
I suggest merging the function and aggregate stuff together and
instead splitting this by contrib module.

Ok, then I can avoid touching all functions which are only called by
operator classes, tsearch, pls, fdws, etc. Which also means that there
is no need to care about Tom's changes to the signatures of GIN and GiST
support functions.

I am also fine with splitting it per extension.

Thanks for the feedback. I aim to find the time to incorporate it in a
new set of patches the upcoming couple of days.

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#22Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Karlsson (#20)
Re: Parallel safety tagging of extension functions

Andreas Karlsson <andreas@proxel.se> writes:

On 05/25/2016 02:41 AM, Robert Haas wrote:

I'd rather extend see us ALTER AGGREGATE to do this.

Wouldn't that prevent this from going into 9.6? I do not think changing
ALTER AGGREGATE is 9.6 materials.

Well, it's debatable --- but if the patch to do it is small and the
alternatives are really ugly, that would be an acceptable choice IMO.
Certainly we'd want to add that capability eventually anyway.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#23Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Karlsson (#21)
Re: Parallel safety tagging of extension functions

Andreas Karlsson <andreas@proxel.se> writes:

Ok, then I can avoid touching all functions which are only called by
operator classes, tsearch, pls, fdws, etc. Which also means that there
is no need to care about Tom's changes to the signatures of GIN and GiST
support functions.

I think as long as you already did the work, we should keep those updates.
I'm not totally convinced by Alexander's argument that those changes pose
a future hazard, but I'm not convinced he's wrong either. If we're going
to be bumping a lot of contrib module versions anyway, it'd be silly to
take the risk that that's not a problem.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#24Stephen Frost
sfrost@snowman.net
In reply to: Tom Lane (#22)
Re: Parallel safety tagging of extension functions

All,

* Tom Lane (tgl@sss.pgh.pa.us) wrote:

Andreas Karlsson <andreas@proxel.se> writes:

On 05/25/2016 02:41 AM, Robert Haas wrote:

I'd rather extend see us ALTER AGGREGATE to do this.

Wouldn't that prevent this from going into 9.6? I do not think changing
ALTER AGGREGATE is 9.6 materials.

Well, it's debatable --- but if the patch to do it is small and the
alternatives are really ugly, that would be an acceptable choice IMO.
Certainly we'd want to add that capability eventually anyway.

I tend to agree with Tom on this. This should really have been included
in the earlier patches, but there's no help for that and if it's a small
patch and the other options are far worse then we need to accept that
solution and move on.

Thanks!

Stephen

#25Andreas Karlsson
andreas@proxel.se
In reply to: Tom Lane (#23)
Re: Parallel safety tagging of extension functions

On 05/25/2016 03:37 AM, Tom Lane wrote:

Andreas Karlsson <andreas@proxel.se> writes:

Ok, then I can avoid touching all functions which are only called by
operator classes, tsearch, pls, fdws, etc. Which also means that there
is no need to care about Tom's changes to the signatures of GIN and GiST
support functions.

I think as long as you already did the work, we should keep those updates.
I'm not totally convinced by Alexander's argument that those changes pose
a future hazard, but I'm not convinced he's wrong either. If we're going
to be bumping a lot of contrib module versions anyway, it'd be silly to
take the risk that that's not a problem.

So how to best change the function signatures? I do not think it is
possible without locking indexes by just using the SQL commands. You
cannot drop a function from the operator family without dropping the
operator class first.

Is the correct solution to manually update pg_amop with a new value for
amopmethod?

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#26Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Karlsson (#25)
Re: Parallel safety tagging of extension functions

Andreas Karlsson <andreas@proxel.se> writes:

So how to best change the function signatures? I do not think it is
possible without locking indexes by just using the SQL commands. You
cannot drop a function from the operator family without dropping the
operator class first.

Ugh. I had been thinking that you could use ALTER OPERATOR FAMILY DROP
FUNCTION, but these functions are not "loose" in the opfamily --- they're
assumed to be bound to the specific opclass. So there's an opclass
dependency preventing them from getting dropped; and we have no SQL
commands for changing the contents of an opclass. After some fooling
around, I couldn't find a way to do it without some manual catalog update
or other.

Given that, your original approach of manually updating proargtypes in the
existing pg_proc row for the functions may be the best way. Anything else
is going to be more complicated and ultimately will still require at least
one direct catalog update.

Sometime we might want to think about making this sort of thing cleaner
with more ALTER commands, but post-beta is probably not the time for that;
it wouldn't be a small patch.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#27Andreas Karlsson
andreas@proxel.se
In reply to: Tom Lane (#26)
1 attachment(s)
Re: Parallel safety tagging of extension functions

On 05/31/2016 06:47 PM, Tom Lane wrote:

Given that, your original approach of manually updating proargtypes in the
existing pg_proc row for the functions may be the best way. Anything else
is going to be more complicated and ultimately will still require at least
one direct catalog update.

It is the least ugly of all the ugly solutions I could think of. I have
attached a patch which fixes the signatures using this method. I use
CREATE OR REPLACE FUNCTION to update to catcache. What do you think? Is
it too ugly?

Andreas

Attachments:

gin-gist-signatures-v1.patch.gzapplication/gzip; name=gin-gist-signatures-v1.patch.gzDownload
#28Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Karlsson (#27)
Re: Parallel safety tagging of extension functions

Andreas Karlsson <andreas@proxel.se> writes:

It is the least ugly of all the ugly solutions I could think of. I have
attached a patch which fixes the signatures using this method. I use
CREATE OR REPLACE FUNCTION to update to catcache. What do you think? Is
it too ugly?

I don't understand why you think you need the CREATE OR REPLACE FUNCTION
commands? We only need to change proargtypes, and the updates did that.
The catcache can take care of itself.

I think it would be good practice to be more careful about
schema-qualifying all the pg_catalog table and type names.

I also think it's a bad idea to use to_regprocedure() rather than
a cast to regprocedure. If the name isn't found, we want an error,
not a silent NULL result leading to no update occurring.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#29Andreas Karlsson
andreas@proxel.se
In reply to: Tom Lane (#28)
Re: Parallel safety tagging of extension functions

On 06/01/2016 04:44 PM, Tom Lane wrote:

Andreas Karlsson <andreas@proxel.se> writes:

It is the least ugly of all the ugly solutions I could think of. I have
attached a patch which fixes the signatures using this method. I use
CREATE OR REPLACE FUNCTION to update to catcache. What do you think? Is
it too ugly?

I don't understand why you think you need the CREATE OR REPLACE FUNCTION
commands? We only need to change proargtypes, and the updates did that.
The catcache can take care of itself.

Maybe I did something wrong (I try to avoid doing manual catalog
updates), but when I tested it, I needed to run the CREATE OR REPLACE
FUNCTION command to later be able to set the parallel safety. See the
example below.

CREATE FUNCTION f(text) RETURNS int LANGUAGE SQL AS $$ SELECT 1 $$;

BEGIN;

UPDATE pg_proc SET proargtypes =
array_to_string('{int,int}'::regtype[]::oid[], ' ')::oidvector
WHERE oid = to_regprocedure('f(text)')
AND pronamespace = current_schema()::regnamespace;

ALTER FUNCTION f(int, int) STRICT;

COMMIT;

vs

CREATE FUNCTION f(text) RETURNS int LANGUAGE SQL AS $$ SELECT 1 $$;

BEGIN;

UPDATE pg_proc SET proargtypes =
array_to_string('{int,int}'::regtype[]::oid[], ' ')::oidvector
WHERE oid = to_regprocedure('f(text)')
AND pronamespace = current_schema()::regnamespace;

CREATE OR REPLACE FUNCTION f(int, int) RETURNS int LANGUAGE SQL AS $$
SELECT 1 $$;

ALTER FUNCTION f(int, int) STRICT;

COMMIT;

I think it would be good practice to be more careful about
schema-qualifying all the pg_catalog table and type names.

I do not think we generally schema qualify things in extension scripts
and instead rely of the CREATE/ALTER EXTENSION commands to set the
search path correct. Am I mistaken?

I also think it's a bad idea to use to_regprocedure() rather than
a cast to regprocedure. If the name isn't found, we want an error,
not a silent NULL result leading to no update occurring.

The reason I use to_regprocedure is so that these scripts work for
people who have installed the extensions in beta1 and therefore only
have the new signatures. If they run these scripts they would get an
error if I used the cast. Is it ok if these scripts break for beta1 users?

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#30Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Karlsson (#29)
Re: Parallel safety tagging of extension functions

Andreas Karlsson <andreas@proxel.se> writes:

On 06/01/2016 04:44 PM, Tom Lane wrote:

I don't understand why you think you need the CREATE OR REPLACE FUNCTION
commands? We only need to change proargtypes, and the updates did that.
The catcache can take care of itself.

Maybe I did something wrong (I try to avoid doing manual catalog
updates), but when I tested it, I needed to run the CREATE OR REPLACE
FUNCTION command to later be able to set the parallel safety. See the
example below.

In this particular example, the problem seems to be that you forgot to
update pronargs; it works for me when I add "pronargs = 2" to the UPDATE.
Your "working" example is actually creating a new function, not replacing
the old pg_proc entry.

BTW, it strikes me that the pronamespace tests in these queries are
redundant: the OID is unique, so what matters is the search path
in the regprocedure lookups.

The reason I use to_regprocedure is so that these scripts work for
people who have installed the extensions in beta1 and therefore only
have the new signatures. If they run these scripts they would get an
error if I used the cast. Is it ok if these scripts break for beta1 users?

Ugh. This is more of a mess than I thought. I don't like update scripts
that might silently fail to do what they're supposed to, but leaving
beta1 users in the lurch is not very nice either.

I wonder ... could we get away with using regproc rather than
regprocedure? These function names are probably unique anyway ...

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#31Andreas Karlsson
andreas@proxel.se
In reply to: Tom Lane (#30)
1 attachment(s)
Re: Parallel safety tagging of extension functions

On 06/01/2016 05:15 PM, Tom Lane wrote:

Andreas Karlsson <andreas@proxel.se> writes:

On 06/01/2016 04:44 PM, Tom Lane wrote:

I don't understand why you think you need the CREATE OR REPLACE FUNCTION
commands? We only need to change proargtypes, and the updates did that.
The catcache can take care of itself.

Maybe I did something wrong (I try to avoid doing manual catalog
updates), but when I tested it, I needed to run the CREATE OR REPLACE
FUNCTION command to later be able to set the parallel safety. See the
example below.

In this particular example, the problem seems to be that you forgot to
update pronargs; it works for me when I add "pronargs = 2" to the UPDATE.
Your "working" example is actually creating a new function, not replacing
the old pg_proc entry.

BTW, it strikes me that the pronamespace tests in these queries are
redundant: the OID is unique, so what matters is the search path
in the regprocedure lookups.

Thanks, I have fixed this.

The reason I use to_regprocedure is so that these scripts work for
people who have installed the extensions in beta1 and therefore only
have the new signatures. If they run these scripts they would get an
error if I used the cast. Is it ok if these scripts break for beta1 users?

Ugh. This is more of a mess than I thought. I don't like update scripts
that might silently fail to do what they're supposed to, but leaving
beta1 users in the lurch is not very nice either.

I wonder ... could we get away with using regproc rather than
regprocedure? These function names are probably unique anyway ...

Yeah, I would have strongly preferred to be able to use the cast. All
these functions have unique names within the core, but there is the
small risk of someone adding a user function with the same name. I do
not like either option.

The attached patch still uses to_regprocedure, but I can change to using
::regproc if that is what you prefer.

Andreas

Attachments:

gin-gist-signatures-v2.patch.gzapplication/gzip; name=gin-gist-signatures-v2.patch.gzDownload
#32Andreas Karlsson
andreas@proxel.se
In reply to: Tom Lane (#22)
Re: Parallel safety tagging of extension functions

On 05/25/2016 03:32 AM, Tom Lane wrote:

Andreas Karlsson <andreas@proxel.se> writes:

On 05/25/2016 02:41 AM, Robert Haas wrote:

I'd rather extend see us ALTER AGGREGATE to do this.

Wouldn't that prevent this from going into 9.6? I do not think changing
ALTER AGGREGATE is 9.6 materials.

Well, it's debatable --- but if the patch to do it is small and the
alternatives are really ugly, that would be an acceptable choice IMO.
Certainly we'd want to add that capability eventually anyway.

Looked at this quickly and I do not think adding it would be what I
consider a small patch since we would essentially need to copy the
validation logic from DefineAggregate and AggregateCreate and modify it
to fit the alter case. I am leaning towards either either leaving the
aggregate functions alone or updating the catalog manually.

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#33Michael Paquier
michael.paquier@gmail.com
In reply to: Andreas Karlsson (#32)
Re: Parallel safety tagging of extension functions

On Thu, Jun 2, 2016 at 7:36 AM, Andreas Karlsson <andreas@proxel.se> wrote:

On 05/25/2016 03:32 AM, Tom Lane wrote:

Andreas Karlsson <andreas@proxel.se> writes:

On 05/25/2016 02:41 AM, Robert Haas wrote:

I'd rather extend see us ALTER AGGREGATE to do this.

Wouldn't that prevent this from going into 9.6? I do not think changing
ALTER AGGREGATE is 9.6 materials.

Well, it's debatable --- but if the patch to do it is small and the
alternatives are really ugly, that would be an acceptable choice IMO.
Certainly we'd want to add that capability eventually anyway.

Looked at this quickly and I do not think adding it would be what I consider
a small patch since we would essentially need to copy the validation logic
from DefineAggregate and AggregateCreate and modify it to fit the alter
case. I am leaning towards either either leaving the aggregate functions
alone or updating the catalog manually.

As this is proving to be a hassle, what would it cost to leave those
operator classes as-is for 9.6 and come up with a cleaner solution at
DDL level with 10.0? Then we could still focus on the other extensions
that have content that can be easily switched. That's more than 90% of
the things that need to marked with parallel-safe.
--
Michael

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#34Andreas Karlsson
andreas@proxel.se
In reply to: Michael Paquier (#33)
Re: Parallel safety tagging of extension functions

On 06/02/2016 01:41 AM, Michael Paquier wrote:

On Thu, Jun 2, 2016 at 7:36 AM, Andreas Karlsson <andreas@proxel.se>

wrote:

Looked at this quickly and I do not think adding it would be what I

consider

a small patch since we would essentially need to copy the validation

logic

from DefineAggregate and AggregateCreate and modify it to fit the alter
case. I am leaning towards either either leaving the aggregate functions
alone or updating the catalog manually.

As this is proving to be a hassle, what would it cost to leave those
operator classes as-is for 9.6 and come up with a cleaner solution at
DDL level with 10.0? Then we could still focus on the other extensions
that have content that can be easily switched. That's more than 90% of
the things that need to marked with parallel-safe.

I think at least three of the four aggregate functions are little used,
so I do not think many users would be affected. And only min(citext) and
max(citext) can make use of the parallel aggregation.

The functions are:

min(citext)
max(citext)
int_array_aggregate(int4)
rewrite(tsquery[])

It would be nice if we had support for this in ALTER AGGREGATE in 9.6
already since I bet that there are external extensions which want to
take advantage of the parallel aggregation, but at least if I add this
command I do not feel like it would be a minor patch. If people disagree
and are fine with copying the validation logic, then I am prepare to do
the work. I would just rather not rush this if there is no chance anyway
that it will get into 9.6.

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#35Andreas Karlsson
andreas@proxel.se
In reply to: Robert Haas (#18)
44 attachment(s)
Re: Parallel safety tagging of extension functions

Hi,

Here is the patch split into many small patches as you suggested. The
current patches are based on top of the patch which fixes the signatures
for gin and gist functions.

These patches only touch functions which never should be called
directly, so they are fine to skip. I decided to attach them anyway in
case you fell like applying them.

parallel-contrib-v2-bloom.patch.gz
parallel-contrib-v2-btree_gin.patch.gz
parallel-contrib-v2-btree_gist.patch.gz
parallel-contrib-v2-dict_int.patch.gz
parallel-contrib-v2-dict_xsyn.patch.gz
parallel-contrib-v2-file_fdw.patch.gz
parallel-contrib-v2-hstore_plperl.patch.gz
parallel-contrib-v2-hstore_plpython.patch.gz
parallel-contrib-v2-ltree_plpython.patch.gz
parallel-contrib-v2-postgres_fdw.patch.gz
parallel-contrib-v2-tsm_system_rows.patch.gz
parallel-contrib-v2-tsm_system_time.patch.gz

These two mostly concern triggers so i guess they could be skipped too.

parallel-contrib-v2-tcn.patch.gz
parallel-contrib-v2-spi.patch.gz

Andreas

Attachments:

parallel-contrib-v2-adminpack.patch.gzapplication/gzip; name=parallel-contrib-v2-adminpack.patch.gzDownload
parallel-contrib-v2-bloom.patch.gzapplication/gzip; name=parallel-contrib-v2-bloom.patch.gzDownload
parallel-contrib-v2-btree_gin.patch.gzapplication/gzip; name=parallel-contrib-v2-btree_gin.patch.gzDownload
��RWparallel-contrib-v2-btree_gin.patch��oo���_O���.�:v�����C���2�I;�d�i�:v*+�m?�HI�d�y(��� ��G<��O'!�g����^�� w�\�7��>�w_���g����M

-o1�?�������a�?��'��	:<88�m�������n����Q��{��������>�^�&�W�%�-t��_��o�K�[�����G7��+Yh����rt~u������x��M�w�?������z^<��o�W<K��.����w�����X��H����O�����)����F=��G@�������"@g��h��}7X�h:wW+���������C��*p�������������.y���\��h��H[g��!r�7�������{\��:h���������cg�&���~�_<����]��������9&�du�G�N��ou�.i�t��4wi7���������j��O���(z"�������]��E����&
A��O��v��N�,�t{Mbl��Wh�4dwKD�iF�������/$��������1�B�:�r��02��_���4
������������cZ#|�
]n�4|��{%�#��ipG��Q���
 +�s]�=����#g&{�7��3����Z�q������g���8�oX��;��S������
������T������r] hb���D�(9S�t��J�!�}v�c�N�0��+���U�?I:��������r^3m����{�$�z|�$��y�5�i�\�x;}��d^W�?y��+T�K��W�S�e��Ml&1V�r
������������]�ib��0s���r]�1�+�<�aU���'/;���G����z�����f�����N|.�I��e���'D��8D0��eC#c&6V6��U���#}K���I��s���jo
��=��!�fc%ol��������N�1��,9���U���v;��\lJ������j����.�����RI��m������N������,��&V�
��G�{�N|.�����r}!lg�����M����f3@�s�$��q�g�)���s�������pz�c��W��t6�p��y��tR��{��0��������8��9�t*������ss�9���0�`�n������,�s�7��x�z0�����p��].�ngCt�F����1:���v<�pA�E�>��Ez�����>p�c�1�6:Bg���.����W7��b0
��-�VV������b�>�����a��_��p"w0�z�|%������=~�������q|�����
������s-��'��������-�F����1��N�����@p���	?U�a����������f��42
�	
"0�h�v�a���i|�Z�`Y� h62��7��a�#��&7���	v��L�@�#F��Bd812��2�@�A ��'�M5d8��-01�
��)��_��m�DM $^a�2�D^Q�����(8'��h0R6��Or�D!h�,�2��r/�h-3�Qv��n#Z�-N�Y�(���
������[U��f-���F�����U�/����%�DO���(Sw��,E#�0��4%�Xh0H��DG9E�z�aWH�:dS���^�66H;����
���D�A��|�q�/��o0&�n�o9 H-E</�7�
��}S��]��m�$��$)oTR��C���S��3&�n�4�><��Wr%u�T>�R� �����C6���Q*��RN�7HE�&�����
}bi����rne_���+� �q^=�fM����Q�����;a���&�ZlQ����$�MEp��{��85��~�d��Q�(�c���d���������[�&��h8QRg��W�s�C�F�"{��O`ao�%�!���vq$t�R$�~z���`z�b���H	rf�j��k��	�^f����%��Xz6F��6,nU��U��p�_h������\�8i0qX��/�+u����^�[w�]������0[�l}L��:���]�Y�.���">k,��:|Q�Fx4�8yw�g9n�����5��<�xSs�
d+���48�38hR�C,�oq*CF�tR6�5RH4 �#�A���@�m��BC�!�)h����64hC��E h�D1?�u����T��M#�F���}���EO�Y�:����T'�8;�����glJ�s����HCD�A��]	�$�>�3A���Ac��� P4�#�A�Z� _\��*(��vd���(����U3w@i��(��?��9���j�����l�����������n1w�V��fH����� :i�����g��ph0G���'9K���(���k%
���"	t7�m�$l�%aY�HB]� �F <�1�i0F���`�d]��r���T!�l1m E�SC`K��c��)NJZ�/����<����pPF�������
x�T�D��E��>��X��}����"�gI���D��Bt�D�`�����0�t&>)�D,b}�hQVF0E=���X�C�������|���������
��cF�Nd6ryw�g9���0�E)tu�������3�TwDM��sFr�[Vr�4g��#�
��.r��1�7���u��$��Zk�r$��;��;IK�d���>�I�teR%�V�w�������;�B���-����2w�.���R%��>���*��N��k~w(��JH�t�R%�pa�Jj�K�pI]p������-���B�0�&p�pDM�p��4.��&<���paEMj�K��I]p�����#���B�0�'p�p�O�p��4.��'<�8�p���E1�Z0�!�b5�6�PJ+p#JBG,���PJc��&�� h-��!�PJ�����!���y�2FR�=�J��@�+��!��J�!$�T�CH5H��� ��Z��[1J�T|��O^|�����#_B.��X�(��0���W�p�_�5�R,�@$�b0k�/�2--�G��L*0����P��AI(���LK}P�����m	���ta��ti~T]�<�	���/��XN]re]`��4�a y�zI�#�R��-�x��oz��&�~��Z���.���_��7����rt�ue�1�/���P�6�da�c��W�#��$V$F�B��Fs�H$��[�"1��EA2�6�d���07jcZ$���`_NF�;P9�F�G.'�%�r~�����?Rq�Z���1J�Dx�eNNx���
�Y��r*<�X���g�D�3�K���3�.�V���kY��(�����D
w�t^���I�I��WLH��WNkI�4�M�C�����D��:"�DM�k��k�YQ�#_cvUQF������i���l��
�l�����l�&e1v��Z�F1������;I�mj��@B7���X���#m���>")
pZ����C0����F&{�I}���^��7��E*�S^��8F����x�	����~d��u�9����rLP�/��T ��T�	�0T�r�&�8RuN�a�\N=�a �	�Sa��(��I�� ����@g���#��/��Hc�"Sa����� �R:lH�R:
�Jf�����|)��RZ�/��g07<�)��/�Sc�"�SO"��1���	������)�����hf�i,qTDw��Ew��#��:*<�0,�c�9�<��<O����G$�\����Q��ax��������5�b=�@"�c0����m�K^����) !����H����:�!��&��>�PEC��([2�?����0b� j��?@��H�4;j�?���#�@��>���!-9 ��Y,��.��0+����
jE��J�X$D��TPc��,��,�����u�X�xr4��������$Q��@JW��%5�j���k���j����<�D&��\XT��z�vW�OOK?@�K�
�_����>R�?��������]�7�����D%��)j��@@�-8���J�����<,�GL~�{�����j>�/��z�9�����l����
parallel-contrib-v2-btree_gist.patch.gzapplication/gzip; name=parallel-contrib-v2-btree_gist.patch.gzDownload
parallel-contrib-v2-chkpass.patch.gzapplication/gzip; name=parallel-contrib-v2-chkpass.patch.gzDownload
parallel-contrib-v2-citext.patch.gzapplication/gzip; name=parallel-contrib-v2-citext.patch.gzDownload
parallel-contrib-v2-cube.patch.gzapplication/gzip; name=parallel-contrib-v2-cube.patch.gzDownload
parallel-contrib-v2-dblink.patch.gzapplication/gzip; name=parallel-contrib-v2-dblink.patch.gzDownload
parallel-contrib-v2-dict_int.patch.gzapplication/gzip; name=parallel-contrib-v2-dict_int.patch.gzDownload
parallel-contrib-v2-dict_xsyn.patch.gzapplication/gzip; name=parallel-contrib-v2-dict_xsyn.patch.gzDownload
��RWparallel-contrib-v2-dict_xsyn.patch�VmO�H����W)�����T!�����8���h��e
�:vjo8����Il��!����dg���������!(�����$�)�Z���1{�[C�+
YD��aD,�#h~G��PU{�?	u�5��� EQvb#��n��P:�S����?���t@f��s(��>�=���	�;����'6�#@@nbM���S�ri8FuEQtUS�oQui/\��{G�����H�e��.�o>x$�������s���ED�t������K2��a���A�$q��%��>�"���$�pE
��2�����hK��u;�vf5�(��BN�y�53V�y�T�s�yZ/'L+��X�Z���L�,ZS��\\ �z���}a�E~"��b`!d~�XY�L}�X_�&�.��)�{7���1p�]��[��'0�(�����X�8g
QH�xQ�W$�}S����qY�3����;9J�3~�bN����al��`@01������>����j��_�o"��|�0����5ti=������M�|�-�T2K2Eo�tK��({Pe�%���,��D�wI�B����';x!�Y��$R`�������8��bL����c��dC�(������0ql��|���6�����PX�T�����Y���
�1�9�+;i"���LG��+�E�q]�K3��a�S�E����0���X�6��2E+�
�B��$~�W�~�m
�s��?����9�Ne�o�q!����3�7����:E9{��*�T�U��MPW���'+�K�%�v������u�6���������Us[��p�^�4:����]��=k���N��yU������"�5U^=�J�LlI��i�Ec��i�#6��vo�&>�2��� ��������]���[po�Ao 9���z�� v�T�E�XZ�I��4J|��^$]x������@
parallel-contrib-v2-earthdistance.patch.gzapplication/gzip; name=parallel-contrib-v2-earthdistance.patch.gzDownload
parallel-contrib-v2-file_fdw.patch.gzapplication/gzip; name=parallel-contrib-v2-file_fdw.patch.gzDownload
parallel-contrib-v2-fuzzystrmatch.patch.gzapplication/gzip; name=parallel-contrib-v2-fuzzystrmatch.patch.gzDownload
parallel-contrib-v2-hstore.patch.gzapplication/gzip; name=parallel-contrib-v2-hstore.patch.gzDownload
parallel-contrib-v2-hstore_plperl.patch.gzapplication/gzip; name=parallel-contrib-v2-hstore_plperl.patch.gzDownload
parallel-contrib-v2-hstore_plpython.patch.gzapplication/gzip; name=parallel-contrib-v2-hstore_plpython.patch.gzDownload
parallel-contrib-v2-intagg.patch.gzapplication/gzip; name=parallel-contrib-v2-intagg.patch.gzDownload
parallel-contrib-v2-intarray.patch.gzapplication/gzip; name=parallel-contrib-v2-intarray.patch.gzDownload
parallel-contrib-v2-isn.patch.gzapplication/gzip; name=parallel-contrib-v2-isn.patch.gzDownload
��RWparallel-contrib-v2-isn.patch�]�s�6����+p}�+�e���6Mr�a��k,��:�%�2/"�T�����D�P v�nb�c���� 	j�?=�~���=�Ea����>Oo�/������z���s�O����>�|ur����K�|
������~�������Xs~��/�=�>t������3�����g�����n�K����0�w�v28�_���p����o�k�������Q�
m<���tu�|tFh��Q?�s7vA�����)Z?��u��~�K�ZG��,�&�zk?\���]���x=���3�.p�2F����	�?@b� �{[��6�����~:�����X�s��i�Y.)�)��
58�������T�����^��D��`�t��O���*F�0��g���P�c�v�go
�g7�|�����:����s&��mX�`r�����8B��q��;G3"qX7'���?���	>Mn/�x���g/��;�1��p?|^_;�`4���e�6q7�WeNkKH�
����������,�S����M�LkN�'��fu�F�D�.37>��.=�!�W�!y)����R�fgNe�c�:��!gQc=a
9y�	����D���&:fQC���z�r�z�������Mt����E���5�y*�Ry��3T�������<3�y)�JyN�3R���l���<�y(�B9]��#�����,d%,d��JXn}��B~����EI�:k
�H"�WCw54WCo5�VCg��)����t&S���������Lo�~&�e�>&�a��%�]5bY�HV#���b5bX�&�Fy.�3Q���,��` ����hLv����E�5�u$��������Z��3I���SrLNgr�Sc=a
9����L���}L����K��j����F��j��L���\�g�<�Y(�A(�P~P�1�A�:�u���Dh���jh���jh���$5&�N�19��1TvL���5�dz��3i/��1i��/i���jD�q�F��jD0y6�sQ���<�g�7���}j��HK2�r�/���r�o5#�Dr���q!��k�$L���,X��M��������De9�7�h�*n�@��C�ZhM�5��pb�Z��$W`��]E_��	u:L���a���+{�!��"0�a�NR���U��	S&�:L���a���+{��!��"0�ap��m[�*��K0N�����Sp�v�������D���Lh��x�pU���	��X�]��[��s��P�3��� $ v�:��_��o������B��0B�	T��d�����l��.��QN����[N���a�-��y��s�t�Q�D��
xpF�������3������pGr�b�-�����v����gg?��d�<(q
������X�����7�A�����g�����'j��xp�����~�L��u�9��q�t���fk��=�S����1���`��m��������(���d������~��/������o��1�8�L1�����[�������fp��������z7�v�����9G8�&��|��3|�&���~������t�s�$��t��=8����(mCG�(=��x?��8G�����r2�t�����f2�z������D�O��$e��5���I��.�x{?���E�kw�q�"���^_��A�V��R�2Z� �����F����qn�-a??�A�*��r6�h���p�3�x���/�u��h�Go;���62�r��C2��#�M�#��`����Xd���IF��;�k}�������	y��`���&�
���$(�$Pk���&7���F���<sV0
�0
Ta��Q`�(P�Q`�QF��G�2�[%��s���S���VH�4u)����k2~��i�I��%����	Y������&u�:��<��y!.%A��8�	��&�I�CuJ�J/��$�0�N������9�46�r4wA���T(<U��$��yk�t{�}�������]LO����C��h��x���{2\��B�,y�8��l��)�p�z�}iay$lH��2_�w�8��3W���Pq��h�����#V��l;�P6W\(��
�,���uN!y
�SD�J����?��)tPy�=��'6����zh�<�Z-O��
�S����T{(�in�C�)��jyj=�Z�Z���C�����zs���7����zs����7����zs����7����zs��L�7����zs�N�$n�5�����d�0�.Y)L�GVS��������=���3��(�y�N-%P�c�T��2�8��@N.#PQ�-!����}T��j�O����7u=Y����;u=[����?u=]����L�	ZC����5�j
�ZC�����d�\�j.W5��KU����R@o!���[�-l+n��	
'�ux��@5�-.P��T���x��@e�7wt]��j�Q���?5{�V��W��S���
ayJ�S_� ,Ok��-��^��Wk��t��\�Ws���`�\�j.V5���U����B@o���[�V���	
_�����8��@E�-.P��KT�������'��z�f�����S�wj�M}���<����@���?�	����	�"Ak��x��]�AWk��p5���V����bUs���P�[
�-��z��%�]������w_jn��E��f1QJ\YL�?����D)����yk�B]QUT�:O�S��)��f"j o�?@���(�
���W����J���q���{�a8�{�����?�]8'N���e��/��x�p���#��pu����?����'{����:��?�'���Q�p�.��2�������6w���.���[
��T�^m��	���Rqz_��$`�#qz_���6|��y�tF�_���������T����}G"�*vAU�b�X@EJZ�U�8��Z�;*���J	V�HC�	�������I��Wi�YH��=���g ���,�2����`lO�2H�R_�%��@l��2H
S_�EY?���2H-��T��P_��+N�t�*��:�����Akr�8R�9_�%��@l<��#5����Z������Aja������m��t�6�|:R��?
�A{NIO�i5�)xm$<
��t�����AK�N�i!�)0�&;��d�����4�����4����j�S��HvL�N�i
��;K-�:�uT�����4�����>�SaJ���
��G}i�K>RP�{�o�k>2�������"��~�o��>6��j'�[G���=�o��0\F�$��#��,~�$z�%vh�*�n�n�-{���Z�Oh�.��=����Eq�Fy��	�k�m}P���������7 �<U �����>W �x4��j<�H`��p��/I�����~k���7ZH.#ZC�AZ?Z=�;�D�D�s����B�v
��'�g�`���g�mFQ��Q�����x�#���E�*��L�f��
������#�H�	%���G	���VC%ak�������!~{ho3�-�9�#�������H|[w�P�!� ZR>��xhY�����-e��E��N�N�[Y2�����v�@���U���Oh�.�m{���Z�?��;��_�d_���#+� �1��D
1��C� H��B��������@�e��0�k��,�q*�
���<����=�����k?��]�fKB������O������&�����%��k����������)����H�O�N��0�`�M-T��K?��;�/\Nc���s�]�i��z8��|t>
'�c4�j�v���yE�j�P���g ����A���+/(^8Y��]y�(�S������v����.O��V$C��	b��*|O.�\O�����~C�BCD�k�xh�w����������P�W�����k@��E?D� &����H���P>s:U`U�S|�s��^�q��<�Gy}d���R�dTI����Sw�D�����DT����\Z]�W��#{��G�(/�,�JF�^{i��T����P^"������
�s�����=�UVuD;B���������"������<8���Y�K"*TL�i�i��$��-�JLu�U�}���:�UB��X5t�j�F��&�^$m�r�Y�iL��w$�Um�$���6%e=����:�]UeQ����V�pf z������������������a��V�w��$�pphg2m��F���x1��pN(����)��;,�w�n�~�V0t�u�+l���.Q�+B6w'�_hgoS�����m s|����b��737/4�����8<HW�����!��]}���"zBu�-��o��8A;H�T�6nae�����������0N��m�<�j(�A��j�D�=?���;j����V���{X&�i5��gKR	�v&��kk���Q���	��r������� .���x7�v�G�C�^g��v�J�U����g����{��o�<ba�/��`0����Oh%�UU�7�v���#v�
w)����	��[0B��o��8A�u*G����2	��U��H��&��'���g[ ����s����9���H�3C��y5g���0g�b�cT���rZM`���T���������wv�� {�9�n �r��<�������]���������]��}�7�W�9���\�y/X1���9�/1���o1�������<J����o�����'�TBmV3�.|X��<���a��dGp&�������V���,���Qy��mL��LBr^S����1���X�i�b�f�������_�s�Er���cd;0sa����n�H[��,�\F+A&���8�v���������?W�X��Q���F������GYt@�E*DC�h�
U���Tu7�l���W4U��*AR*���c���\�������(Jo�r�_�?3���7�6�z\@��(2��*
����R&Nm������l���9����C�&��h��������s;&�&��&;8D6<L6�/W1c*��H�`$��U�'S{�	%��<���{O�
�ge����?wc?
�7OO�y�e�]�H+����
-�M.d�"k�E����='���ZV�4"���.�LV�#��"
��Tbc*$���H�5"��#&5E]1�j���i-�Euk��*s�IY$���E2�Y���>���Dp�`A���7�x��n6��#/���4p���&A4�N�=����&�%������<�
�c?\�
J�Q���o��X+�8�qg3o'�t�V��z�X*��n����P��>���������~��Y�kz������g'g'��L�M���<�K/]��`�����#k�	�''�~�~��,Q����vn��N���M�����wv����9����;�01�p��uzH�,
VK�G���l��b�C0��g�����~�nz3��
�7��
�����2B���7{�����d#��� �P�����a�N��_7~�q�t���fk��QA�N����.��I����I;�o��c��Q��s������~��/������o��1�8�-�Y�nR�}�����h�38{�f�u���q;�wW����D��s�J�\D��-P�!�7�z��'i�qw�����N��j{����;{�������ax}�\������%�u����30�e�����o�'�������5���_D�������%��3d�e�8���;=lD�Q$��hI�����Uz�[�]g��V���?C�y�	�����,/��bo���d�(��������j����4�+���
������X6�(F�s�s�k}���IO�2m�lT�,h�f�^�e�jmT��f�Y�h7<�A��`��`F�z��F�j�+�6��>��`���j(���#��Qy��/���	�����yW!���Rt$M�!���b9!�u�$�i���I��&A�M
q/	z���	x:�u�F���+�R�kIPcX?���|k�&��	M&�N�I��� ���=&���[C���u4��
��=w'��������H��CvZ�w�4���ov�J�R��.���s���5������}��}U-~!�����/dl�Pn�Pf��a�����NR���o��E�7��"���!�
@D~� ���  �QT�o����e���FP-�i�79t3@@~����,��7���2�Z~�U���ld��1[���}LW>f��U����l�c��1]���u�V:f��U��������:}��}�Rx�._)�I�����W
?���>�~I�A����I#�	��h�<2!��&H$���Q���Y��a���o��M=������z6,!�Q�7�tXB��2�[DMF���a4iM���-��
��������������R�l�d�L2[$�-�l/�n�����c�9�!�8���#�!
Ih�E�K��1��0���o�������I\~��o�������+���-��E���a4qMF����a8a�2�0�.�,�*�(�-��Jf�$�E����i���T�]4���y�4�q
QH@3,�X���t�Q��a���o���O����~s���F��\%,�h�-������h�0�4���	��������v��f��V��F�l�d�P2[&�-���HvH���28��P���[�D7B1���DPt$�P^��L�/7�D�7���r�����]OFH�m�G��-Q����Ww�����k��l��_�}�|�������8yp���.�o�:������W��������5��Y�T<�{�����n������QN�t����^��[���]����7��K�|����=�W�{�*�T����8	��H���"B�k�
_�q.�������3���;���b�����]P��*P�R��v�wN������4��R�U$��t�p�/�y�p�g�#[�zR�h�j1��-$>���gA5B�=��R���j	�%��R����jQ�,��R�>�%��@�����>�
����t��r~���/��p�j	�%���H��|q��|h!�e�Z���@-��bs>��9���"�O�v����B�S`ZMy
^	O�i#�i8-"{���pZHv
L��N�k#�i0m$;
�Ed�-!;
��d������6���F��pZCv�S�N�i�i(-f:
�}D�����T������(_��>���%)��=���5��o�K@UNT?���MoJ�����~k���7ZH.#ZC�AZ?Z=�;�D�D�s����B�v
��'�g�`���g�{��8m����
������(
T�����mF��v�*��j���v�+��l<�H@5P$��s�����$��I��Q�5�o�-$�-�!�� -�-�m�Z"�J���[h�^�u;�����K�}�@���6�(N�(o�mFA�������@��F�o3B������RP
�q���q����T�E�����5�o�[G���=���������G{�w��m$��;q�
��w-)�Q<��thI�������Al'c'��,�p�Mw;A�vR���m�'�d���=B[v��h�L�/n�/A���A�F�FK��X�!C��x!��HmP�fei �2�[]�����v��8UwYE���_�O�������m��f���wP�P�������oX��
�����L���QTH����g�����|$�'��qb�Y���*�������/�1��K�Y����4rq=�R��J>:���k<�j�v���y��j�P���g ����� c���K��A3wW^�4j����ei,��]l����S+����*��S��R��Ie���<8���o�v����������s��'"���44!0��@��v1yx=vD2~�H�Z@����!���: ��������\����=��#{�X�R%�J���H�
�k$:��Ht(��$�B@���������]���>�Gy�e)U2�$��K���
w�D�����DT�����]������c ��v�V_-XP�@7��P��s�H���Y���h^Q!�bzN�Nu�D��w�Ui����+<:�RV	��f��i�#���{�����n��H�r���������/?l��zm~�.J
�����(e_a)���3��U�pf(v`������������X(T�-�-I%��L��M����/f��eqA�������:K��[�_��{�
�E+6^)�!���g�/�������f�6�9�����1�����'���p{[��+B|Q\�����]
�[!3�>���E�?Cm���u1G�
~a�����'�������4@���� �/j*�-���3=X�,93;0�rf z�n�qf(v`��by�hP�x�$�ppj`2q�6-���Z��eO: ��M]�>O�<,t�n�~DO0��uh*��h�����BX�*����1���9������8���f����p[U�����C��]��]
���fB=�������6N��i]��n��_X����*�	`$\��z5�h��=��EM���C=s�����������g�����Y(�$�-I%��L��M����/f��eqA�������:K��[���{�
�E+�_�C~��[+�W|�n���f��c���v��Y���f�kN4������m;r������p���^���-=!��p��������5v��l4���~T��l���d����\���h��I���4��Z�H�jN���������9[+���`��X�a��2�7��.����2Z	r�����k��~8�|;�q�����{
���:
���v�qQ:)�r|�p�$�	��t ��2
���m�Qt��j��������1!���\N�����(/l�;��fp�-o,md���*3�Pd2!U&�	)2a�L�L�a{��-�${3w��pL��M����	�W��7������Upp�����0���l\7I�e�<O"9��D�Wy�Lu��'������c�=�*��.�r�����(0�<=%'���v�)�0	�/��7<�|b9���d�����n7�DS�2�*#-�K9�jH���=����vR��TN*\��IekL����F�XZ%���4���bsk��.sZ�l��:e����ss7�o3�	N+�K���������x�`��0��
n~��� ���Iz����i��z��I
��<�N�c?\�
*�p�����AI��b������U��L�Ii`�I �#UX�����7�bIRk�/�1���Z�>*�����t�����"P�'���LY-��O0{L��''��������l0x}~��#1g��z=��>����+�����C����Dn�u�,
/��{p��L7�*w��RbWs�`����Y�M0����������#������Y����5��vv2@��6�u�M7K�q����x�����t���P����f�t�������:��c
parallel-contrib-v2-lo.patch.gzapplication/gzip; name=parallel-contrib-v2-lo.patch.gzDownload
parallel-contrib-v2-ltree.patch.gzapplication/gzip; name=parallel-contrib-v2-ltree.patch.gzDownload
parallel-contrib-v2-ltree_plpython.patch.gzapplication/gzip; name=parallel-contrib-v2-ltree_plpython.patch.gzDownload
parallel-contrib-v2-pageinspect.patch.gzapplication/gzip; name=parallel-contrib-v2-pageinspect.patch.gzDownload
parallel-contrib-v2-pg_buffercache.patch.gzapplication/gzip; name=parallel-contrib-v2-pg_buffercache.patch.gzDownload
parallel-contrib-v2-pgcrypto.patch.gzapplication/gzip; name=parallel-contrib-v2-pgcrypto.patch.gzDownload
parallel-contrib-v2-pg_freespacemap.patch.gzapplication/gzip; name=parallel-contrib-v2-pg_freespacemap.patch.gzDownload
parallel-contrib-v2-pg_prewarm.patch.gzapplication/gzip; name=parallel-contrib-v2-pg_prewarm.patch.gzDownload
��RWparallel-contrib-v2-pg_prewarm.patch��mO�0�_�������C��i�2����i5^ UN��iR���������msg���?_�0B�\5�$)���p0I�3M��
}`!�x����{�<Z7��~J�f�b`�f�VC����#������UN�A�����������
��������8<�}��R�:�1�]�i����������k��tS�#�7�,e{��0 �\]^���=�S�~@@~�����'1TP��H ��	6/C��O�;Pi�0`!�]g���sQ�G�mim.��M�����`�h��Y<��l6f�����Q�]�����f�lURd��x��N��I��xQ��A��|"�g�%y��@V&��)#Yb1�1<q
v��t�x |��Q����+�����H:���&3�@�8W�dTU<�s.Tv�:���yo}���
��fY{�Q"qV�����v�����/���%���S-1!��E��������� �~�7'��%�U�j���RwRJ���d����w��Rs���k��Z;D.���!��X�b���N���l�� �i��W$�<�4�hEc�V��$}x�5��X��i&^��S��J�UG��V�cD�N��m�S"���w����}�h����i����}���{�-����*���g���z��6%�-���O�z�+�g^�|���K��K��K�����K���x�%x�K^?�q��5���o�����u�������BmX�������uE2|^�c��8� ����B�c��u��"�����'��9�UviY��KC
�<b��d<�c�������H�/�x��i��_��6�
parallel-contrib-v2-pgrowlocks.patch.gzapplication/gzip; name=parallel-contrib-v2-pgrowlocks.patch.gzDownload
parallel-contrib-v2-pg_stat_statements.patch.gzapplication/gzip; name=parallel-contrib-v2-pg_stat_statements.patch.gzDownload
parallel-contrib-v2-pgstattuple.patch.gzapplication/gzip; name=parallel-contrib-v2-pgstattuple.patch.gzDownload
parallel-contrib-v2-pg_trgm.patch.gzapplication/gzip; name=parallel-contrib-v2-pg_trgm.patch.gzDownload
parallel-contrib-v2-pg_visibility.patch.gzapplication/gzip; name=parallel-contrib-v2-pg_visibility.patch.gzDownload
parallel-contrib-v2-postgres_fdw.patch.gzapplication/gzip; name=parallel-contrib-v2-postgres_fdw.patch.gzDownload
parallel-contrib-v2-seg.patch.gzapplication/gzip; name=parallel-contrib-v2-seg.patch.gzDownload
parallel-contrib-v2-spi.patch.gzapplication/gzip; name=parallel-contrib-v2-spi.patch.gzDownload
parallel-contrib-v2-sslinfo.patch.gzapplication/gzip; name=parallel-contrib-v2-sslinfo.patch.gzDownload
parallel-contrib-v2-tablefunc.patch.gzapplication/gzip; name=parallel-contrib-v2-tablefunc.patch.gzDownload
parallel-contrib-v2-tcn.patch.gzapplication/gzip; name=parallel-contrib-v2-tcn.patch.gzDownload
parallel-contrib-v2-tsearch2.patch.gzapplication/gzip; name=parallel-contrib-v2-tsearch2.patch.gzDownload
parallel-contrib-v2-tsm_system_rows.patch.gzapplication/gzip; name=parallel-contrib-v2-tsm_system_rows.patch.gzDownload
parallel-contrib-v2-tsm_system_time.patch.gzapplication/gzip; name=parallel-contrib-v2-tsm_system_time.patch.gzDownload
parallel-contrib-v2-unaccent.patch.gzapplication/gzip; name=parallel-contrib-v2-unaccent.patch.gzDownload
parallel-contrib-v2-uuid-ossp.patch.gzapplication/gzip; name=parallel-contrib-v2-uuid-ossp.patch.gzDownload
parallel-contrib-v2-xml2.patch.gzapplication/gzip; name=parallel-contrib-v2-xml2.patch.gzDownload
#36Robert Haas
robertmhaas@gmail.com
In reply to: Andreas Karlsson (#35)
Re: Parallel safety tagging of extension functions

On Fri, Jun 3, 2016 at 8:37 PM, Andreas Karlsson <andreas@proxel.se> wrote:

Here is the patch split into many small patches as you suggested. The
current patches are based on top of the patch which fixes the signatures for
gin and gist functions.

Generally, I think that there's no point in changing many of these
contrib modules in this way. There's no use that I can see, for
example, in running a parallel query using any of the adminpack
functions, so why mark them anything other than the default of
parallel-unsafe?

adminpack: Doesn't seem useful.
bloom: As you say, functions are never called directly, so there's no point.
btree_gin: As you say, functions are never called directly, so there's no point.
btree_gist: As you say, functions are never called directly, so
there's no point.
chkpass: Doesn't seem useful.
citext: Committed.
cube: I think we need a new extension version.
dblink: Isn't changing dblink_fdw_validator pointless? The others I get.
earthdistance: Committed.
file_fdw: As you say, functions are never called directly, so there's no point.
fuzzystrmatch: Committed.
hstore: Does not apply for me.
hstore_plperl: As you say, functions are never called directly, so
there's no point.
hstore_plpython: As you say, functions are never called directly, so
there's no point.
intagg: Committed.
intarray: Does not apply for me.
lo: Committed.

More later.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#37Andreas Karlsson
andreas@proxel.se
In reply to: Robert Haas (#36)
Re: Parallel safety tagging of extension functions

On 06/07/2016 05:44 PM, Robert Haas wrote:

cube: I think we need a new extension version.
hstore: Does not apply for me.
intarray: Does not apply for me.

Those three and ltree, pg_trgm, and seg depend on my patch with fixes
for the GiST/GIN function signatures in
/messages/by-id/574F091A.3050800@proxel.se. The
reason for the dependency is that I also mark the those functions with
changed signatures as parallel safe.

If that patch is not going to be applied I can easily fix those 6
patches to not depend on the function signature patch.

Sorry for not making this dependency clear.

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#38Andreas Karlsson
andreas@proxel.se
In reply to: Robert Haas (#36)
Re: Parallel safety tagging of extension functions

On 06/07/2016 05:44 PM, Robert Haas wrote:

adminpack: Doesn't seem useful.

The case I imagined was if someone would use these functions on the
result from a slow CTE and would want the CTE to be executed in
parallel. I have no idea if that is a realistic case, but I rarely use
adminpack in my own work.

chkpass: Doesn't seem useful.

Agreed.

dblink: Isn't changing dblink_fdw_validator pointless? The others I get.

Yeah, but since it is just one function I think it makes sense to change
it when we already are bumping the version of the extension. I think it
makes sense to skip whole extensions, like chkpass or bloom, but if it
is just a few functions where it does not matter, why not tag them as
safe? Personally I think the churn which really matters is if we have to
bump the extension version or not.

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#39Robert Haas
robertmhaas@gmail.com
In reply to: Andreas Karlsson (#38)
Re: Parallel safety tagging of extension functions

On Wed, Jun 8, 2016 at 9:24 AM, Andreas Karlsson <andreas@proxel.se> wrote:

dblink: Isn't changing dblink_fdw_validator pointless? The others I get.

Yeah, but since it is just one function I think it makes sense to change it
when we already are bumping the version of the extension. I think it makes
sense to skip whole extensions, like chkpass or bloom, but if it is just a
few functions where it does not matter, why not tag them as safe? Personally
I think the churn which really matters is if we have to bump the extension
version or not.

I broadly agree with that, but I'm slightly wary about giving people
the idea that parallel-safety will be checked in cases where it really
will not. The stuff that gets tested for parallel-safety is the stuff
actually mentioned in the query. Indirectly-referenced stuff will not
get tested, but if we start marking it that way, then we might create
confusion.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#40Robert Haas
robertmhaas@gmail.com
In reply to: Tom Lane (#7)
Re: Parallel safety tagging of extension functions

On Sat, May 21, 2016 at 11:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

On 5/20/16 7:37 PM, Robert Haas wrote:

I guess my first question is whether we have consensus on the release
into which we should put this. Some people (Noah, among others)
thought it should wait because we're after feature freeze, while
others thought we should do it now. If we're going to try to get this
into 9.6, I'll work on reviewing this sooner rather than later, but if
we're not going to do that I'm going to postpone dealing with it until
after we branch.

Sounds to me that this is part of the cleanup of a 9.6 feature and
should be in that release.

Yes, let's fix it. This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

Tom, there's a patch for this at
/messages/by-id/574F091A.3050800@proxel.se which
I think you should review, since you were the one who made the tweaks
involved. Any chance you can do that RSN? If we want to get this
done at all, we should really get it into beta2. Also, the patches
Andreas posted for applying parallel-safety markings apply on top of
that, so that needs to go in first, at least for the affected modules.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#41Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#40)
Re: Parallel safety tagging of extension functions

Robert Haas <robertmhaas@gmail.com> writes:

On Sat, May 21, 2016 at 11:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Yes, let's fix it. This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

Tom, there's a patch for this at
/messages/by-id/574F091A.3050800@proxel.se which
I think you should review, since you were the one who made the tweaks
involved. Any chance you can do that RSN? If we want to get this
done at all, we should really get it into beta2. Also, the patches
Andreas posted for applying parallel-safety markings apply on top of
that, so that needs to go in first, at least for the affected modules.

OK, I'll take it. You're done with Andreas' patches otherwise?

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#42Robert Haas
robertmhaas@gmail.com
In reply to: Tom Lane (#41)
Re: Parallel safety tagging of extension functions

On Thu, Jun 9, 2016 at 1:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert Haas <robertmhaas@gmail.com> writes:

On Sat, May 21, 2016 at 11:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Yes, let's fix it. This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

Tom, there's a patch for this at
/messages/by-id/574F091A.3050800@proxel.se which
I think you should review, since you were the one who made the tweaks
involved. Any chance you can do that RSN? If we want to get this
done at all, we should really get it into beta2. Also, the patches
Andreas posted for applying parallel-safety markings apply on top of
that, so that needs to go in first, at least for the affected modules.

OK, I'll take it. You're done with Andreas' patches otherwise?

No. I can go through the unaffected ones in the meantime, though, and
then come back to the affected ones after you deal with this.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#43Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#40)
Re: Parallel safety tagging of extension functions

Robert Haas <robertmhaas@gmail.com> writes:

On Sat, May 21, 2016 at 11:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Yes, let's fix it. This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

Tom, there's a patch for this at
/messages/by-id/574F091A.3050800@proxel.se which
I think you should review, since you were the one who made the tweaks
involved. Any chance you can do that RSN?

I've pushed this with some revisions to make the queries more
search-path-safe. I'm not too happy with the safety of the queries
I see already present from the previous patches. I think stuff
like this:

UPDATE pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::regprocedure;

needs to be more like

UPDATE pg_catalog.pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::pg_catalog.regprocedure;

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#44Robert Haas
robertmhaas@gmail.com
In reply to: Tom Lane (#43)
Re: Parallel safety tagging of extension functions

On Thu, Jun 9, 2016 at 4:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert Haas <robertmhaas@gmail.com> writes:

On Sat, May 21, 2016 at 11:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Yes, let's fix it. This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

Tom, there's a patch for this at
/messages/by-id/574F091A.3050800@proxel.se which
I think you should review, since you were the one who made the tweaks
involved. Any chance you can do that RSN?

I've pushed this with some revisions to make the queries more
search-path-safe. I'm not too happy with the safety of the queries
I see already present from the previous patches. I think stuff
like this:

UPDATE pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::regprocedure;

needs to be more like

UPDATE pg_catalog.pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::pg_catalog.regprocedure;

We could do that, but there's no guarantee that "min" or "citext"
resolve correctly either, is there? Basically, the search-path-safety
of many of the scripts already in contrib looks pretty horrendous to
me. For example:

CREATE VIEW pg_buffercache AS
SELECT P.* FROM pg_buffercache_pages() AS P
(bufferid integer, relfilenode oid, reltablespace oid, reldatabase oid,
relforknumber int2, relblocknumber int8, isdirty bool, usagecount int2,
pinning_backends int4);

Well, what guarantee have we that we'll get the right
pg_buffercache_pages() function?

CREATE FUNCTION earth() RETURNS float8
LANGUAGE SQL IMMUTABLE PARALLEL SAFE
AS 'SELECT ''6378168''::float8';

What guarantees we'll get the correct float8 type?

CREATE FUNCTION sec_to_gc(float8)
RETURNS float8
LANGUAGE SQL
IMMUTABLE STRICT
PARALLEL SAFE
AS 'SELECT CASE WHEN $1 < 0 THEN 0::float8 WHEN $1/(2*earth()) > 1
THEN pi()*earth() ELSE 2*earth()*asin($1/(2*earth())) END';

Don't even get me started.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#45Andres Freund
andres@anarazel.de
In reply to: Robert Haas (#44)
Re: Parallel safety tagging of extension functions

On 2016-06-09 17:40:24 -0400, Robert Haas wrote:

On Thu, Jun 9, 2016 at 4:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert Haas <robertmhaas@gmail.com> writes:

On Sat, May 21, 2016 at 11:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Yes, let's fix it. This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

Tom, there's a patch for this at
/messages/by-id/574F091A.3050800@proxel.se which
I think you should review, since you were the one who made the tweaks
involved. Any chance you can do that RSN?

I've pushed this with some revisions to make the queries more
search-path-safe. I'm not too happy with the safety of the queries
I see already present from the previous patches. I think stuff
like this:

UPDATE pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::regprocedure;

needs to be more like

UPDATE pg_catalog.pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::pg_catalog.regprocedure;

We could do that, but there's no guarantee that "min" or "citext"
resolve correctly either, is there? Basically, the search-path-safety
of many of the scripts already in contrib looks pretty horrendous to
me. For example:

CREATE VIEW pg_buffercache AS
SELECT P.* FROM pg_buffercache_pages() AS P
(bufferid integer, relfilenode oid, reltablespace oid, reldatabase oid,
relforknumber int2, relblocknumber int8, isdirty bool, usagecount int2,
pinning_backends int4);

Well, what guarantee have we that we'll get the right
pg_buffercache_pages() function?

Aren't both of the above guaranteed due to
/*
* Set up the search path to contain the target schema, then the schemas
* of any prerequisite extensions, and nothing else. In particular this
* makes the target schema be the default creation target namespace.
*
* Note: it might look tempting to use PushOverrideSearchPath for this,
* but we cannot do that. We have to actually set the search_path GUC in
* case the extension script examines or changes it. In any case, the
* GUC_ACTION_SAVE method is just as convenient.
*/
initStringInfo(&pathbuf);
appendStringInfoString(&pathbuf, quote_identifier(schemaName));
foreach(lc, requiredSchemas)
{
Oid reqschema = lfirst_oid(lc);
char *reqname = get_namespace_name(reqschema);

if (reqname)
appendStringInfo(&pathbuf, ", %s", quote_identifier(reqname));
}

(void) set_config_option("search_path", pathbuf.data,
PGC_USERSET, PGC_S_SESSION,
GUC_ACTION_SAVE, true, 0, false);
in extension.c:execute_extension_script()?

CREATE FUNCTION earth() RETURNS float8
LANGUAGE SQL IMMUTABLE PARALLEL SAFE
AS 'SELECT ''6378168''::float8';

What guarantees we'll get the correct float8 type?

CREATE FUNCTION sec_to_gc(float8)
RETURNS float8
LANGUAGE SQL
IMMUTABLE STRICT
PARALLEL SAFE
AS 'SELECT CASE WHEN $1 < 0 THEN 0::float8 WHEN $1/(2*earth()) > 1
THEN pi()*earth() ELSE 2*earth()*asin($1/(2*earth())) END';

These aren't though.

Andres

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#46Robert Haas
robertmhaas@gmail.com
In reply to: Robert Haas (#36)
Re: Parallel safety tagging of extension functions

On Tue, Jun 7, 2016 at 11:44 AM, Robert Haas <robertmhaas@gmail.com> wrote:

More later.

ltree: Skipped per your other email.
ltree_plpython: No point.
pageinspect: Committed.
pg_buffercache: Committed.
pgcrypto: Committed.
pg_freespacemap: Committed.
pg_prewarm: Committed.
pgrowlocks: Committed.

Still more to go.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#47Robert Haas
robertmhaas@gmail.com
In reply to: Andres Freund (#45)
Re: Parallel safety tagging of extension functions

On Thu, Jun 9, 2016 at 5:45 PM, Andres Freund <andres@anarazel.de> wrote:

On 2016-06-09 17:40:24 -0400, Robert Haas wrote:

On Thu, Jun 9, 2016 at 4:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert Haas <robertmhaas@gmail.com> writes:

On Sat, May 21, 2016 at 11:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Yes, let's fix it. This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

Tom, there's a patch for this at
/messages/by-id/574F091A.3050800@proxel.se which
I think you should review, since you were the one who made the tweaks
involved. Any chance you can do that RSN?

I've pushed this with some revisions to make the queries more
search-path-safe. I'm not too happy with the safety of the queries
I see already present from the previous patches. I think stuff
like this:

UPDATE pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::regprocedure;

needs to be more like

UPDATE pg_catalog.pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::pg_catalog.regprocedure;

We could do that, but there's no guarantee that "min" or "citext"
resolve correctly either, is there? Basically, the search-path-safety
of many of the scripts already in contrib looks pretty horrendous to
me. For example:

CREATE VIEW pg_buffercache AS
SELECT P.* FROM pg_buffercache_pages() AS P
(bufferid integer, relfilenode oid, reltablespace oid, reldatabase oid,
relforknumber int2, relblocknumber int8, isdirty bool, usagecount int2,
pinning_backends int4);

Well, what guarantee have we that we'll get the right
pg_buffercache_pages() function?

Aren't both of the above guaranteed due to
/*
* Set up the search path to contain the target schema, then the schemas
* of any prerequisite extensions, and nothing else. In particular this
* makes the target schema be the default creation target namespace.
*
* Note: it might look tempting to use PushOverrideSearchPath for this,
* but we cannot do that. We have to actually set the search_path GUC in
* case the extension script examines or changes it. In any case, the
* GUC_ACTION_SAVE method is just as convenient.
*/
initStringInfo(&pathbuf);
appendStringInfoString(&pathbuf, quote_identifier(schemaName));
foreach(lc, requiredSchemas)
{
Oid reqschema = lfirst_oid(lc);
char *reqname = get_namespace_name(reqschema);

if (reqname)
appendStringInfo(&pathbuf, ", %s", quote_identifier(reqname));
}

(void) set_config_option("search_path", pathbuf.data,
PGC_USERSET, PGC_S_SESSION,
GUC_ACTION_SAVE, true, 0, false);
in extension.c:execute_extension_script()?

Hmm. Yeah, that helps.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#48Andreas Karlsson
andreas@proxel.se
In reply to: Tom Lane (#43)
2 attachment(s)
Re: Parallel safety tagging of extension functions

On 06/09/2016 10:48 PM, Tom Lane wrote:

Robert Haas <robertmhaas@gmail.com> writes:

On Sat, May 21, 2016 at 11:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Yes, let's fix it. This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

Tom, there's a patch for this at
/messages/by-id/574F091A.3050800@proxel.se which
I think you should review, since you were the one who made the tweaks
involved. Any chance you can do that RSN?

I've pushed this with some revisions to make the queries more
search-path-safe. I'm not too happy with the safety of the queries
I see already present from the previous patches. I think stuff
like this:

UPDATE pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::regprocedure;

needs to be more like

UPDATE pg_catalog.pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::pg_catalog.regprocedure;

Good point. While I believe that we can trust that ALTER EXTENSION
handles the search path for the functions of the extension we should
qualify things in pg_catalog.

I have attached a patch which adds the shcema, plus an updated patch for
tseach2.

Andreas

Attachments:

parallel-contrib-v3-tsearch2.patch.gzapplication/gzip; name=parallel-contrib-v3-tsearch2.patch.gzDownload
parallel-contrib-qualify-casts.patchtext/x-patch; name=parallel-contrib-qualify-casts.patchDownload
diff --git a/contrib/citext/citext--1.1--1.2.sql b/contrib/citext/citext--1.1--1.2.sql
index 60dd15b..4f0e4bc 100644
--- a/contrib/citext/citext--1.1--1.2.sql
+++ b/contrib/citext/citext--1.1--1.2.sql
@@ -42,13 +42,13 @@ ALTER FUNCTION split_part(citext, citext, int) PARALLEL SAFE;
 ALTER FUNCTION translate(citext, citext, text) PARALLEL SAFE;
 
 UPDATE pg_proc SET proparallel = 's'
-WHERE oid = 'min(citext)'::regprocedure;
+WHERE oid = 'min(citext)'::pg_catalog.regprocedure;
 
 UPDATE pg_proc SET proparallel = 's'
-WHERE oid = 'max(citext)'::regprocedure;
+WHERE oid = 'max(citext)'::pg_catalog.regprocedure;
 
 UPDATE pg_aggregate SET aggcombinefn = 'citext_smaller'
-WHERE aggfnoid = 'max(citext)'::regprocedure;
+WHERE aggfnoid = 'max(citext)'::pg_catalog.regprocedure;
 
 UPDATE pg_aggregate SET aggcombinefn = 'citext_larger'
-WHERE aggfnoid = 'max(citext)'::regprocedure;
+WHERE aggfnoid = 'max(citext)'::pg_catalog.regprocedure;
diff --git a/contrib/intagg/intagg--1.0--1.1.sql b/contrib/intagg/intagg--1.0--1.1.sql
index 2ec95b6..b2a2820 100644
--- a/contrib/intagg/intagg--1.0--1.1.sql
+++ b/contrib/intagg/intagg--1.0--1.1.sql
@@ -8,4 +8,4 @@ ALTER FUNCTION int_agg_final_array(internal) PARALLEL SAFE;
 ALTER FUNCTION int_array_enum(int4[]) PARALLEL SAFE;
 
 UPDATE pg_proc SET proparallel = 's'
-WHERE oid = 'int_array_aggregate(int4)'::regprocedure;
+WHERE oid = 'int_array_aggregate(int4)'::pg_catalog.regprocedure;
#49Andreas Karlsson
andreas@proxel.se
In reply to: Andreas Karlsson (#48)
2 attachment(s)
Re: Parallel safety tagging of extension functions

On 06/10/2016 01:44 PM, Andreas Karlsson wrote:

I have attached a patch which adds the shcema, plus an updated patch for
tseach2.

Forgot adding schema to the tables. Here are new versions.

Andreas

Attachments:

parallel-contrib-v4-tsearch2.patch.gzapplication/gzip; name=parallel-contrib-v4-tsearch2.patch.gzDownload
diff --git a/contrib/tsearch2/Makefile b/contrib/tsearch2/Makefile
index 36dcedc..a697191 100644
--- a/contrib/tsearch2/Makefile
+++ b/contrib/tsearch2/Makefile
@@ -3,7 +3,7 @@
 MODULES = tsearch2
 
 EXTENSION = tsearch2
-DATA = tsearch2--1.0.sql tsearch2--unpackaged--1.0.sql
+DATA = tsearch2--1.1.sql tsearch2--1.0--1.1.sql tsearch2--unpackaged--1.0.sql
 PGFILEDESC = "tsearch2 - backward-compatible text search functionality"
 
 REGRESS = tsearch2
diff --git a/contrib/tsearch2/tsearch2--1.0--1.1.sql b/contrib/tsearch2/tsearch2--1.0--1.1.sql
new file mode 100644
index 0000000..1eb8c83
--- /dev/null
+++ b/contrib/tsearch2/tsearch2--1.0--1.1.sql
@@ -0,0 +1,87 @@
+/* contrib/tsearch2/tsearch2--1.0--1.1.sql */
+
+-- complain if script is sourced in psql, rather than via ALTER EXTENSION
+\echo Use "ALTER EXTENSION tsearch2 UPDATE TO '1.1'" to load this file. \quit
+
+ALTER FUNCTION lexize(oid, text) PARALLEL SAFE;
+ALTER FUNCTION lexize(text, text) PARALLEL SAFE;
+ALTER FUNCTION lexize(text) PARALLEL RESTRICTED;
+ALTER FUNCTION set_curdict(int) PARALLEL RESTRICTED;
+ALTER FUNCTION set_curdict(text) PARALLEL RESTRICTED;
+ALTER FUNCTION dex_init(internal) PARALLEL SAFE;
+ALTER FUNCTION dex_lexize(internal, internal, int4) PARALLEL SAFE;
+ALTER FUNCTION snb_en_init(internal) PARALLEL SAFE;
+ALTER FUNCTION snb_lexize(internal, internal, int4) PARALLEL SAFE;
+ALTER FUNCTION snb_ru_init_koi8(internal) PARALLEL SAFE;
+ALTER FUNCTION snb_ru_init_utf8(internal) PARALLEL SAFE;
+ALTER FUNCTION snb_ru_init(internal) PARALLEL SAFE;
+ALTER FUNCTION spell_init(internal) PARALLEL SAFE;
+ALTER FUNCTION spell_lexize(internal, internal, int4) PARALLEL SAFE;
+ALTER FUNCTION syn_init(internal) PARALLEL SAFE;
+ALTER FUNCTION syn_lexize(internal, internal, int4) PARALLEL SAFE;
+ALTER FUNCTION thesaurus_init(internal) PARALLEL SAFE;
+ALTER FUNCTION thesaurus_lexize(internal, internal, int4, internal) PARALLEL SAFE;
+ALTER FUNCTION token_type(int4) PARALLEL SAFE;
+ALTER FUNCTION token_type(text) PARALLEL SAFE;
+ALTER FUNCTION token_type() PARALLEL RESTRICTED;
+ALTER FUNCTION set_curprs(int) PARALLEL RESTRICTED;
+ALTER FUNCTION set_curprs(text) PARALLEL RESTRICTED;
+ALTER FUNCTION parse(oid, text) PARALLEL SAFE;
+ALTER FUNCTION parse(text, text) PARALLEL SAFE;
+ALTER FUNCTION parse(text) PARALLEL RESTRICTED;
+ALTER FUNCTION prsd_start(internal, int4) PARALLEL SAFE;
+ALTER FUNCTION prsd_getlexeme(internal, internal, internal) PARALLEL SAFE;
+ALTER FUNCTION prsd_end(internal) PARALLEL SAFE;
+ALTER FUNCTION prsd_lextype(internal) PARALLEL SAFE;
+ALTER FUNCTION prsd_headline(internal, internal, internal) PARALLEL SAFE;
+ALTER FUNCTION set_curcfg(int) PARALLEL RESTRICTED;
+ALTER FUNCTION set_curcfg(text) PARALLEL RESTRICTED;
+ALTER FUNCTION show_curcfg() PARALLEL SAFE;
+ALTER FUNCTION length(tsvector) PARALLEL SAFE;
+ALTER FUNCTION to_tsvector(oid, text) PARALLEL SAFE;
+ALTER FUNCTION to_tsvector(text, text) PARALLEL SAFE;
+ALTER FUNCTION to_tsvector(text) PARALLEL SAFE;
+ALTER FUNCTION strip(tsvector) PARALLEL SAFE;
+ALTER FUNCTION setweight(tsvector, "char") PARALLEL SAFE;
+ALTER FUNCTION concat(tsvector, tsvector) PARALLEL SAFE;
+ALTER FUNCTION querytree(tsquery) PARALLEL SAFE;
+ALTER FUNCTION to_tsquery(oid, text) PARALLEL SAFE;
+ALTER FUNCTION to_tsquery(text, text) PARALLEL SAFE;
+ALTER FUNCTION to_tsquery(text) PARALLEL SAFE;
+ALTER FUNCTION plainto_tsquery(oid, text) PARALLEL SAFE;
+ALTER FUNCTION plainto_tsquery(text, text) PARALLEL SAFE;
+ALTER FUNCTION plainto_tsquery(text) PARALLEL SAFE;
+ALTER FUNCTION tsearch2() PARALLEL SAFE;
+ALTER FUNCTION rank(float4[], tsvector, tsquery) PARALLEL SAFE;
+ALTER FUNCTION rank(float4[], tsvector, tsquery, int4) PARALLEL SAFE;
+ALTER FUNCTION rank(tsvector, tsquery) PARALLEL SAFE;
+ALTER FUNCTION rank(tsvector, tsquery, int4) PARALLEL SAFE;
+ALTER FUNCTION rank_cd(float4[], tsvector, tsquery) PARALLEL SAFE;
+ALTER FUNCTION rank_cd(float4[], tsvector, tsquery, int4) PARALLEL SAFE;
+ALTER FUNCTION rank_cd(tsvector, tsquery) PARALLEL SAFE;
+ALTER FUNCTION rank_cd(tsvector, tsquery, int4) PARALLEL SAFE;
+ALTER FUNCTION headline(oid, text, tsquery, text) PARALLEL SAFE;
+ALTER FUNCTION headline(oid, text, tsquery) PARALLEL SAFE;
+ALTER FUNCTION headline(text, text, tsquery, text) PARALLEL SAFE;
+ALTER FUNCTION headline(text, text, tsquery) PARALLEL SAFE;
+ALTER FUNCTION headline(text, tsquery, text) PARALLEL SAFE;
+ALTER FUNCTION headline(text, tsquery) PARALLEL SAFE;
+ALTER FUNCTION stat(text) PARALLEL SAFE;
+ALTER FUNCTION stat(text, text) PARALLEL SAFE;
+ALTER FUNCTION reset_tsearch() PARALLEL SAFE;
+ALTER FUNCTION get_covers(tsvector, tsquery) PARALLEL SAFE;
+ALTER FUNCTION _get_parser_from_curcfg() PARALLEL SAFE;
+ALTER FUNCTION ts_debug(text) PARALLEL RESTRICTED;
+ALTER FUNCTION numnode(tsquery) PARALLEL SAFE;
+ALTER FUNCTION tsquery_and(tsquery, tsquery) PARALLEL SAFE;
+ALTER FUNCTION tsquery_or(tsquery, tsquery) PARALLEL SAFE;
+ALTER FUNCTION tsquery_not(tsquery) PARALLEL SAFE;
+ALTER FUNCTION rewrite(tsquery, text) PARALLEL SAFE;
+ALTER FUNCTION rewrite(tsquery, tsquery, tsquery) PARALLEL SAFE;
+ALTER FUNCTION rewrite_accum(tsquery, tsquery[]) PARALLEL SAFE;
+ALTER FUNCTION rewrite_finish(tsquery) PARALLEL SAFE;
+ALTER FUNCTION tsq_mcontains(tsquery, tsquery) PARALLEL SAFE;
+ALTER FUNCTION tsq_mcontained(tsquery, tsquery) PARALLEL SAFE;
+
+UPDATE pg_catalog.pg_proc SET proparallel = 's'
+WHERE oid = 'rewrite(tsquery[])'::pg_catalog.regprocedure;
diff --git a/contrib/tsearch2/tsearch2--1.0.sql b/contrib/tsearch2/tsearch2--1.0.sql
deleted file mode 100644
index a32c5fe..0000000
--- a/contrib/tsearch2/tsearch2--1.0.sql
+++ /dev/null
@@ -1,576 +0,0 @@
-/* contrib/tsearch2/tsearch2--1.0.sql */
-
--- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "CREATE EXTENSION tsearch2" to load this file. \quit
-
--- These domains are just to catch schema-qualified references to the
--- old data types.
-CREATE DOMAIN tsvector AS pg_catalog.tsvector;
-CREATE DOMAIN tsquery AS pg_catalog.tsquery;
-CREATE DOMAIN gtsvector AS pg_catalog.gtsvector;
-CREATE DOMAIN gtsq AS pg_catalog.text;
-
---dict interface
-CREATE FUNCTION lexize(oid, text)
-	RETURNS _text
-	as 'ts_lexize'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION lexize(text, text)
-        RETURNS _text
-        as 'MODULE_PATHNAME', 'tsa_lexize_byname'
-        LANGUAGE C
-        RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION lexize(text)
-        RETURNS _text
-        as 'MODULE_PATHNAME', 'tsa_lexize_bycurrent'
-        LANGUAGE C
-        RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION set_curdict(int)
-	RETURNS void
-	as 'MODULE_PATHNAME', 'tsa_set_curdict'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION set_curdict(text)
-	RETURNS void
-	as 'MODULE_PATHNAME', 'tsa_set_curdict_byname'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
---built-in dictionaries
-CREATE FUNCTION dex_init(internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_dex_init'
-	LANGUAGE C;
-
-CREATE FUNCTION dex_lexize(internal,internal,int4)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_dex_lexize'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION snb_en_init(internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_snb_en_init'
-	LANGUAGE C;
-
-CREATE FUNCTION snb_lexize(internal,internal,int4)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_snb_lexize'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION snb_ru_init_koi8(internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_snb_ru_init_koi8'
-	LANGUAGE C;
-
-CREATE FUNCTION snb_ru_init_utf8(internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_snb_ru_init_utf8'
-	LANGUAGE C;
-
-CREATE FUNCTION snb_ru_init(internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_snb_ru_init'
-	LANGUAGE C;
-
-CREATE FUNCTION spell_init(internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_spell_init'
-	LANGUAGE C;
-
-CREATE FUNCTION spell_lexize(internal,internal,int4)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_spell_lexize'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION syn_init(internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_syn_init'
-	LANGUAGE C;
-
-CREATE FUNCTION syn_lexize(internal,internal,int4)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_syn_lexize'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION thesaurus_init(internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_thesaurus_init'
-	LANGUAGE C;
-
-CREATE FUNCTION thesaurus_lexize(internal,internal,int4,internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_thesaurus_lexize'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
---sql-level interface
-CREATE TYPE tokentype
-	as (tokid int4, alias text, descr text);
-
-CREATE FUNCTION token_type(int4)
-	RETURNS setof tokentype
-	as 'ts_token_type_byid'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT
-        ROWS 16;
-
-CREATE FUNCTION token_type(text)
-	RETURNS setof tokentype
-	as 'ts_token_type_byname'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT
-        ROWS 16;
-
-CREATE FUNCTION token_type()
-	RETURNS setof tokentype
-	as 'MODULE_PATHNAME', 'tsa_token_type_current'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT
-        ROWS 16;
-
-CREATE FUNCTION set_curprs(int)
-	RETURNS void
-	as 'MODULE_PATHNAME', 'tsa_set_curprs'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION set_curprs(text)
-	RETURNS void
-	as 'MODULE_PATHNAME', 'tsa_set_curprs_byname'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
-CREATE TYPE tokenout
-	as (tokid int4, token text);
-
-CREATE FUNCTION parse(oid,text)
-	RETURNS setof tokenout
-	as 'ts_parse_byid'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION parse(text,text)
-	RETURNS setof tokenout
-	as 'ts_parse_byname'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION parse(text)
-	RETURNS setof tokenout
-	as 'MODULE_PATHNAME', 'tsa_parse_current'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
---default parser
-CREATE FUNCTION prsd_start(internal,int4)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_prsd_start'
-	LANGUAGE C;
-
-CREATE FUNCTION prsd_getlexeme(internal,internal,internal)
-	RETURNS int4
-	as 'MODULE_PATHNAME', 'tsa_prsd_getlexeme'
-	LANGUAGE C;
-
-CREATE FUNCTION prsd_end(internal)
-	RETURNS void
-	as 'MODULE_PATHNAME', 'tsa_prsd_end'
-	LANGUAGE C;
-
-CREATE FUNCTION prsd_lextype(internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_prsd_lextype'
-	LANGUAGE C;
-
-CREATE FUNCTION prsd_headline(internal,internal,internal)
-	RETURNS internal
-	as 'MODULE_PATHNAME', 'tsa_prsd_headline'
-	LANGUAGE C;
-
---tsearch config
-CREATE FUNCTION set_curcfg(int)
-	RETURNS void
-	as 'MODULE_PATHNAME', 'tsa_set_curcfg'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION set_curcfg(text)
-	RETURNS void
-	as 'MODULE_PATHNAME', 'tsa_set_curcfg_byname'
-	LANGUAGE C
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION show_curcfg()
-	RETURNS oid
-	AS 'get_current_ts_config'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT STABLE;
-
-CREATE FUNCTION length(tsvector)
-	RETURNS int4
-	AS 'tsvector_length'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION to_tsvector(oid, text)
-	RETURNS tsvector
-	AS 'to_tsvector_byid'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION to_tsvector(text, text)
-	RETURNS tsvector
-	AS 'MODULE_PATHNAME', 'tsa_to_tsvector_name'
-	LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION to_tsvector(text)
-	RETURNS tsvector
-	AS 'to_tsvector'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION strip(tsvector)
-	RETURNS tsvector
-	AS 'tsvector_strip'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION setweight(tsvector,"char")
-	RETURNS tsvector
-	AS 'tsvector_setweight'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION concat(tsvector,tsvector)
-	RETURNS tsvector
-	AS 'tsvector_concat'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION querytree(tsquery)
-	RETURNS text
-	AS 'tsquerytree'
-	LANGUAGE INTERNAL RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION to_tsquery(oid, text)
-	RETURNS tsquery
-	AS 'to_tsquery_byid'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION to_tsquery(text, text)
-	RETURNS tsquery
-	AS 'MODULE_PATHNAME','tsa_to_tsquery_name'
-	LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION to_tsquery(text)
-	RETURNS tsquery
-	AS 'to_tsquery'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION plainto_tsquery(oid, text)
-	RETURNS tsquery
-	AS 'plainto_tsquery_byid'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION plainto_tsquery(text, text)
-	RETURNS tsquery
-	AS 'MODULE_PATHNAME','tsa_plainto_tsquery_name'
-	LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION plainto_tsquery(text)
-	RETURNS tsquery
-	AS 'plainto_tsquery'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT IMMUTABLE;
-
---Trigger
-CREATE FUNCTION tsearch2()
-	RETURNS trigger
-	AS 'MODULE_PATHNAME', 'tsa_tsearch2'
-	LANGUAGE C;
-
---Relevation
-CREATE FUNCTION rank(float4[], tsvector, tsquery)
-	RETURNS float4
-	AS 'ts_rank_wtt'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION rank(float4[], tsvector, tsquery, int4)
-	RETURNS float4
-	AS 'ts_rank_wttf'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION rank(tsvector, tsquery)
-	RETURNS float4
-	AS 'ts_rank_tt'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION rank(tsvector, tsquery, int4)
-	RETURNS float4
-	AS 'ts_rank_ttf'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION rank_cd(float4[], tsvector, tsquery)
-        RETURNS float4
-	AS 'ts_rankcd_wtt'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION rank_cd(float4[], tsvector, tsquery, int4)
-	RETURNS float4
-	AS 'ts_rankcd_wttf'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION rank_cd(tsvector, tsquery)
-	RETURNS float4
-	AS 'ts_rankcd_tt'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION rank_cd(tsvector, tsquery, int4)
-	RETURNS float4
-	AS 'ts_rankcd_ttf'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION headline(oid, text, tsquery, text)
-	RETURNS text
-	AS 'ts_headline_byid_opt'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION headline(oid, text, tsquery)
-	RETURNS text
-	AS 'ts_headline_byid'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION headline(text, text, tsquery, text)
-	RETURNS text
-	AS 'MODULE_PATHNAME', 'tsa_headline_byname'
-	LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION headline(text, text, tsquery)
-	RETURNS text
-	AS 'MODULE_PATHNAME', 'tsa_headline_byname'
-	LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION headline(text, tsquery, text)
-	RETURNS text
-	AS 'ts_headline_opt'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION headline(text, tsquery)
-	RETURNS text
-	AS 'ts_headline'
-	LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
--- CREATE the OPERATOR class
-CREATE OPERATOR CLASS gist_tsvector_ops
-FOR TYPE tsvector USING gist
-AS
-        OPERATOR        1       @@ (tsvector, tsquery),
-        FUNCTION        1       gtsvector_consistent (internal, tsvector, smallint, oid, internal),
-        FUNCTION        2       gtsvector_union (internal, internal),
-        FUNCTION        3       gtsvector_compress (internal),
-        FUNCTION        4       gtsvector_decompress (internal),
-        FUNCTION        5       gtsvector_penalty (internal, internal, internal),
-        FUNCTION        6       gtsvector_picksplit (internal, internal),
-        FUNCTION        7       gtsvector_same (gtsvector, gtsvector, internal),
-        STORAGE         gtsvector;
-
---stat info
-CREATE TYPE statinfo
-	as (word text, ndoc int4, nentry int4);
-
-CREATE FUNCTION stat(text)
-	RETURNS setof statinfo
-	as 'ts_stat1'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION stat(text,text)
-	RETURNS setof statinfo
-	as 'ts_stat2'
-	LANGUAGE INTERNAL
-	RETURNS NULL ON NULL INPUT;
-
---reset - just for debuging
-CREATE FUNCTION reset_tsearch()
-        RETURNS void
-        as 'MODULE_PATHNAME', 'tsa_reset_tsearch'
-        LANGUAGE C
-        RETURNS NULL ON NULL INPUT;
-
---get cover (debug for rank_cd)
-CREATE FUNCTION get_covers(tsvector,tsquery)
-        RETURNS text
-        as 'MODULE_PATHNAME', 'tsa_get_covers'
-        LANGUAGE C
-        RETURNS NULL ON NULL INPUT;
-
---debug function
-create type tsdebug as (
-        ts_name text,
-        tok_type text,
-        description text,
-        token   text,
-        dict_name text[],
-        "tsvector" tsvector
-);
-
-CREATE FUNCTION _get_parser_from_curcfg()
-RETURNS text as
-$$select prsname::text from pg_catalog.pg_ts_parser p join pg_ts_config c on cfgparser = p.oid where c.oid = show_curcfg();$$
-LANGUAGE SQL RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION ts_debug(text)
-RETURNS setof tsdebug as $$
-select
-        (select c.cfgname::text from pg_catalog.pg_ts_config as c
-         where c.oid = show_curcfg()),
-        t.alias as tok_type,
-        t.descr as description,
-        p.token,
-        ARRAY ( SELECT m.mapdict::pg_catalog.regdictionary::pg_catalog.text
-                FROM pg_catalog.pg_ts_config_map AS m
-                WHERE m.mapcfg = show_curcfg() AND m.maptokentype = p.tokid
-                ORDER BY m.mapseqno )
-        AS dict_name,
-        strip(to_tsvector(p.token)) as tsvector
-from
-        parse( _get_parser_from_curcfg(), $1 ) as p,
-        token_type() as t
-where
-        t.tokid = p.tokid
-$$ LANGUAGE SQL RETURNS NULL ON NULL INPUT;
-
-CREATE FUNCTION numnode(tsquery)
-        RETURNS int4
-        as 'tsquery_numnode'
-        LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION tsquery_and(tsquery,tsquery)
-        RETURNS tsquery
-        as 'tsquery_and'
-        LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION tsquery_or(tsquery,tsquery)
-        RETURNS tsquery
-        as 'tsquery_or'
-        LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION tsquery_not(tsquery)
-        RETURNS tsquery
-        as 'tsquery_not'
-        LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
---------------rewrite subsystem
-
-CREATE FUNCTION rewrite(tsquery, text)
-        RETURNS tsquery
-        as 'tsquery_rewrite_query'
-        LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION rewrite(tsquery, tsquery, tsquery)
-        RETURNS tsquery
-        as 'tsquery_rewrite'
-        LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION rewrite_accum(tsquery,tsquery[])
-        RETURNS tsquery
-        AS 'MODULE_PATHNAME', 'tsa_rewrite_accum'
-        LANGUAGE C;
-
-CREATE FUNCTION rewrite_finish(tsquery)
-      RETURNS tsquery
-      as 'MODULE_PATHNAME', 'tsa_rewrite_finish'
-      LANGUAGE C;
-
-CREATE AGGREGATE rewrite (
-      BASETYPE = tsquery[],
-      SFUNC = rewrite_accum,
-      STYPE = tsquery,
-      FINALFUNC = rewrite_finish
-);
-
-CREATE FUNCTION tsq_mcontains(tsquery, tsquery)
-        RETURNS bool
-        as 'tsq_mcontains'
-        LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE FUNCTION tsq_mcontained(tsquery, tsquery)
-        RETURNS bool
-        as 'tsq_mcontained'
-        LANGUAGE INTERNAL
-        RETURNS NULL ON NULL INPUT IMMUTABLE;
-
-CREATE OPERATOR CLASS gist_tp_tsquery_ops
-FOR TYPE tsquery USING gist
-AS
-        OPERATOR        7       @> (tsquery, tsquery),
-        OPERATOR        8       <@ (tsquery, tsquery),
-        FUNCTION        1       gtsquery_consistent (internal, tsquery, smallint, oid, internal),
-        FUNCTION        2       gtsquery_union (internal, internal),
-        FUNCTION        3       gtsquery_compress (internal),
-        FUNCTION        4       gtsquery_decompress (internal),
-        FUNCTION        5       gtsquery_penalty (internal, internal, internal),
-        FUNCTION        6       gtsquery_picksplit (internal, internal),
-        FUNCTION        7       gtsquery_same (bigint, bigint, internal),
-        STORAGE         bigint;
-
-CREATE OPERATOR CLASS gin_tsvector_ops
-FOR TYPE tsvector USING gin
-AS
-        OPERATOR        1       @@ (tsvector, tsquery),
-        OPERATOR        2       @@@ (tsvector, tsquery),
-        FUNCTION        1       bttextcmp(text, text),
-        FUNCTION        2       gin_extract_tsvector(tsvector,internal,internal),
-        FUNCTION        3       gin_extract_tsquery(tsvector,internal,smallint,internal,internal,internal,internal),
-        FUNCTION        4       gin_tsquery_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal),
-        FUNCTION        5       gin_cmp_prefix(text,text,smallint,internal),
-        STORAGE         text;
-
-CREATE OPERATOR CLASS tsvector_ops
-FOR TYPE tsvector USING btree AS
-        OPERATOR        1       < ,
-        OPERATOR        2       <= ,
-        OPERATOR        3       = ,
-        OPERATOR        4       >= ,
-        OPERATOR        5       > ,
-        FUNCTION        1       tsvector_cmp(tsvector, tsvector);
-
-CREATE OPERATOR CLASS tsquery_ops
-FOR TYPE tsquery USING btree AS
-        OPERATOR        1       < ,
-        OPERATOR        2       <= ,
-        OPERATOR        3       = ,
-        OPERATOR        4       >= ,
-        OPERATOR        5       > ,
-        FUNCTION        1       tsquery_cmp(tsquery, tsquery);
diff --git a/contrib/tsearch2/tsearch2--1.1.sql b/contrib/tsearch2/tsearch2--1.1.sql
new file mode 100644
index 0000000..f65c6ac
--- /dev/null
+++ b/contrib/tsearch2/tsearch2--1.1.sql
@@ -0,0 +1,653 @@
+/* contrib/tsearch2/tsearch2--1.1.sql */
+
+-- complain if script is sourced in psql, rather than via CREATE EXTENSION
+\echo Use "CREATE EXTENSION tsearch2" to load this file. \quit
+
+-- These domains are just to catch schema-qualified references to the
+-- old data types.
+CREATE DOMAIN tsvector AS pg_catalog.tsvector;
+CREATE DOMAIN tsquery AS pg_catalog.tsquery;
+CREATE DOMAIN gtsvector AS pg_catalog.gtsvector;
+CREATE DOMAIN gtsq AS pg_catalog.text;
+
+--dict interface
+CREATE FUNCTION lexize(oid, text)
+	RETURNS _text
+	as 'ts_lexize'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE;
+
+CREATE FUNCTION lexize(text, text)
+        RETURNS _text
+        as 'MODULE_PATHNAME', 'tsa_lexize_byname'
+        LANGUAGE C
+        RETURNS NULL ON NULL INPUT
+        PARALLEL SAFE;
+
+CREATE FUNCTION lexize(text)
+        RETURNS _text
+        as 'MODULE_PATHNAME', 'tsa_lexize_bycurrent'
+        LANGUAGE C
+        RETURNS NULL ON NULL INPUT
+        PARALLEL RESTRICTED;
+
+CREATE FUNCTION set_curdict(int)
+	RETURNS void
+	as 'MODULE_PATHNAME', 'tsa_set_curdict'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL RESTRICTED;
+
+CREATE FUNCTION set_curdict(text)
+	RETURNS void
+	as 'MODULE_PATHNAME', 'tsa_set_curdict_byname'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL RESTRICTED;
+
+--built-in dictionaries
+CREATE FUNCTION dex_init(internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_dex_init'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION dex_lexize(internal,internal,int4)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_dex_lexize'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE;
+
+CREATE FUNCTION snb_en_init(internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_snb_en_init'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION snb_lexize(internal,internal,int4)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_snb_lexize'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE;
+
+CREATE FUNCTION snb_ru_init_koi8(internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_snb_ru_init_koi8'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION snb_ru_init_utf8(internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_snb_ru_init_utf8'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION snb_ru_init(internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_snb_ru_init'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION spell_init(internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_spell_init'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION spell_lexize(internal,internal,int4)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_spell_lexize'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE;
+
+CREATE FUNCTION syn_init(internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_syn_init'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION syn_lexize(internal,internal,int4)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_syn_lexize'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE;
+
+CREATE FUNCTION thesaurus_init(internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_thesaurus_init'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION thesaurus_lexize(internal,internal,int4,internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_thesaurus_lexize'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE;
+
+--sql-level interface
+CREATE TYPE tokentype
+	as (tokid int4, alias text, descr text);
+
+CREATE FUNCTION token_type(int4)
+	RETURNS setof tokentype
+	as 'ts_token_type_byid'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE
+        ROWS 16;
+
+CREATE FUNCTION token_type(text)
+	RETURNS setof tokentype
+	as 'ts_token_type_byname'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE
+        ROWS 16;
+
+CREATE FUNCTION token_type()
+	RETURNS setof tokentype
+	as 'MODULE_PATHNAME', 'tsa_token_type_current'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL RESTRICTED
+        ROWS 16;
+
+CREATE FUNCTION set_curprs(int)
+	RETURNS void
+	as 'MODULE_PATHNAME', 'tsa_set_curprs'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL RESTRICTED;
+
+CREATE FUNCTION set_curprs(text)
+	RETURNS void
+	as 'MODULE_PATHNAME', 'tsa_set_curprs_byname'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL RESTRICTED;
+
+CREATE TYPE tokenout
+	as (tokid int4, token text);
+
+CREATE FUNCTION parse(oid,text)
+	RETURNS setof tokenout
+	as 'ts_parse_byid'
+	LANGUAGE INTERNAL
+	PARALLEL SAFE
+	RETURNS NULL ON NULL INPUT;
+
+CREATE FUNCTION parse(text,text)
+	RETURNS setof tokenout
+	as 'ts_parse_byname'
+	LANGUAGE INTERNAL
+	PARALLEL SAFE
+	RETURNS NULL ON NULL INPUT;
+
+CREATE FUNCTION parse(text)
+	RETURNS setof tokenout
+	as 'MODULE_PATHNAME', 'tsa_parse_current'
+	LANGUAGE C
+	PARALLEL RESTRICTED
+	RETURNS NULL ON NULL INPUT;
+
+--default parser
+CREATE FUNCTION prsd_start(internal,int4)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_prsd_start'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION prsd_getlexeme(internal,internal,internal)
+	RETURNS int4
+	as 'MODULE_PATHNAME', 'tsa_prsd_getlexeme'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION prsd_end(internal)
+	RETURNS void
+	as 'MODULE_PATHNAME', 'tsa_prsd_end'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION prsd_lextype(internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_prsd_lextype'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+CREATE FUNCTION prsd_headline(internal,internal,internal)
+	RETURNS internal
+	as 'MODULE_PATHNAME', 'tsa_prsd_headline'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+--tsearch config
+CREATE FUNCTION set_curcfg(int)
+	RETURNS void
+	as 'MODULE_PATHNAME', 'tsa_set_curcfg'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL RESTRICTED;
+
+CREATE FUNCTION set_curcfg(text)
+	RETURNS void
+	as 'MODULE_PATHNAME', 'tsa_set_curcfg_byname'
+	LANGUAGE C
+	RETURNS NULL ON NULL INPUT
+	PARALLEL RESTRICTED;
+
+CREATE FUNCTION show_curcfg()
+	RETURNS oid
+	AS 'get_current_ts_config'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT STABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION length(tsvector)
+	RETURNS int4
+	AS 'tsvector_length'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION to_tsvector(oid, text)
+	RETURNS tsvector
+	AS 'to_tsvector_byid'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION to_tsvector(text, text)
+	RETURNS tsvector
+	AS 'MODULE_PATHNAME', 'tsa_to_tsvector_name'
+	LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION to_tsvector(text)
+	RETURNS tsvector
+	AS 'to_tsvector'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION strip(tsvector)
+	RETURNS tsvector
+	AS 'tsvector_strip'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION setweight(tsvector,"char")
+	RETURNS tsvector
+	AS 'tsvector_setweight'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION concat(tsvector,tsvector)
+	RETURNS tsvector
+	AS 'tsvector_concat'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION querytree(tsquery)
+	RETURNS text
+	AS 'tsquerytree'
+	LANGUAGE INTERNAL RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE;
+
+CREATE FUNCTION to_tsquery(oid, text)
+	RETURNS tsquery
+	AS 'to_tsquery_byid'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION to_tsquery(text, text)
+	RETURNS tsquery
+	AS 'MODULE_PATHNAME','tsa_to_tsquery_name'
+	LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION to_tsquery(text)
+	RETURNS tsquery
+	AS 'to_tsquery'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION plainto_tsquery(oid, text)
+	RETURNS tsquery
+	AS 'plainto_tsquery_byid'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION plainto_tsquery(text, text)
+	RETURNS tsquery
+	AS 'MODULE_PATHNAME','tsa_plainto_tsquery_name'
+	LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION plainto_tsquery(text)
+	RETURNS tsquery
+	AS 'plainto_tsquery'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+--Trigger
+CREATE FUNCTION tsearch2()
+	RETURNS trigger
+	AS 'MODULE_PATHNAME', 'tsa_tsearch2'
+	LANGUAGE C
+	PARALLEL SAFE;
+
+--Relevation
+CREATE FUNCTION rank(float4[], tsvector, tsquery)
+	RETURNS float4
+	AS 'ts_rank_wtt'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION rank(float4[], tsvector, tsquery, int4)
+	RETURNS float4
+	AS 'ts_rank_wttf'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION rank(tsvector, tsquery)
+	RETURNS float4
+	AS 'ts_rank_tt'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION rank(tsvector, tsquery, int4)
+	RETURNS float4
+	AS 'ts_rank_ttf'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION rank_cd(float4[], tsvector, tsquery)
+        RETURNS float4
+	AS 'ts_rankcd_wtt'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION rank_cd(float4[], tsvector, tsquery, int4)
+	RETURNS float4
+	AS 'ts_rankcd_wttf'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION rank_cd(tsvector, tsquery)
+	RETURNS float4
+	AS 'ts_rankcd_tt'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION rank_cd(tsvector, tsquery, int4)
+	RETURNS float4
+	AS 'ts_rankcd_ttf'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION headline(oid, text, tsquery, text)
+	RETURNS text
+	AS 'ts_headline_byid_opt'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION headline(oid, text, tsquery)
+	RETURNS text
+	AS 'ts_headline_byid'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION headline(text, text, tsquery, text)
+	RETURNS text
+	AS 'MODULE_PATHNAME', 'tsa_headline_byname'
+	LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION headline(text, text, tsquery)
+	RETURNS text
+	AS 'MODULE_PATHNAME', 'tsa_headline_byname'
+	LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE
+	PARALLEL SAFE;
+
+CREATE FUNCTION headline(text, tsquery, text)
+	RETURNS text
+	AS 'ts_headline_opt'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION headline(text, tsquery)
+	RETURNS text
+	AS 'ts_headline'
+	LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+-- CREATE the OPERATOR class
+CREATE OPERATOR CLASS gist_tsvector_ops
+FOR TYPE tsvector USING gist
+AS
+        OPERATOR        1       @@ (tsvector, tsquery),
+        FUNCTION        1       gtsvector_consistent (internal, tsvector, smallint, oid, internal),
+        FUNCTION        2       gtsvector_union (internal, internal),
+        FUNCTION        3       gtsvector_compress (internal),
+        FUNCTION        4       gtsvector_decompress (internal),
+        FUNCTION        5       gtsvector_penalty (internal, internal, internal),
+        FUNCTION        6       gtsvector_picksplit (internal, internal),
+        FUNCTION        7       gtsvector_same (gtsvector, gtsvector, internal),
+        STORAGE         gtsvector;
+
+--stat info
+CREATE TYPE statinfo
+	as (word text, ndoc int4, nentry int4);
+
+CREATE FUNCTION stat(text)
+	RETURNS setof statinfo
+	as 'ts_stat1'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE;
+
+CREATE FUNCTION stat(text,text)
+	RETURNS setof statinfo
+	as 'ts_stat2'
+	LANGUAGE INTERNAL
+	RETURNS NULL ON NULL INPUT
+	PARALLEL SAFE;
+
+--reset - just for debuging
+CREATE FUNCTION reset_tsearch()
+        RETURNS void
+        as 'MODULE_PATHNAME', 'tsa_reset_tsearch'
+        LANGUAGE C
+        RETURNS NULL ON NULL INPUT
+        PARALLEL SAFE;
+
+--get cover (debug for rank_cd)
+CREATE FUNCTION get_covers(tsvector,tsquery)
+        RETURNS text
+        as 'MODULE_PATHNAME', 'tsa_get_covers'
+        LANGUAGE C
+        RETURNS NULL ON NULL INPUT
+        PARALLEL SAFE;
+
+--debug function
+create type tsdebug as (
+        ts_name text,
+        tok_type text,
+        description text,
+        token   text,
+        dict_name text[],
+        "tsvector" tsvector
+);
+
+CREATE FUNCTION _get_parser_from_curcfg()
+RETURNS text as
+$$select prsname::text from pg_catalog.pg_ts_parser p join pg_ts_config c on cfgparser = p.oid where c.oid = show_curcfg();$$
+LANGUAGE SQL RETURNS NULL ON NULL INPUT IMMUTABLE PARALLEL SAFE;
+
+CREATE FUNCTION ts_debug(text)
+RETURNS setof tsdebug as $$
+select
+        (select c.cfgname::text from pg_catalog.pg_ts_config as c
+         where c.oid = show_curcfg()),
+        t.alias as tok_type,
+        t.descr as description,
+        p.token,
+        ARRAY ( SELECT m.mapdict::pg_catalog.regdictionary::pg_catalog.text
+                FROM pg_catalog.pg_ts_config_map AS m
+                WHERE m.mapcfg = show_curcfg() AND m.maptokentype = p.tokid
+                ORDER BY m.mapseqno )
+        AS dict_name,
+        strip(to_tsvector(p.token)) as tsvector
+from
+        parse( _get_parser_from_curcfg(), $1 ) as p,
+        token_type() as t
+where
+        t.tokid = p.tokid
+$$ LANGUAGE SQL RETURNS NULL ON NULL INPUT PARALLEL RESTRICTED;
+
+CREATE FUNCTION numnode(tsquery)
+        RETURNS int4
+        as 'tsquery_numnode'
+        LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION tsquery_and(tsquery,tsquery)
+        RETURNS tsquery
+        as 'tsquery_and'
+        LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION tsquery_or(tsquery,tsquery)
+        RETURNS tsquery
+        as 'tsquery_or'
+        LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION tsquery_not(tsquery)
+        RETURNS tsquery
+        as 'tsquery_not'
+        LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+--------------rewrite subsystem
+
+CREATE FUNCTION rewrite(tsquery, text)
+        RETURNS tsquery
+        as 'tsquery_rewrite_query'
+        LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION rewrite(tsquery, tsquery, tsquery)
+        RETURNS tsquery
+        as 'tsquery_rewrite'
+        LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION rewrite_accum(tsquery,tsquery[])
+        RETURNS tsquery
+        AS 'MODULE_PATHNAME', 'tsa_rewrite_accum'
+        LANGUAGE C
+        PARALLEL SAFE;
+
+CREATE FUNCTION rewrite_finish(tsquery)
+      RETURNS tsquery
+      as 'MODULE_PATHNAME', 'tsa_rewrite_finish'
+      LANGUAGE C
+      PARALLEL SAFE;
+
+CREATE AGGREGATE rewrite(tsquery[]) (
+      SFUNC = rewrite_accum,
+      STYPE = tsquery,
+      FINALFUNC = rewrite_finish,
+      PARALLEL = SAFE
+);
+
+CREATE FUNCTION tsq_mcontains(tsquery, tsquery)
+        RETURNS bool
+        as 'tsq_mcontains'
+        LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE FUNCTION tsq_mcontained(tsquery, tsquery)
+        RETURNS bool
+        as 'tsq_mcontained'
+        LANGUAGE INTERNAL
+        RETURNS NULL ON NULL INPUT IMMUTABLE
+        PARALLEL SAFE;
+
+CREATE OPERATOR CLASS gist_tp_tsquery_ops
+FOR TYPE tsquery USING gist
+AS
+        OPERATOR        7       @> (tsquery, tsquery),
+        OPERATOR        8       <@ (tsquery, tsquery),
+        FUNCTION        1       gtsquery_consistent (internal, tsquery, smallint, oid, internal),
+        FUNCTION        2       gtsquery_union (internal, internal),
+        FUNCTION        3       gtsquery_compress (internal),
+        FUNCTION        4       gtsquery_decompress (internal),
+        FUNCTION        5       gtsquery_penalty (internal, internal, internal),
+        FUNCTION        6       gtsquery_picksplit (internal, internal),
+        FUNCTION        7       gtsquery_same (bigint, bigint, internal),
+        STORAGE         bigint;
+
+CREATE OPERATOR CLASS gin_tsvector_ops
+FOR TYPE tsvector USING gin
+AS
+        OPERATOR        1       @@ (tsvector, tsquery),
+        OPERATOR        2       @@@ (tsvector, tsquery),
+        FUNCTION        1       bttextcmp(text, text),
+        FUNCTION        2       gin_extract_tsvector(tsvector,internal,internal),
+        FUNCTION        3       gin_extract_tsquery(tsvector,internal,smallint,internal,internal,internal,internal),
+        FUNCTION        4       gin_tsquery_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal),
+        FUNCTION        5       gin_cmp_prefix(text,text,smallint,internal),
+        STORAGE         text;
+
+CREATE OPERATOR CLASS tsvector_ops
+FOR TYPE tsvector USING btree AS
+        OPERATOR        1       < ,
+        OPERATOR        2       <= ,
+        OPERATOR        3       = ,
+        OPERATOR        4       >= ,
+        OPERATOR        5       > ,
+        FUNCTION        1       tsvector_cmp(tsvector, tsvector);
+
+CREATE OPERATOR CLASS tsquery_ops
+FOR TYPE tsquery USING btree AS
+        OPERATOR        1       < ,
+        OPERATOR        2       <= ,
+        OPERATOR        3       = ,
+        OPERATOR        4       >= ,
+        OPERATOR        5       > ,
+        FUNCTION        1       tsquery_cmp(tsquery, tsquery);
diff --git a/contrib/tsearch2/tsearch2.control b/contrib/tsearch2/tsearch2.control
index 3e11bcf..a24f8ef 100644
--- a/contrib/tsearch2/tsearch2.control
+++ b/contrib/tsearch2/tsearch2.control
@@ -1,6 +1,6 @@
 # tsearch2 extension
 comment = 'compatibility package for pre-8.3 text search functions'
-default_version = '1.0'
+default_version = '1.1'
 module_pathname = '$libdir/tsearch2'
 # this is not relocatable because the tsearch2--unpackaged--1.0.sql script
 # has to use @extschema@ to avoid conflict with items in pg_catalog
parallel-contrib-qualify-casts-v2.patchtext/x-patch; name=parallel-contrib-qualify-casts-v2.patchDownload
diff --git a/contrib/citext/citext--1.1--1.2.sql b/contrib/citext/citext--1.1--1.2.sql
index 60dd15b..a6a30e9 100644
--- a/contrib/citext/citext--1.1--1.2.sql
+++ b/contrib/citext/citext--1.1--1.2.sql
@@ -41,14 +41,14 @@ ALTER FUNCTION replace(citext, citext, citext) PARALLEL SAFE;
 ALTER FUNCTION split_part(citext, citext, int) PARALLEL SAFE;
 ALTER FUNCTION translate(citext, citext, text) PARALLEL SAFE;
 
-UPDATE pg_proc SET proparallel = 's'
-WHERE oid = 'min(citext)'::regprocedure;
+UPDATE pg_catalog.pg_proc SET proparallel = 's'
+WHERE oid = 'min(citext)'::pg_catalog.regprocedure;
 
-UPDATE pg_proc SET proparallel = 's'
-WHERE oid = 'max(citext)'::regprocedure;
+UPDATE pg_catalog.pg_proc SET proparallel = 's'
+WHERE oid = 'max(citext)'::pg_catalog.regprocedure;
 
-UPDATE pg_aggregate SET aggcombinefn = 'citext_smaller'
-WHERE aggfnoid = 'max(citext)'::regprocedure;
+UPDATE pg_catalog.pg_aggregate SET aggcombinefn = 'citext_smaller'
+WHERE aggfnoid = 'max(citext)'::pg_catalog.regprocedure;
 
-UPDATE pg_aggregate SET aggcombinefn = 'citext_larger'
-WHERE aggfnoid = 'max(citext)'::regprocedure;
+UPDATE pg_catalog.pg_aggregate SET aggcombinefn = 'citext_larger'
+WHERE aggfnoid = 'max(citext)'::pg_catalog.regprocedure;
diff --git a/contrib/intagg/intagg--1.0--1.1.sql b/contrib/intagg/intagg--1.0--1.1.sql
index 2ec95b6..d9a8705 100644
--- a/contrib/intagg/intagg--1.0--1.1.sql
+++ b/contrib/intagg/intagg--1.0--1.1.sql
@@ -7,5 +7,5 @@ ALTER FUNCTION int_agg_state(internal, int4) PARALLEL SAFE;
 ALTER FUNCTION int_agg_final_array(internal) PARALLEL SAFE;
 ALTER FUNCTION int_array_enum(int4[]) PARALLEL SAFE;
 
-UPDATE pg_proc SET proparallel = 's'
-WHERE oid = 'int_array_aggregate(int4)'::regprocedure;
+UPDATE pg_catalog.pg_proc SET proparallel = 's'
+WHERE oid = 'int_array_aggregate(int4)'::pg_catalog.regprocedure;
#50Andreas Karlsson
andreas@proxel.se
In reply to: Andreas Karlsson (#37)
15 attachment(s)
Re: Parallel safety tagging of extension functions

On 06/07/2016 05:54 PM, Andreas Karlsson wrote:

On 06/07/2016 05:44 PM, Robert Haas wrote:

cube: I think we need a new extension version.
hstore: Does not apply for me.
intarray: Does not apply for me.

Those three and ltree, pg_trgm, and seg depend on my patch with fixes
for the GiST/GIN function signatures in
/messages/by-id/574F091A.3050800@proxel.se. The
reason for the dependency is that I also mark the those functions with
changed signatures as parallel safe.

I have rebased all my patches on the current master now (and skipped the
extensions I previously listed).

Andreas

Attachments:

parallel-contrib-v5-adminpack.patch.gzapplication/gzip; name=parallel-contrib-v5-adminpack.patch.gzDownload
parallel-contrib-v5-cube.patch.gzapplication/gzip; name=parallel-contrib-v5-cube.patch.gzDownload
parallel-contrib-v5-dblink.patch.gzapplication/gzip; name=parallel-contrib-v5-dblink.patch.gzDownload
parallel-contrib-v5-hstore.patch.gzapplication/gzip; name=parallel-contrib-v5-hstore.patch.gzDownload
parallel-contrib-v5-intarray.patch.gzapplication/gzip; name=parallel-contrib-v5-intarray.patch.gzDownload
parallel-contrib-v5-ltree.patch.gzapplication/gzip; name=parallel-contrib-v5-ltree.patch.gzDownload
parallel-contrib-v5-pg_trgm.patch.gzapplication/gzip; name=parallel-contrib-v5-pg_trgm.patch.gzDownload
parallel-contrib-v5-pg_visibility.patch.gzapplication/gzip; name=parallel-contrib-v5-pg_visibility.patch.gzDownload
parallel-contrib-v5-seg.patch.gzapplication/gzip; name=parallel-contrib-v5-seg.patch.gzDownload
parallel-contrib-v5-sslinfo.patch.gzapplication/gzip; name=parallel-contrib-v5-sslinfo.patch.gzDownload
parallel-contrib-v5-tablefunc.patch.gzapplication/gzip; name=parallel-contrib-v5-tablefunc.patch.gzDownload
parallel-contrib-v5-tsearch2.patch.gzapplication/gzip; name=parallel-contrib-v5-tsearch2.patch.gzDownload
parallel-contrib-v5-unaccent.patch.gzapplication/gzip; name=parallel-contrib-v5-unaccent.patch.gzDownload
parallel-contrib-v5-uuid-ossp.patch.gzapplication/gzip; name=parallel-contrib-v5-uuid-ossp.patch.gzDownload
parallel-contrib-v5-xml2.patch.gzapplication/gzip; name=parallel-contrib-v5-xml2.patch.gzDownload
#51Robert Haas
robertmhaas@gmail.com
In reply to: Andreas Karlsson (#50)
Re: Parallel safety tagging of extension functions

On Tue, Jun 14, 2016 at 6:37 AM, Andreas Karlsson <andreas@proxel.se> wrote:

I have rebased all my patches on the current master now (and skipped the
extensions I previously listed).

Thanks, this is really helpful. It was starting to get hard to keep
track of what hadn't been applied yet. I decided to prioritize
getting committed the patches where the extension version had already
been bumped by 749a787c5b25ae33b3d4da0ef12aa05214aa73c7, so I've now
committed the patches for cube, hstore, intarray, ltree, pg_trgm, and
seg. However, in pg_trgm, I changed some of the functions that you
had marked as PARALLEL RESTRICTED to be PARALLEL SAFE, because I
didn't see any reason why they needed to be PARALLEL RESTRICTED. It's
OK for a parallel-safe function to depend on GUC values, because those
are synchronized from the leader to all worker processes. Random
global variables won't necessarily be kept in sync, but anything
controlled by the GUC mechanism will be. If there's some other reason
you think those functions aren't parallel-safe, please let me know.

I'm still in favor of rejecting the adminpack patch. To me, that just
seems like attaching a larger magazine to the gun pointed at your
foot. I can't deny that in a strict sense those functions are
parallel-safe, but I think they are better left alone.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#52Robert Haas
robertmhaas@gmail.com
In reply to: Robert Haas (#51)
Re: Parallel safety tagging of extension functions

On Tue, Jun 14, 2016 at 1:51 PM, Robert Haas <robertmhaas@gmail.com> wrote:

On Tue, Jun 14, 2016 at 6:37 AM, Andreas Karlsson <andreas@proxel.se> wrote:

I have rebased all my patches on the current master now (and skipped the
extensions I previously listed).

Thanks, this is really helpful. It was starting to get hard to keep
track of what hadn't been applied yet. I decided to prioritize
getting committed the patches where the extension version had already
been bumped by 749a787c5b25ae33b3d4da0ef12aa05214aa73c7, so I've now
committed the patches for cube, hstore, intarray, ltree, pg_trgm, and
seg.

I've now also committed the patches for sslinfo, unaccept, uuid-ossp, and xml2.

I took at look at the patch for tsearch2, but I think token_type() is
mismarked. You have it marked PARALLEL SAFE but seems to depend on
the result of GetCurrentParser(), which returns a backend-private
state variable. That was the only clear mistake I found, but I tend
to think that changing the markings on anything defined by
UNSUPPORTED_FUNCTION() is pretty silly, because there's no point in
going to extra planner effort to generate a parallel plan only to
error out as soon as we try to execute it. I think you should leave
all of those out of the patch.

I also took a look at the patch for tablefunc. I think that you've
got the markings right, here, but I think that it would be good to add
PARALLEL UNSAFE explicitly to the 1.1 version of the file for the
functions are unsafe, and add a comment like "-- query might do
anything" or some other indication as to why they are so marked, for
the benefit of future readers.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#53Andreas Karlsson
andreas@proxel.se
In reply to: Robert Haas (#51)
Re: Parallel safety tagging of extension functions

On 06/14/2016 07:51 PM, Robert Haas wrote:

On Tue, Jun 14, 2016 at 6:37 AM, Andreas Karlsson <andreas@proxel.se> wrote:

I have rebased all my patches on the current master now (and skipped the
extensions I previously listed).

Thanks, this is really helpful. It was starting to get hard to keep
track of what hadn't been applied yet. I decided to prioritize
getting committed the patches where the extension version had already
been bumped by 749a787c5b25ae33b3d4da0ef12aa05214aa73c7, so I've now
committed the patches for cube, hstore, intarray, ltree, pg_trgm, and
seg. However, in pg_trgm, I changed some of the functions that you
had marked as PARALLEL RESTRICTED to be PARALLEL SAFE, because I
didn't see any reason why they needed to be PARALLEL RESTRICTED. It's
OK for a parallel-safe function to depend on GUC values, because those
are synchronized from the leader to all worker processes. Random
global variables won't necessarily be kept in sync, but anything
controlled by the GUC mechanism will be. If there's some other reason
you think those functions aren't parallel-safe, please let me know.

Nah, this is a leftover from before I realized that GUCs are safe. I
thought I went through all the code and fixed this misunderstanding.
Thanks for spotting this.

I'm still in favor of rejecting the adminpack patch. To me, that just
seems like attaching a larger magazine to the gun pointed at your
foot. I can't deny that in a strict sense those functions are
parallel-safe, but I think they are better left alone.

Making them parallel restricted should prevent them from being a
footgun, but I also do not see any huge benefit from doing so (while
making them safe seems dangerous). I do not care either way.

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#54Andreas Karlsson
andreas@proxel.se
In reply to: Robert Haas (#52)
Re: Parallel safety tagging of extension functions

On 06/14/2016 09:55 PM, Robert Haas wrote:

On Tue, Jun 14, 2016 at 1:51 PM, Robert Haas <robertmhaas@gmail.com> wrote:

On Tue, Jun 14, 2016 at 6:37 AM, Andreas Karlsson <andreas@proxel.se> wrote:

I have rebased all my patches on the current master now (and skipped the
extensions I previously listed).

Thanks, this is really helpful. It was starting to get hard to keep
track of what hadn't been applied yet. I decided to prioritize
getting committed the patches where the extension version had already
been bumped by 749a787c5b25ae33b3d4da0ef12aa05214aa73c7, so I've now
committed the patches for cube, hstore, intarray, ltree, pg_trgm, and
seg.

I've now also committed the patches for sslinfo, unaccept, uuid-ossp, and xml2.

Thanks!

I took at look at the patch for tsearch2, but I think token_type() is
mismarked. You have it marked PARALLEL SAFE but seems to depend on
the result of GetCurrentParser(), which returns a backend-private
state variable.

Hm, as far as I can tell that is only for token_type() which I made
RESTRICTED while token_type(int4) and token_type(text) do not call
GetCurrentParser().

That was the only clear mistake I found, but I tend
to think that changing the markings on anything defined by
UNSUPPORTED_FUNCTION() is pretty silly, because there's no point in
going to extra planner effort to generate a parallel plan only to
error out as soon as we try to execute it. I think you should leave
all of those out of the patch.

I will fix this.

I also took a look at the patch for tablefunc. I think that you've
got the markings right, here, but I think that it would be good to add
PARALLEL UNSAFE explicitly to the 1.1 version of the file for the
functions are unsafe, and add a comment like "-- query might do
anything" or some other indication as to why they are so marked, for
the benefit of future readers.

Good suggestion.

Andreas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#55Euler Taveira
euler@timbira.com.br
In reply to: Andreas Karlsson (#34)
Re: Parallel safety tagging of extension functions

On 01-06-2016 20:52, Andreas Karlsson wrote:

I think at least three of the four aggregate functions are little used,
so I do not think many users would be affected. And only min(citext) and
max(citext) can make use of the parallel aggregation.

The functions are:

min(citext)
max(citext)
int_array_aggregate(int4)
rewrite(tsquery[])

I don't think those functions are used a lot (as you said) to justify
adding more code in 9.6. Let's not be in a hurry on something that can
wait some months.

--
Euler Taveira Timbira - http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#56Robert Haas
robertmhaas@gmail.com
In reply to: Andreas Karlsson (#54)
Re: Parallel safety tagging of extension functions

On Thu, Jun 16, 2016 at 9:15 AM, Andreas Karlsson <andreas@proxel.se> wrote:

That was the only clear mistake I found, but I tend
to think that changing the markings on anything defined by
UNSUPPORTED_FUNCTION() is pretty silly, because there's no point in
going to extra planner effort to generate a parallel plan only to
error out as soon as we try to execute it. I think you should leave
all of those out of the patch.

I will fix this.

I also took a look at the patch for tablefunc. I think that you've
got the markings right, here, but I think that it would be good to add
PARALLEL UNSAFE explicitly to the 1.1 version of the file for the
functions are unsafe, and add a comment like "-- query might do
anything" or some other indication as to why they are so marked, for
the benefit of future readers.

Good suggestion.

I was kind of hoping you'd have a new version of this posted already.
beta2 is wrapping on Monday, and I'm inclined to shelve anything that
isn't done by then for the next release. And I don't really plan to
work much this weekend.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#57Andreas Karlsson
andreas@proxel.se
In reply to: Robert Haas (#56)
3 attachment(s)
Re: Parallel safety tagging of extension functions

On 06/17/2016 09:11 PM, Robert Haas wrote:

I was kind of hoping you'd have a new version of this posted already.
beta2 is wrapping on Monday, and I'm inclined to shelve anything that
isn't done by then for the next release. And I don't really plan to
work much this weekend.

Here they are. Shelve them if you like. They are some of the least
important extensions that still should be fixed so they can end up in 10
if you do not find the time.

Andreas

Attachments:

parallel-contrib-v6-pg_visibility.patch.gzapplication/gzip; name=parallel-contrib-v6-pg_visibility.patch.gzDownload
���fW��Ms�0���W��������\B]�fJ��^��K.�i�__AIM���rH�V���+)"q�:'�e�(OIp���O$#I~�SU]����e?�����/���*��8DA?�����\]I����D�e��7ww���Y����h:�m[6x��9�nA��N�qX�%�  �+�b����m2	�����L'0�&#�^|��~����~L�<LP�]���>�������^����y��!����_��!K�$��k9�l��@@����-���&�9��|�����g��
��L���ws^��(���[-�.2���������Z�n����P���7�3r,��N�i���T�"���@IR���c	F�"�'�s&3Hq��Hs���g���G��:1����E;�j��/�����\�~�����S	R����'l
�-g-6��h��?�������+�	���6��,r�� �Z���e
����j)�3`=?�
8_�Q���p)~�%'Q���"�
]�&�[��T[��D�3�������'
�R�X�u��k����{�����y��g���������L�;��`�?y�U%���0����n������:�$�r8�Q�t������.�����b���)���
p?�$*����J��[8�F�!�(��KV���^���'�����w�K����zm�l6G���l
�G
parallel-contrib-v6-tablefunc.patch.gzapplication/gzip; name=parallel-contrib-v6-tablefunc.patch.gzDownload
parallel-contrib-v6-tsearch2.patch.gzapplication/gzip; name=parallel-contrib-v6-tsearch2.patch.gzDownload
#58Robert Haas
robertmhaas@gmail.com
In reply to: Andreas Karlsson (#57)
Re: Parallel safety tagging of extension functions

On Sun, Jun 19, 2016 at 4:21 PM, Andreas Karlsson <andreas@proxel.se> wrote:

On 06/17/2016 09:11 PM, Robert Haas wrote:

I was kind of hoping you'd have a new version of this posted already.
beta2 is wrapping on Monday, and I'm inclined to shelve anything that
isn't done by then for the next release. And I don't really plan to
work much this weekend.

Here they are. Shelve them if you like. They are some of the least important
extensions that still should be fixed so they can end up in 10 if you do not
find the time.

Thanks. I think it's too late to try to push anything else into
beta2, with less than 24 hours to go before wrap. I'll just leave
these for 10.0 unless I hear several votes for pushing them into 9.6
post-beta2.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#59Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#58)
Re: Parallel safety tagging of extension functions

Robert Haas <robertmhaas@gmail.com> writes:

On Sun, Jun 19, 2016 at 4:21 PM, Andreas Karlsson <andreas@proxel.se> wrote:

Here they are. Shelve them if you like. They are some of the least important
extensions that still should be fixed so they can end up in 10 if you do not
find the time.

Thanks. I think it's too late to try to push anything else into
beta2, with less than 24 hours to go before wrap. I'll just leave
these for 10.0 unless I hear several votes for pushing them into 9.6
post-beta2.

I agree with not pushing them right now, but I think it would be
sensible to push them post-beta2. There's already one certain
reason for a forced initdb after beta2 [1]/messages/by-id/30448.1466190874@sss.pgh.pa.us, so leaving these for
next cycle seems kinda pointless.

regards, tom lane

[1]: /messages/by-id/30448.1466190874@sss.pgh.pa.us

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers