Tablespaces

Started by Gavin Sherryover 21 years ago70 messages
#1Gavin Sherry
swm@linuxworld.com.au
1 attachment(s)

Hi all,

Attached is my latest patch implementing tablespaces. This has all the
functionality I was planning for 7.5.

Most of the information about the patch is contained in the
patch/documentation, previous submissions and the archives.

Testing, review, comments would be greatly appreciated.

Gavin

Attachments:

tablespace-18.diff.gzapplication/x-gzip; NAME=tablespace-18.diff.gzDownload
����@tablespace-18.diff�=�w�F�?��b��	N�6��!�$|%�b�v7��i0��J���f���w� ����qw����<������h����&�<������)�tZ4}j�tl�11z�^|����}N��C��������S4������2��)���~q'���>
}�^��%��W`{.)T�,{:%�LR���dR������������^*UIIoV���)���c
�]!�������#	�Q?=���
���yOz�vk������c�.������t� x��0|cNC���X��������'�C������u�- C:�����Wav���i��z��5=����0=.7������1S�b�W'L��J��_����J��^�:�g��n�b{��w�C����Z�*4U�i��HT����YK3t��3//}z�s����n ��Sb����	���2����G�Z/��K'�'7!-�3�hX�������;9x�L2�O����c�
�����W����
���9���'wd�q�������6�p�|AM{j���3d���I�L=�wID�)%85�-4��\���t!:�����{\g��Pl��!X��x�H��1Y��n������b��:��Q�U�H��M�'��K�����7k��^�\,����`~��,W7���3����u�����mf�����M��?a�6��i��y���O��-�2�[����z�����d��4����;��*�mf��gi�zg�zg�Zoh���X�FI�A�+P�nQS�x�f�������HqX��y#0g���]r=��	=������OHwJ\/$h��ZB�Crm;�P1=�����������~��x�t�{aS3,o���9�s�>D���\NZ�r�dP��$*�r0���+�Y�Y=l�b��m��*��Q���>�(�5�0
���;��=����
��o:o[��	�
���mxOZ�7�a�?y�������v��1S��AeSX��d�_��o����m���Q���������p�H��k��Z�;fxlD:y���A�:U�D��"G������	]�g�����k�M��Y�t�������	��o����Q��k�QZ���9;��`�"�M�$e�q���t�\?T�>�s:�P�$#k3��O$lJ������V����5�H}�������T�G�[�|�D�F������%��p[�H_R��W����Wn��m�dR�1PTG���{W�U@���r������PqR*������{�����]lurs��2�e���I��:���_wh|ZP���y>j
G�0wGo���a9S��"r��[k���������^';���w�
V�HM�k���"�T����d�[��!��z���A�F��M�~$���L�S��Y���3]8�hI���Bz��$�0� �&TN���5e��+�r�=2�1Bkm{=U�G%��M�=�+7b[�W��R�Z��z}s@�b��z�Y:�d�ZE)��cE�va��s0����b�?�n�����o�#���
;����~����^g?
g�3s�M�Yk�z��[L�����n���c�s��7�Tbd�L���Vk(O
���R�{Y��rk���w���i0�BP�\+6i8)�g_"�JePm]�Z����Z��0���E�����6�T@9,�@��n�-L+0�V�d�ZbeR�c����v�I!ce��@x
b�2|�L��*��>�7����*����F�q�4�!��%���%IY0��4�g�6C��yc����d�����Z_IO����z�x���5+�f�0��o���@6�z�R��RKJ�����D��?d����<�O��+-���
���@0[ElP9Z�%��B�3k6�Q�]�,�ol�&uUO���������S�D�@z�{�4.)9�Y��U��jE7�+Z%��H��Le#��������zb���Rb��%�R��hy��(�#5�����k6�Xt��s�Ev��/U)]������g$q�T(��<������)�z����8y�M�J�WT���=�p�,v{��K��~Ou{��7���������O/���BK�x�C����(���R%�`��21��0�p��L}o�=�L
�������K���,����:�����_+iMQ�R14��0l(TX�m��*]�(W��
G���94��OX4-���+�����H��R��9�|���b�����i�O�`:�{��M8��S��a]��
P�D�I�D���''������@sZ��5'Z�f�s ��V���n���+�p�������>��	��W)�O�#�����<�`��� ��Y�(/X�~$Y�U`��}x&��O��(��7�=��J��MmL�&�&������������������w����H��Cq}DG1�A��k.C�}D(/���
�7���|���^�����5N�v�T*�$�Y5��.%�L^���HGB�����y��6�j�5�]$`6}m�w"�7�[\;�����^�"�<�+A��\ b����.�u�1%_�4�g���z���B�2G��).o�zBY�-Yt|�U��������sl�%v)�3~�O�pQls�*��
�5�+��0n.�O(B't41�U�%wx��E
XJD�y��Eii(��F�������"�v	2��J
��.d��
��J��x�'"�����������w�[N��'�$�Y@�a��b2��^U�WfMAv��d�yX�v}U-d}��`��2���;�A�d3Bt�xTQ�*
�vf_-	eic����������8&��.���N$`|	�{X�!�h[��E���[��_*�M����XMle��v���-a���%pN�`8��MP�}	\�G	�a���YN4���#as�FQ-QW�L�
�+^�0�������J?aq�*+��BW%���g�W��	��������zR����X�YW�C�o��,�nS���)�h�52U���'`kJv�U��a����j����;<�u�.=�0��z0���}�R]��:������as����]��&*t)���>����YY:�{�7��R��*c\���U���C����0y`�6�@<���Tb���&���H���UL-q���+a*�V�����P$/�X��t�5O���FY�{�rj���*U��!��8���"�+Uh,K^���bD1Y`9���K�3Y��Mg�wW�;����2I.���Nm�*��%Uyb�df<s�&��+|;�I���A����l������&6`w�I�d.`��OZT7`�H���+�e�?�_��Ns�{z����*�BAf���t]���J�Ro��������Qu���lz��R��dQd��G����`�����YsJ�'y=\�m�}�{�E������n������n�����@���"v���h�,�N�V�����w�^�u��| _`\���3N���8��vCJ2��k�}�����'�.���;S'��kf����0���#8~����Fe�S2��E�4iCP���?��80�������tUOe�U�*pGm�����-6K�fU���N�L���/ti���#����=@~i������<$�sr�_{����� S�	�s��S�"M#�V�n�B����0/�����B���;�G&>k��0�@�u��T�L�9�P�m�Y��_�sXOi�(�����U�{����~A��=���acf�f{������a�a@��p�3���A�
��d7VB�(��"�\��o���Q�

���� ��>u�]@=g�X�y����O�����?��k���y�z�n�Z��}�����C��a�*�_�uo��������	�6r+�����Eo�d�.�`F����M}��^s��o�5�TY���Vi�-���F�vc@.�"s��;|6�*��U�3��~��O����3e3N�V4�z$������B�_�z�w{X9����FV~)sV������r���a'���������3&{{wF&�M���VRl*��b���M�tXL�)6�
��`S�#�F���������$*k�W��t_��H��$�\u��1jG�r"���^+5��8�7q�wX�V��3���o��nz����>�%)�d�Z�`A�&�(���z.p4�FG���`fX�5�����C�� X=�-����8R��#�I�]H���1g�k��De}�_J�h"	�6�����xPV��0��~;�RW��7p}��m�{��+��q��M	��c���U2�%W��T#��<�\y�t��7����<�����Qy��},�n��I���e�S��n?���k��bM�����}�]n�!�!�9n���t��|���9�W�b8�R0]#{�\$�����hi�T��=��C~����{��������D����H�zI�����s�f5�0��s��x��j�������G�����A�&�G
�$0����#�� P�������W�J�0[��\z�����
��[���\|E�Q�g�����b?�U��=%y�v��6�1H�a_8����/Z��x�}�ft��x�\OP��V��(���=�?�����0gy[#)d�f�N�Lm?���/�(d#���������������!�;��`';y��&������3f���=�R�xp���c?�B`�<����/X�Q�NO���Ni|(��V��q��!������P[���`�y+�~�H�U�����97
�'z��L�������f��9�S�����;��s��.��h{����ys���7��Tt�\@�O�+/����o��%;�/���YF��s�1N���z��(����w��Vv.�b�@)�U�����8r�*r.`�y�����(��N��Fz\|J<��H4�<-�>�X���@??�8�Sr���F��u�x����=���!�.���c.���H
[�r#��0���_�:�/
�<���^���xT��W�X��9�>g������yN��+I��K����$N#���f^���5R�����L\r�%
]�	l�,<���-�Vva��YhFb��pw�,i��@�\�O;����i�'��m����������Q�-�-�=�;Gb����Ex�����|B@G~�\vE5�k��UWx����Ff�5e���*�b��$��F�m*�m:����ES^���%;�C�?�����>���~�:b��E�����|��9�D��K{��z�j0�+~fW�A�7��O��Ob9	|�����EcpY�)�'�,
�>���"O�����=AE@�#��,���F n������Xd����M���Q����D)�>_�_X~
���q�FV.Cf���O
�/� ��1���<�h�Ve9F3 f��
����#�>�Y80��%S^e*������R�$D���1��9cBg����fPh��s����I2l
E��)�o��v-m����oT"����@��!{�=��,���t~N�<wj)i,����E�d1�96�<!O�q�)1Lz����u3)�k\���@�@vO�'������yR?�:Bb+���Ds���7�In��I�	�D�E����1��\Xx��~,�*��c0�S���}���7U�K����d�`���;B�m>��-������S��4������B\�������@���"����l��"g�hV����F=�?U��t������-�{�[Z`M\[�0����M��!���G���^��w��9��[�8��1������K��V.�9��k���2�U.I�T�g$��Y�+�JGZ�T.����\*n�N�/R07J��W@bzc������S
��DT�!j�A�~T�����h����X�?��{_G�8����6'�%{��'�C;����$'�O!
���(������?u��L�0��~�v����TwWWWU���w��o��k*g� 6	����s�V
��8�1���[�s`����+�<!�z8U�y���/�����?�wb,�	y"/��	�����x9H�T���w$)�0��A`Y*���`]$W�
�(Nh8��"�,�Bcdp�~�
$�	*�����OR�	�Z"V�p��_(x���`J�lD3#�#-���V�/:������mnM���|*�8�� tgwf����S�+���Sq>IN����!������#^��:@D\�jM��` �o��rZ)��N�L�,9���G��BZmS�H�&�����f\�v������:�������v>��xo��"	qH���fe��S�N�\�O���W�-�o���]j��D����,�������zB`�U����k��x�{r|r�z�DA����W����������j(|�����j�r{���08@�x���\��f����*�-������q*���U�R��R�"_*_�v��%�:j'S��z�������u�r`���R�����
�j�,q�/%(5A�"��\n��y������b��
�j@tT�AQ`My�%|Q��F�fF'�4�
�f��-}IF}�QH�?|v3���n@}f���.��*��Y� v	W���*%����'�|n@�Y�-��n^��G���<���Hr_�z�����l��b�(n����3��0�M;0a�n��6����r��f�i����S��!��<{(4g��K���'/�i��Q
j�������[����eM�R��[���:Ik!K���Sw&�������D���c��A���nYK�@��#CF[��GhZ�C|�^�g��(k�&���5����^Zd�s�J�9��[T��>��&�f�WW�����@H�u,
�"_KKW��n�/��`�dk
��sz�R\t�[M���!�r�$o�7�1W�ks����cMP���~J��g5ST���A�O!�T���G6y��#����S�C������}>���Hs�h�#����`C�?"<~�@��B��@�P�f*1-��~���b;�\\�V(�������
����v[���LM��	f��&�JA�����g����Es������-��i���
�V&]�>�S�.����i�px��8Q#�aMj�l�d8�
���c�H��nF15�@������x�~C��*�
��!�jb���a5]�'���P��x,����4�#����F�x�x������b��T�����l'<N���r��pXE���j�p`���!�`y!�+P��j���}k;����<:��k,�~���n�����{��$�M�S��M_�+���)N�������;�O�a�y���������#��i� 2<`���e�
0��t���aq��C�d"��0;��@�1�u>���H�L\%�7�0����F���M����	4L��wC�=�{�&�`�t���4^/3}�:H�����r�c�����q���x!P��nI���?�E���H[@���o������r�����"~�n�_F���}�@�Vxla7�a���1�B4
��9R�;?;��c���af.��4�dd���A�b��A"�|��?:����ky���=:EI�hS�����I�?�������(>*��_Lw<3L7��7^DT
^�����RW���6{W��vyD��n���0�"��uP�1�!��J�g���)�v++�#!�/����[���l�HP�o�'�u����~F2�j��8���������'9���r��E�f�����<���{8e��t
�7�>��0��S���!m�)GH�B��qZF�����k�����T�Q�DF�Z!;p�9�q���>����v*�~����3��N��?����=����X�{p_�!�Y��kW� 	�1]��T0f�@.p���$�iiY�$@�1�zc@%����
qB�(��!
/mKu�A���+��u���|h5����zn�����U��������=�x�Ul�Q��}����:�s����t��'�f=�4-��N��Z��#�������^a��N�2���7�����%Gz~g����k����#�Pt���+��F>.N��[�;�M+�,�K��d�*�������S<$�
��0�I��fd�e���
�����xz�HY������B��^���+��vR��bJW'��)�E��ax������
���
_��%;�8<;��!��!`�N���0�c���n��IY��Q�(��5�2n�O�*���90d�7-��n�{A�c���x�����)�����H]i��G����c��\H�����8���qj�v��p�p�&��f�Z��G�)I��w.=�hR�������*�'}���5��[J����K��4���rR���0�h�U�<�A�4��qKR�c���B��V��k!-o����;5��N:C�.�d)���,�������/NR�o�����o�^�_�����[hd>z;@�j	,��D�#��.R7%�P�(��6W���{S��TE����O��`�lp�����u�%����H�PqJ�\Fm�J�p�U��8H��.o����
�H��(w��2jP���������"�L�3Mg�Rp�Am��>�N�F��$,K(��PE�����Y���%}���=,"��������C�\��!`�"��)��OW5��'��=�n��I��*lF:�{13B�����kp��i�Q�"�_B��,,���������]�v}���_�xn;�Z��N�Ad���E
��`��_�S��I�������9��d6�1�5}K�����=@�vL�$���A��(����P��R!�F����%��/���\��
�_���z����d�)�_�'<�0�8b����#fu��h�����|�&C�Q85?�	��80X�������p��"UGX7������f��g����E��ai;�g���w�s���U���
�p�-[nu@���������
M�"�B��LIC�������d��I��]�����<���������t�
\����e���.��-e�S���]2�3���e�r���f����p7�{�m&�� ���^
w{��9�?�Z�����7Sn��Vz�:k����Qa�?��mK�	L�x'W��,^�qz4:�KO�-�+����� ]3	�^�{6
�NF�{T�tv��%D���y�?��^���9�,���t��$et��~������=H�L��`�� ���HF���;�ruG�y��bL��-a?���Y���''-;�g�]���$������oU�������xE�N�	���z���r6���{�H�@VN�g��u���_^�x�u�#Ya�K<LrN*��n$����z�
��tl7��H��g@_�4��Lz��Ci��l������FA�h�]d���	}'���?#l{'qX��T������4������u�&�����������Ndt���4��P;Rxl
@u���U��Wf�f��L�������F>S��G�+��w�#v�qF�@U
{M�e�����n����Z7����f_��%�l�����nIX���r;���l���z��,���*�J�������!��@�`��k�Q ML� 	������Q�Z9O��_N�~�S��)�}k���M�CJ<����h9
�(�S�F�4T�EV�*~���f�<���>�
�
�x!l���Ai��3��#{
�S�3��*���`~��*���0dS�B���������S��2c$��C�H�e�]c�����]�e�����X��VIde�c��h�X�>N�g����Xq>�����w�:��m�ck(��e��`}�'�OW���+�,���������R9�O��<II��]��#����
��E��[A�l����g\�W��3���]���M� ���c��*�#���n����g(���o�y�jo������m�r�����C���~F�]���������������w������5
��8�'����)]~?�Kj�J���i��M��`9�D������o��w�� j�j�^D�n���DQ����yV�j7�`r�K���]\�dMH������0.�����A���My{A���7t�_`��}t��9tg	�R���B�F����l�SdL�{^gn@�1Wp�����q~1��9�����r|~��0�����mB�K�4��u���'�����"6�G=E-����t���2�����`t�#����j���//����W�5�:&����C�w�c�/Y���j]]�-���:�S$
j�pF�e��G&�5����
�m��&���1'�e�/����p .�����	����86���,��&���v�Vl���s�2?l��U��\^�&�8��n)����J*@5����������1;c���
�&�:�o����m����T��U�by���I�����L����0�k��x2�I����;�`&�j�
���Y�)clH�Y���L��J���$k�K��K	i9��&�)`JM�F���z��
>O�k��/�V��H��\
�Mv��)�k��~�r���|Oc|
R�N*q��<H�k�L�����7�T9�f�,[zwd8;�����33I��':���s]�$����U2�_��)��R���������'���J=�Ue���xk6�o�t��(h�^���w�����y�Fe+$�����Gi��:l�81�6�A�#t�
��D��z��7�����6���<��,��`vHg���� ��g���S:��?��]�im�E�����3t����p9'D&�8H�^��0��}I#TF��0Z���`�lX��V������0�����V����+�G����6_��7����
��L�vm�|��ls%�R����j���@;&��
����5��K{M �%5��x��U�V�eo?���x�-�[��R>�dc���%��Q�L�*���4��-����QA��x���7tM���NNX�����w���C��'r,O�D:��J
���s��5��gjO�.?���*2 ���	p��5��"=�
]�A�B��<bX������r@{-<s��W��u��tQ�m|�7�9CL��������
��]KF�]�ntmB�������To��~�`���,��g6QV�Qt@S�)�<j�5I�8*���$���juc�RN�*�Ls������ZSF�<0�5��pj;�aX�p�m��u(��(��w737�S.�3��H��`�+b�,e	�n���DE>m�qF��&7e�#2�[Y*4�mPK_�x���6�Zy��p�^w����E�\)��q"�\��i�56�N/9J��vh��G�*��X�B)�
�(�D�����q!7:�|������������bBJu�������V����avad	`�P
D3DR����u0�M�*��R<��)�
uP{j_^��
��F*6����2��-�W�e��B��ut�w�����Q4H1#�d� h�cP���wR1��r��'J%~�zEReV��r���s�/�l���;��9�{$���F�B>{������j��rK��n`������3>������l5���J������x�F��X���o��6��p��R�-��|��o`�7|�OD���B�p����+V7P�}�bv�l[6���2%s��\:�	�����V�6Q�a���.���H��n�'�P2��2�K}>���!�7�u)���<��:H��]�l�>nrm3)e����B��.��/���M�P�����@%fq/���v6����C����r�����7���T*��f*���meTg��1s&����i��
����,���h'������D?t�bD[������8b�� s�J��I���\��w�S�q5����j�&�ss��]Cl���,�\�S�S��G�2~p8N0��x�C����^��h�Ia�||�<���5Y�	���.~����	��2!X��	x�l������*JI��w�o� 6aN������F����>"���0�2����"x(�b&*��v�3�B�.�����s�[�%��
�m��n��{M]�8�-b���|kf�9 ��`:�\�O\�_�	����>�qiX..8S3YM���m��}eeXf�m1���d���n;�L��c�z��p���N(-r|6~�,��k���
7����O|����M������	��Wm��'���8r�N+�{�&.��%�4�`��U�Vp���}�]��I�����B�����^G-�
�M�S7y#6��/�l�����Pw	�q.��F;r���#��:l�����2|��<����00c���@�wf���<K�9:=�0�&���	�Za#��E������@��d�z��p��Y����R&HE�2X 
M1��q�#a����eV�?�')����q?a�D���o/�[Xt�:�|}|�?8<��z?5��)�4F1��`����=,{��/B2���O���)x,�\J�-�hw������^�l�����Z���&�bt��jXE{$��d�!�����"���-����������^��~��
�y�xj28���k^��4,)��
>)���ZM�pn�3j���e9�E�n����f��4�\<A�;Y�#ok=o���1y+�b>��~��Q�P#v���4Zu���"��Q��w���M&�����	���k�����U���?�'���k0�w����,i1)��4����������!�zS�t6
a�'�������QG��'M�n��Zwp��4#CE
e,� ��N�Y�����B��3������f�l�	g���5��Mg���8��sW��t.��4~����=�������jE@���.|�����
�����_�/�~��}���?�3����*��O�k���1Z�Y�����7i ��0
-�_����%�+d��l��n�
�� ��U�c�d)�t_%D(D_]���������J
[/�K��Tn��l3��8@}�ck��n��1G+���k�|<zGt.������MeXMu}`"{L{����z�bQ�%�n6��5���5ay��c����]�"+��R C������bq,'�	k�J%1*S9��(�ln6�F[!�q)�Z)��,:�����R��}}Pc'�N�����2�q����x�$[��H����&m�v2�f3���&�^��G@�tq>���/��o'~������d9[��r�C�����=^���5>����x` �6�vvN�����������M����
G:�q�9�����f|��w�5��P�Y�ve�/� ���O�Ln�+��4��@|���=��+��aR��}���2��V�c}���v��U�;�^A����T���w�7���<�n�O�
#�/�fz1��F�o��A����NT�w�k8@�/8'����$�_���XB�xj��E�OQ�H�*^p�{�AQ���+�3R�Ot�T��=q�aj�D:�Fl@&S)MdS|9�nQ�-[4��3�KC�3��M�fTbk����u�x��������r��^����rt���)��#
_��i:>O$����G��d��3��"t�&H��,�����f����48m��u���P�(�Tt,��0Vc��bo��������M{v�0���p��QZ�e?9������������(�H�E `�/O����o�����l�H
0�x�r}��R�Bt��x���b���e��J��Sp����
�$.���������n���:m�!6n��U��k/^���Nm*;�*]�Rz�X���)�z*G����?�L��!�����������B���3(������ug��%�(�F���7�S���D/�xrV���n�}^���EQ%Y��e�(����K�>A�l��u�B����`6�����2�c~�z_���`>�����g	��t��U����wJ������c�����mn��2��������D��z�SY����BUC#t`]�.��zl�<+���F)I��	:�'WSK��M�^��@�X�o,
iS���T�'
 �f��1�c��5Y�-�D@Q��Rvx���)�d�����H�=����E>���T����"S>��7M:�uY�xp�	���9�1l!�����	�xZ�Q�	�e[)�ZLq��d�I��n���U���gc��Y8��vb�8����/����:�|hri\4�t�\nn�n�tp����=|����F;��t=	kF[>������<�CO�Jzi�
����5�����v2E��-�I2s�j�Y�2L��6�<C��u1b��S��QQ|s>���6\�(�"�s3p����41�������#���t���,���}K�W���t�@��T�����H���1��yW���.��b����.K�3��		��)���)n|���O1j���|Lb���W�C�Y�1e=�N'?\���<���\
����>x����]�T�Ts�V�������OR>4�����xq��P���������������2�`n<�3��E[9o��@���wO���U�HsC���S������$�Q��Rs�I$v�nZ�=t�y��I��1d�4��������NG����FQ=E5���/��`!�6�{@�YU����B��~�|o{o�����h�{��/v�=���j����cf���8J�����e�:gP-��O�Gg�$�sI�+����#����q��Z%&��"��P��4]��K�=�����,�p���@U��m��x%r
��r�)��n�,���~M�,�I��]�A�Vp�'� �"2���L�Q^��)�%�`�r���,��:�p�;���l�;R;?{��sg�C�D��"B����H�_@O^��PP��i?�]Yk��q
)�<��	��q���W����kuL%7���q0��X�[+��U������]����_�,���@8�(��Y[Vu<Ms�������m�o.�)3<�������]'������%����E	�d����.��j`���k��.f|�}����n����u��;;F�xn��1��Z�
v�����q���!8�Q���������b�L�"�%R)F$tF7����m m,�
���r{3�1Q�Q������z����9�}�L��eM�sj�������\�8U���p&�(�Q��B�b��Q< ����u����R��jQd�K4��J�)��@;��9�tqIl6J���x>�s]�F]]wO�\A1��Y}��������CIf1��"><��B���g�x=��Nu��Q�cG^P�����!<���|P-o�,�K�U�zP�y�|L����e��e(��L��������<-Q-~�e�,I):��y�N?�Rd2f��P{Zw��0*�2Vi��/��hS��e�A�$�E�2�}P~��dJ&��9l�o����E�(8�m���in�$3���?Q}�Tq�R��x�W��h���`�H����=���CE�E�`I��g#������������o��X�C~�{�����-~O���<��2���T8�������a�s��x>�	�	����<�&Xq���F>e�����@���p��D��$yRx��pJ��|:���`�*(_�����J�p ���q�"�.�I�j�;c������4c�(	�	z�3�}Z�)���>����O�2%���'k��qs�`��l.XE��������T�]
�G ���4��C�0w2��Vk1�eh>�]���lyoo��S<����N��(�R����j1����jx�o�_�P�@f>q�+���}��v_f���"ES.�i��F�����uu���=nF���=GjW����VY�������_$����d���8��uQF+'���hao�+�e��;�d�Q����Zj�-'���fuX9�1R!�Hu�������~�|&�,e�+�H �*D���ZM�NK'�
�=���t1��S��"(j�Y�U`b1[���G�|i���c�`ne�n� ���y4�-X��6���l�P���������(b�*���9U�SW���$��K����b�Xg�.�5��P�����c_��t�z*��.�l���1PQWc�b������ l����M�&p��7���7/���z��Pg��\Vo8��s9��`�_,Qq��dh���*�=!s��������*!��5�6d��W�8����b��&�].s+Er���>���,^	�G7���|Jr6%9=��jhgt�<��`���i#����yza��<����3sP�����P_�����~�E����n���Nc	���U<�6�Nm�c"B�_�S&��c��<icf�J0�p���H��
]���.ek�%�=?6I�\+�������/5�Y�xLj�jX��������S��HTY]vjbF�����Rhd�TT����m�1���_�6(���
	?R691_f�8
}w�1�NxBW��������V�P�[<�3�����z#��w���������\K�����+���*��������>r������1�xfH��=\Y�7My�N�������x��%�Y=H��HV����F��)��"W}0��������18}*���SJ��a� x�0��:�j�\�'U�����iK�q���a���iZ��yLU���a�$�$�5�,��lY��,�J|���hg���R�y91
�l�����]i��v(�+��4��4���,YNGnP�����-����+B~��
S�/�V�J���@�(��^��<����e�CU���(�q��1�(zV!����1v�����
A�������r����!��E��r�v�"�d��k�R�!V�I�Y��sH�p���*�5���a�\Z j�t	C��[������h:ZN��;�"Z��U��g���;����g�nid�Hf�No��1��)#�X��I4N�2b07��4�3��1�����$�4�p'��������*t_Nq�G��}�^����������Z�mk[�ai�[��<[������3d%��;H������N�e@|�
tL�9|��(���$�(gL���,��t�Q�1���.o��W�)����������Y:3Ge&��q�f�����2�.?����Wecm:���j�o���3x�)���$�h��'�$�2��8>O�@�b����b93R���@�aoq�	�<BR���cy��f���XC�U��������)�#A�;���iVw���c�
�rn��m�ye<�f��y@�o��OjL�s�	���y��r�8�K��[��])����74���^Q��5p�)%D�L����#�t�&�b�	�x����R0�r�����@0�`
�P��[����E,��*�����\�8Zs����y�!�4��4�������#�����J"7����0z�HUI���Z�S��5���z��9�_��]�KX��-�Ef\�):����Hu����T���%����:�������|�_����[�=0����
��Ru2�+��El�C�bP� �2,�hb�O�h����+���_wU��r���t�\3�f�9���Z���z��!������T8��_�<���z����=��B��3�O1
W��J��\���0����)�N6nJ�#�QN�e�#XBO
#�Xm�2"jv�0�tz�
��,�]�8�76���L�mO@�s����
,
���r
:&kkOos*��W_3$�(���(�����}��uu��B�U�o���f6�&�����Vh+q`���8e=9��SxM�����|0e���+��H�WVb��
���N\����������=5r�	k���i���z7`���m�v[��� �:�4���!y��/
|=����"��F����N�a�u����e���.��������X}�!'��������'��������/T�>��"h���=�9�G������b��#a�����=����}��g�E����@���M��=+�#���@����KF��a:i��S<�����V�^�������_��wU�K�&��3�d���Q>������1��^�c?R�Na�
;A7

��n���	v|��������9����-���Z�A;ZNu�cr��PE�qn�����b�2���������{��*�0N�������l��Ejs����O�J�����C
���?�j�	��������Nfko_^��w��a:|9*��s��4�2W�C����j�������8���g����|p�����2v�&O�t��z��2�rq���$W���u����p�e�6��#�3Q�z�k�������WM�����<8���?�a�p��z3+��#!�/8��s���zg���g7\p���;�F�m+	��	�/��c�L�Bdx+�~lR*�u9bR���2���}8�F�����>�|j��n��sV���O���)����d�DK�L��)������/�i2�O0����w��"� ���/{,�[��~9-��A�?���X��s�@�T��[	����DM��x1��}����������C_1�C�����HWC
==H��k�����]����0iJ���@N����1*�_�% ��b5"�uE��A����g+�G?����A��x0}&��0����
)�n$^�c7��zV�#G!L����_��G?
�o�p�7Uj�����O��T;>��;����O�����������I��8~�~?x!�=���N+�A���|E@2�_P���w����]�]�|EI[�Y'G[{��$|98��F���n���/v�������n���>��N�^�����__�+�z54ER�gh����oA[a+h�]+?=�Y�����,��<��d��y.���T�3/p�z�jX��V#�-8�>�������\6I��1e�B��6�N�c���R�M�o��V�����/�p��|vb�����G{�Mz��@���d��;����H�;]M���������S��i�=+��=����{��;��(��z�m��:�(E��[O�����*?n
� ������_�+����{�	8���v2�x�k�zF+r��:��h:8�������Cn��)2R�o&�+g��)u\���Dw��]�f1d����&*l�"`�[V�d���G&I�����|%�?v������_9��hI��uF�[��C�r fC6=�J;z��G��e�M��H.�d�=&�K���B>����kc��������B_�Sv��}���(b�:3Hw<��\Fi����������:N7�r�+��	U`mMx�L��c�]!�`��������;��g�R�������8�1�<��R�	
S4��a��(F�\<��!T�
I�K��|���r-�";L\�,�e�8������{>�J�k��B.������U��#�x]TDyN
�R5�x_�d�h�8>�l�/V�cm�q�2�����3���t�X�������p�M7��-/8�
=��-L������'�{��mD�Uj�*urG����g�����a}�Y��jv�t��g����L�-������A_����;'�Du�L�����	0�D��HD��q�i*��a��Na9�}�����K�Vr��j�Q��[����d����p�^+�?������t�2��3{�@=3����(<�mT�G���e*���iT���
W�T8�2i��
D���!B�W����Iz��(�?�<=�0�nDof�|�`>�v>�: gT�#�u�i	1S��E�"�\-��z�V,�l��V��7��������n�^3���������qv���IN�I�N�k�?���v�O��'��)o���Y#4T�fA�a^�5��&�FWs.�h���4���O���=<C���$��L3CB�&��~����b��&��;����k�����������|7�v�N�P��x��
�sZ}�Y�"	8�_N����R�����������l�Q������3�r���)Kdw��OpqK?��6��a];}�:��,����F���-p.y�r��	�8�W��������<_R��t��Z2Q9�-��l�]FN����T�S��"]�!q�i�v�������.`i+w8�\��������e|��h^����i��yS/��n=�?M�Q�i\Ni]���R��Z���c\�k�L$�n��������
���
����_7jjw����-��p�#�d0�yP��ie=��t��3�] �<���7����$>'?�
�W��l�����F�i;WC��/w��;�r��?����%�@o���d��]`r��
n�r���=a����.���D�����qO}�������A�m��Dh�56��f+*�B;74b���I�k��F�������������x�/w����u��� ���0��|������*������?���sbFD���n����z$Y�(h�����z���f�2(}dQ�������RG�&z$�,�HI��G��vg�����g�w���y��nV�"rrN�\����|
�A��j�������dp��o����/�;{G'�������i���(�����V��zC���s��I�-����t~�N#�x*��r���u�x
���R"�����yPZkt�V��:�^����?�8�'|7`g��%H�e�Q��<�j�|<`-�����[�,���5�����j!u��_���S�z7G��]A�Q)�j%j���)����	g�2P�p�E�4q�3������������L��?���wvx�����YL)�(��r����$c�O)7H��H��G���*U�������/q�=-C5�q�e����U�yTi��2T��V��aw��f3�lY�4]�*V�9t��u�N�^E�^7��9'���������
"���3�1���9j�Rn�+������m'�l�{p�n�*|�������{+����V�X4x|Y!l(B��=��(%T��f���4;�Y�R�a� ��A�9G�������l����eT'���\��q�xG���~��uM|'�����.**!��Pg�P�L���L�=7����Do���c�S�J��,��ee��{�f&��Z!�9�E77zY��2�a���P�'yTQ�dlz��<��'�?���$���p�,����B��c��_��s��#��CU5����iI/��[�#!��3��RX�E�8D�-�V���b�D���kC�
&�D7���,I�d���k�4b�_��F��������{��	o0�Q�c�i��M���N���X��[�V�MW���Z������4�>�,���
jZ1S6�Yr8M�,%���4&�]VDJ!�K�%_�C�Z<����F���s���o)Q4"��t�B� ���"NQ��+�������F
�8�U2�h���R��u�����Y���7��r�N��o4�F���2�[��uB����Ao!�z�������P�f�M����Tn��w`�z�h7?%j6���l}J��G�F}��t��c��v5��w���i��f�gv��*�����#$:�]��b�����=��_nl���?���=���]���ZQ�l�w\�c�����A��8_������c�@��r$B!��O
a�]z����
�I����V�a���VV��z+j�|()B�d6'sL<3 �@��f��%*��7�v���zEyG ���X1�Pd��@$��+Y^&0|Q��jV��`����/����-m�Q���0*M�{��v3����}8w��tQ��r�bAS�������N]��,V��0����f�e��@��
)�F�C�� /^�Q�c�x�gh�^6����y�f]���`t9�r�!��u�����Za�jZ�Q�2F��N������)��5 c���GP�?5y��U�������L
�I��b]��\5���D�N&_�QE��
eD����u�~i��{q��J�S'h��64Q��x1b��7rr��aN����/P�|��*��0�7��InB�0���R������Z"[�F�_p�{4�{��Z;
��(��W5��)Pz;��\y<���[�^;�Yp�::}E����x��B�B�`��D+U)��W�&#�S6�LZAQ��(]@r"	<�	q]��/�����
�N�dF	h%Y�`E�a*d�W��C��f��b���J�� ��
���$f�X�t��*A����$3`�^�9GRp���9��QN3<HT���d=L_�]���q%Iz����9�h�`[y���{n��0�=��g�z*��8�����������}��T��%l�|����T�=b,��@�w�����r,����(����8����5���<��|������V6��w:�3�]D|�UOPf�$�F�[�h�q���x2�-�K�K������3)Q�	��6]����������>LW����/������z^l��<�<�1�;:i�E�%D���	�3������mC4�*�D��V�7��@h�K��YQ|j����Q�-c+�wa��^��QY��0a�]���@3�:�LD|7�[L�t!R�,*��aG+���F��,o�K��M� <�����/�^��:���B���x��L�.�������L�����)�[{�NsA��8���l�,��-�	��A#4��_��Z��QsKjX��_��_���AT��a1x{����Y]���zW�oXQ��{V<�����D$z&U��@R1��&2���Dx����������U������D�����,��l����&���������tS3�Q�����y��������/v��V�hY����f��L�P��Tn��8�i�����h�@4���Pv�����b���Zw�V���s$�����U1��l��K��k`#���	['�F���}	b�|r�� �<���p���Xq?�1��p���/�w6y���n/��	�&�G�k�����/I��yk&b6���� ��r>F4,��@%��]�V�,�r���6�}1L�leu�����d�
g�*d��\i���~�_-�O���@>��l�9n
z�;��	�S��P��'���|�a��C���J���~#�!���g�H5Q���q�F�����,3��7��Hi�4�Ln&��6�`�	Ce��p2W��5���E2��"�)��-pd�a�6F�M,��l��(IK��c�&S�#�f��*���b~�=��R�u�B{D����a��3��:��
���-����G���������{E��e�)%��)����vQY9t�����p���Kf��v/?�������q�086]��5�f�����t��m���$����{�1���n�f�j�E����,]b+�(3*
�@&8}&#��	���V�N��c��f�;������m�Z�{2����\����'M����a4����n�Q�X���+�@J�������9V���$��P��^��o���k�}�+\�ka�f�W#�������#`�I�|7��?E�H6s..�����Ql
K�vBI�]a��-������,�����=��3�oh�<���������^|��,�?������^1���N�.�6����Z�[sGl�Z��{/X����\#cR��D�@8�d�j�;]e�+;7f�\F&c����nO�
d��?��i��C�F���@�/,��>�A�;N;_2#����9����6�
����w�[�i�-������wA��b�H]���%�[�gy���Z!	m���Y��;��Qy���a*��Xz;��nX�x1�j�QKkU����,D,v��6����s�#�Rr��������g*=�B�ByG�jg���S^������iXM�����DI����	�����K����U�u���um}EKIQ��V�
{��.]�YS��Fx���Z]�����n�J�8��N)�Y�����;�
�i��&�����)%E�2��*�U=����]z,�$+��%'�s2l�3'��!?a��	;V������4�dj������#���B��������:Q'�4�+�^���L����<�1��a���&��y/��S<+���Y�3����Q�\.X�_~�eS3�#���%�����)N*W��������u��Z�������c�lO g�����g 
o��x�{���kW9���{�\���w�w�Z���m�7LT��,�Epol��4�r���|��ff�����U��Ey�����*�l���|��?j�X3B���bTg�y�l��+?�!�R�6r�7]��U�����O����]}�]�b��6���d����&�. ��l�\Rrx$�eL��v�Tm��V{�e��
����������X�Fj������U����FIh�(�ck�������f����&Q��XPH��~&<l�
=~�}lm��Q�i�W��,I��@�����z�&��w�
�a��TN��7*�H1X�����\���k'���*��4�	T�%��j5���a�6l�� �j���������v��N��S&
������e���K��G�GPas�q�L�<��ij�C���H��7}@��E��V�Be9�d�v
�L�b�L��{�l�
0��M+m����L�����VaG��nF���p�Y){���a��d=�h�&�������������e|�F�4�
�k���`&9�W/�/vO��^��9�Y���~���=4XFip0�)�@����zK���?R�#_������� T���wJ������)�i����rQ(��>��k}��X��e&�xk{�d�e�����?�9!9!�����{O�N4;��t��?o8a	<��QA��ag�p4��,��������W�)p��C���@����/�E_�{��,]Z���*1���t�m�(TsJY�����`D��x���U�	���[�Y�@�&���Vh�<��R�I}i�T�������XJ�`Q�a�k�=��Qg����v�\7hE����N�2����~�h���'����}
���������g�U2��2-��%'���\�}}���G����w%+����>Fe}��IC��C:���;G�^"?������
�C��h�����r�4��oS�8�N���s������{�
�So��I���x�1���w���_V�<y��
�?��4��������>��1U/t������1���{A'4L���|��i�A����--�C��g�e2��������>:�M!���FU��V@}y��������O�%�oooo��*>
��1��hv�1T>������V�-JnK��X!F�B��ha���X�R�K�Hl�t�x�T@4o<��#�
lc%nO��Oe��U@Po6�7������UWC�m��������{_����/'�m�f$�9S�S�����j�3]���g��9d�%�6Mx��Oe0���p0��7�ht�H�4�R~;�
��P�!<�J�N�[��������}���
�^�n����,�l�P�
�G�t�f�)�7r|y�Fh<�Z������_~Aq}zg���,\P���rF�D�T��$����Z�7�W���������:��w�;��?K'��6����� G
hwyI�4x�"h���d�^��^���@�c��p���AZ��G�bg��~�\���U{j��/f����\����K�!���m[S�MO��l��MF{)��v;�;�F��m�����~6<w02~����$}b^�c�\���1%x;�4�"�M.h��d�t��Y9��M���d�foz�T�]J����8
e���32�����kB{t�r��oz�H��y �W�q����f{y��i�`�,G��7#��)������O~�?~�������<@��l�Ke0"c$Jr@���<�.�1;b�N�o��=���py�.S8<T��c��1p�]l�}�!��u�7�-d'��mj)0�J�T�Q��a����!���!��=�SD�S��vn���3L5F���.��s�Q������[��On�h�s�����o��
��O������k�<A�j�/�|�G���+���i~()`�Q��
M(�S@�c�������Y�Y��~?��yq������	[]���3d��X=O��}E�j������'U����D����/����v��B��,��[�������w�]Q{LM~�,�$s�QNc
%�F���B�+~��������or	�{�r�>��+(���<mL�<}�Y�C0�`�GBZ��8�-�s�65&RfA<u��A��6Q��Q�e���W�,IO��u~5��Y���YT��"����.����Qoa�����WiW��&��R�f��Ryg
(���7!�T�x�2�1�r�z�
�Q6"i"����9�=���"0u��d���K�X0-���jV
F���q>IN���/�N��������nF����]�Lc����\�RN��M����RHl�;(
�4JhX{Xn{asx��-��<9����U*��tq9H���x��1e�>F��/_
Bx��z9�<�HJ�����v�m����lm�{���Q���6��B��f�L�a�`�P��>N#�+q�D��3J�n�?Xa�yy�u��{)��l��H�-�x�pF6�X.���d�;����;y���^d~�-Hc}����b��z�j��������������/��::e_�om0R���>/l����{EC��9��"���;� !Em�6j��v�{OJ�S{,66*���dB�f�Gv�?:���k��U��hd��R�)��{C���O3�_~�b�F[��S�L��(�5����x���0����h�o��Y�� ��1��.&�V���[��L`t����^��'. ��f��F��7��������KQ�ht���s���:U^�b
R6�cZp��xn��o����lU��hk!$Q��:KH��8}k��.��Q��M�Iqy2��[�R+ �u��,W�r���JG�=x���%Hr���t$0�n�n1G/vT��������M�����;�'@�#�'(^��oA:V���GZ���@x��J���:BE���*���x�o�9:�oU�R����K�&��)�N�S���!�y(
�k#wM�h
�&��+@�)7��<��a�K��f���Nx��(���l�q������1�����s����L�/�|��M<��N��S�n��" v{�>�����l����t�J�ZD���k1�v=���f�So��5�z3�Dz��2���G6�%9�%������x5����>epz!����o����4��	��9M�`0�I�:+8�di�]J�yv��P��c�>(.�b��M+"`v��*�e�b�%��P��Y[_� �A���]Dl�������Z��������U�f�{��vp��VO?;g-������x���	�kh?�;|�P�i�
]~05t������w<���x�L/1F=�\m������!�����5V����D~��H�����{i�4^����:���������v�.�E��#��/-;�R@��^�!1l�R"zUE�����|����A���R������,"��u�]:�(�?��SaF5xzr�1����?�g���_q�d������V`[a�[�e�,�����X___�-��3�M�=>J�:N
_5U������;[s�9��p=��xr]����c/����]2R��;���7?���V����':������tx@	)����x0,��q6��A���x����F�I��r��H��l��bu\���E���(y�D
`x�:��<u+�{�0K��6�m�(z�)f��[��1>�������I����?�O	D�����_�uR�������F8X��U���Ny��ml��)d�����kU3�|k������b���
x$�|������]��m.����z^a�.g�[(�9):��e�+M���t�)��g�4Vi��r���|
������d3^d��la��}��l5��e�bX	8��%8��m�ID��p��"��E���J�S5_X�_Xj�x�������t�[�P���D��f���v��07�
� �R� ,��n�kRT"s�1��D	M�Nc����daP��k�7���u�I:d<���W?���q�����3{����n��Mh�Z"�#q�c��*�E��V>��ct�y�5�1
����)�b��*�%�e��\������������b��)~���&�i ~�T�!O�h������6$���3�G���2Y����D��}�N^�:]�����qT����^�GU5��h��y�VU��Nh���J�]���=��u���4����c������g�p�)C���1���M|/S��Z�`��3�j��ZM�Yfe��
����=��af���7�=��?�A)��6�
�8�rR�C�z8��AMz�q�7�����S�_HJj����N���m��~g�E��q�X�R�����Vg!tf!�G�(w��='���`��L�15���I����8yks��{����TQ}e
�m�sxy���j�H��<i�Q�������-P�DQ��K�5��F���`�aF!����0�8��<�x�0�7�b�Kmm��������hw9(�����>�mk�����'�@e��D
�?��O��=��1&����B�3���b6���1��x:��L��U��R�v<W��#��d��J������-v����$��uCr������SJ4�CJ	�|��T�l�����KtA�=���=D�/t1H)y)���$N�����2Z��g��?�#��`mA�ty���I����	>�Op�	n�b�9^�<��S���4.�����O�������A��8�O�!F`@�o���������J� ����|����I����|��f%���@��kn��+(�a�U�=�o�B2aN�ku��JG���;�����z�`{W����:�K�'����9�9��R.?e��@�uW�~��$�s?���QP��Dw�Dw�B�s
,S�����p�;��]zS���&NY+�\�{���d��q)8��7�����*�����������}d��<��m��P_����M�pf��e!�"8q�>���������Z_��o>D���.Z�6�������]s�9�C�fI��sk�x����
kY��K�:�s�)���^-q7E`
����W�"�7�t�dug��E2�����R7�����=eR�.�VwR>���<��Q
�7�����$a����*�v��6�=�x�I�eE��Z���Oi��^"en��h��q����6�����`������6�����M�e�8�9������$_,�k�#�/,�}������^��[�1����2���������4�"� +�rrf���9i�����Sm;���/Z���m���:���W��p��26�Yt��2��mF����������dJ1�_��Q�q���S]�w�����4��Iy��u�"��$Q��@e�U_x�����#"%��@��|�#D����'+�����������iG�znql����m�)�W>J����J*Q��3��Ev��"��-�K5Q^9���Z�g��o��hg�H��+"�'	��S<X�<A�����h��u��"Q�HA�����R���$�.�P�>��<k���rN��Px���t�xS��b��R�7�u�-E����Wb�'Kt��=�O��+9������w�'�����Sg�'wp9_@��Z�)����-9�@X�qKZ�������N�+�#���N��Qog���U�v`�{��[����{�Nh��E]����V�8G��H��[ef�$!iY�2��J��'Oq��2��g�8�����w����,�M�$/�����DQD����`���"F�?���N����|+������*���lt�	��*��t��������Y8n��.'�L�l�/�y������RR�A�R�0i�%.�yL�������wU��z+h6B�v!���������r�����-�M����Z ���>5�8�������-�^��xx���t�����djC��K`��z��;��*l�����.�N�"_GVHYf0��,���2���=��w�f�2��L3t���i�(k���\&��1��3��=��C&���u�����*m��y��v����9�<-x��������j6��[}�~i��v����v���MK�������b�\��'����i�b�k��+q�:�#3U���u�����H�{5��+P�tkw�f��G�u�-^M�4�1���br��}����g�����=VZi%�%�Xq�8#$)��U��v7������0p�`��$o�\�0�ZH����E�[��&-9�d�1�^buB����O^��9�)tN���
���5�c�]'�m��)��u{wMl�����&�z�<S��\m�B����l{�Q�e�� �$�������B�kh��.�
���/����$�[7���+���]Tl_��b����n�R�������zAX�n���9Z����"d&�49d��d.����m���{�rz�>�WK����5�����`���
�n��)T6�v�*�n������A/���cy/��
Wv�m���5i!�4y��lj��U�-�;���U�!Kfc��Qd}8�I��`��%g����l+A�����<��p��-[���
������6#
�e�f;������N�9�;�b��d8���R����@Z�������r�~�H�35J���J.g7c�I��ui<9Sh���\������Kq�$P�})[9W��pQB���/*�IU���>���<*���l?[Z���}`�an�������o.({1O��\���r'��{u�X`���%Ut��dz6>w����$��h��G���HhXw�fF4(�P�_�[�3�W����rbW��a�|_$�4���Z�a4��\��*��yy�.�u�k�W���)�^p�F&"����x>r`�������$��}�ej��"^PD{;
�x�0��:�<>��� d��#���Q�X�nU�E�rjUF�5��91T2"�}����1�G?>t*�8^��*k�~Z^5���Q���@<�Q=����Z)��iJA�ST���o:���
�.���os�+9��U�9[�z�(L��d�-�<�<e�lY�s�+�pJ�IXm�����.��������Y�)q��R�B�?Q�+�"���$�>�5�i��	�6��h�:8�a�f�[�������@qmq�����+�H?G���F��Y���twL���d�����M���
�����V�o�3L���o�e����LoH;F�L�Ez�����\��	R�j�4x&�Q��s�����7�&�������\3�����7i-��I�U~_�Q��g��\S/�n���N/�����M�aV�T�F�=?�%F��'��i�/1�z��Y)_��h<gRa�eC��j�gH���e��!���e*�ow�	�;��M[���
�\Kd�&/��L���=����9�tV��������t�k���+��� ���V�ea�z�t����5�#�������k�K��T5����v���������X��a-��@���nvA�c���|E��6v	��;~C�X~�����[��+�-}C�B�����
�<>���Ln�L��Z!!xP�J����>:F���{p`�f/�2"
4�����d��gU�3�w��-�Za'���o6u�����`/�v���Z�t��
Z-�P��aOe�N����J�p�d��%.k������M�����N��k�����n�vg��#���,R�����&�R::��1����Kq�������=���A=���N��Z���������h^9J4�S���T����,3x��aK��������.��c��S7���c���X�7����2W[+�AJrYm��dCf��|�Y��������
��@��V�:mV��!V��
��(d�����j���Q�n��m�VI�C�*��p8��[�����l�Q��A�M/�+��N�4V6j�S���H	B���e�0O��
P��5
�%aZBKYQ��N����[�a���������z���^WX��P��+��^7�JV�[�RX�a�:���19��a�����'�71]5q���F}���U��$f��b<\NN�j�H�Q�}(d��"he��8(T���i����P
gqy
����x�>���x���M��U�����J��f�V�@��iM*C��H��5J������5���r����"]�>�7���y�=X����$Vx�s�#�`�
@@S��^(7�r*�	�������O����	��g�?�S�3(��A�	
&6��wY��Z-���sM�>!��t9���������b���Jf�B�5OX%6�[�0����s+�q^�&�B�BJ��6�ug�d��y�P���o�b2xQ	MN�(������%d���a3-~�Zi�?F=�*��
������}��U�O���|#�6�|9.���	4>L��'�1����vI%�9������#0S��X����y=pC�H�8�Cw|2nH��
�m��8��TEx�����fM�P���q!~�}4���:9�=:�C�?P�*���f7s�kfa_���b��>4������I�q�*Z�+�:mX��>{�(-�����������'�e����J����1�(�jb ��M��L�C�"v���0��	���e6}���	e~��+A���'c`��,c9'������ jv,�[4��
oF3�Z� �
��d�z���0�OJ'�s:Ie�5[��a�QU�����r��>����R�~��f�-�k���A�V3!��}�D�����`E��w0�h�4�(�YG
����<^R��,�*���)�M�����9������������I�Me�F��{�1�[*�qU}���~BnM����]K�_.ym#f%��%����Z[��-56����M����?��7���	���8H�}�=XsJ.H�?��7��Q�g��+�����O�gq�<tJ�	����X+C5�<�E�R�4��l�����u��mn6����I�.�.Y�������RJ��(C�41��lp��e*^03�Hj����P0H����; aD�W>'��Y�����/�h�`m�n�����Z`�1������%��q�W�X��3����>T��2�&����o	I!��r�j~����n6aw�d�m���~[o
�
~6�0��Rl��������?'3f��o�<."P�1.N���@���g��iS��X��� S,��N�n(�A��)?S��g���-�"�������\���Oa�������n����O�w�{;��T�q��0`0="��*i����.�pO$��~2K!�H���j���N�<��*N�|�lw��������Z�UM+��O��v�Y�#g������������b��x��H��Q[kn���{�;����q�N @�����`?]�J|�zy����h���*���9uM���W�w����O�L��85=�������f!�"���i����w�Q��J�P4�Q�������1�=��-D������y�?�4�R��%��"`��o��
�,�UD��A]\%�����,��!����ctPA�44gyh�Z���"��'��u��0���MZ'j��T��e�xgz������.D[`]{T�
V+�M��	X&���e"y�pI�Z�<\z�kI�G��#�P�@L@��B�R��bF���9��������v[�@�E�Q.��to�h3�4�J+u�A��ma ��h�P�v�g���x���]P��dCGn7������lp�Y�KCw���N��I����u7]�����;�bo��Ys����`7���l7�����rgfe?�p�3�C?��e�|?����"�D��k:i�k'�R!4�Y�a���^�;����<���t�r#I"`�SL�����yFSL���YA/�{�e��:)&w�D��u��LTL�����f�����!G��%�O�<%te�s�Ts�	���i6B"�?p�)
�v���oS��F��t��o��>l���b�����!�0qM�3�M��#�!����[��~y������+C�R�����3�Q������h���s4�Kf
8�b^�>9��e5
9���4�9���5�8���5�8��e6�M	�q���s��s����b��~�@G���8�&��
��^����\��F��Z�S�q���j�5�WcqC�D <
�L����f$��Z��M_aK���V�y,m��z���5�EK�0��B�JC����R���Pt���8F���Vwi��[\|�A3M���f���j7��K3���j��!:�au���Y���]��3�i�w�V��e!NT����C�n�N����;a�u�XM�	��*��y;�<���*yh��wE�N=h�����/��(�$����?�J/�nu
��������=���:����|���6\�j��)t��#
�����Bw:>�������)t��#{
eN���Bw==���]��)t'L��BwBg�)��8�|�L���xZ��~�Hkp������i�w��b���%���(�z��{����\�+c���n����J�fff0�������~���{�u("������ oc��nL�
��Ml:$d2�'���&�G���mQS8��G����%n�����]��nc]�X���
s��Tc�;@6xWY)WY�1
Y)'�G
�x+�+����!���g�L^��o������d���
�-�c�K�n�����D�M�,Rj�Xb
l�`{oE��F����kz�9�I7�4��l �B��gY��d2�@&?LMb��'�R�x���Ih+;��N��"]$s��i�d�!��#�S���7����?W��9����Ij����uO��IE��\
�S��=Y$OF�E\���&�@�gq�j��5�����AX�	W|�������}�����;��A�),C.Q��8��./M�sU�XhLY���9��|s��{��� l��J6D�+�V:�$mWZ��rE�0�.+���NY!)�V*��RF.��Vd����JZbeXV����rJ(l�R2_�,+�D�JX�FdK�AIda�B(�+,])O������h�
�4�.�v���e��tHTa�������$��*��f~�]U),�g��M�v^��R;o���;�|C9[o����W����+]O��J7��z��`�^����^�B,o����+]	��X����[�r���Rj��.���JWAn�V���p�V����@�&��@F�{b8��P�[�����D'F�5��s���r�s����-�,��xT}!����G�����C����j'�s�����9�X=����VK�����x��x[�l��oK�W2:����mv��W��n�u�-{��~�V�m{F�oW|�$�C��9f���v�n�L��{�6����$����q��8+6����+����W�YNQ�r���-��Q<����l�(�������}�B�O���������S����>����Vh��OJ�]Bz��<�>-M�Ux�4j���6���s�n�����F�{���M��&�����@Xh�y�Mx��J�E�=�o��X$�b�XPIiG�9�_`y���\��'�WZ���������v�����(M)�l���T��k�6��M���8q��������TF��Y���'��4P�����1���������,���� +	.���/��v�-o���������gn67Ks����~�[T*��� �D���l����'?������������O�Y<�������\}������������H�m^�W�2O�_�g��*J!	�����:�,�W�|3���V���n��xwV�4.�>1�.���>1�.%����
� K����O�C�T:g�/��kk�L�m;j���4�2'�<��wNy��2}����>�tkU����EY9�zU|�	��D�*�y~��)?I���K9J-�J2/�/��`JS�Xy����4u�q/����Yv�b�;�8�c�=�q���c�a��4������m��P#�	;m7_�Ac������c@&z
����6�d��� �x��v�w
��6Y]W��[�B�J���u��0bn~�9��2��t��m0�)s��VNP/��1�5��L�Y����M�
�����"�PY��$��Q"������T�.z����V:�/�h���f������d���/��(&�1R���O��Od��������B��%�����t���t4��-���?��m[c|D����tD������Iy��j]VL����o�t�������<Y$(\�4B'c#;��P3�&$Qtz��d	;���2�nDlX+�7*�����"V�tm��l��%����	�	���a)�����H�A�0$\�a"��f���h���(cFT�����,��(�?m�;�Rj���J-T]V*R���0������Ht��X�?���e�j�'�-��%S4H�yf
t�J��\������`Hg��!5V�������nj����"�>
�fs_Nq�|})4GAS,	�!a����2 �ZTD��MuJ ���"8Z����%�-����;������������C����:�z�����Nf�����BT�5�_`��E<�_��{���P"]��������Ir:����6�$�K�����j�(>�����|=S���5>�L�p�O�k_���6?�w�Q���3�Og�����j�����w��{����f1@cT�m0��Y9L)G�\em��Vk��������h�!rR��x��d>JE���w��>L�ik0���4Y\���7���Bu%�1��j��W�4(�4��,�~��^�����������������[�%��B9��������U��� mu���EqY�������`�`���������
���{�<�_�h�
�J7�b����+��a�J1���X��	��.k#��	.2p��(�U+�x���\<r![9�,����[d�u�q(���zN��T�VETFeDY�IB���"ZQ�#A���k��8g��������Q�/�ZT/���g:�Z�vv�o��?�����+�(�ZA��bx���3hE9��	3�2��J��wnE���l�v�A#l��k�������* �V+���a
��	�����i=�8��[�\����[�=�q$�A#uv��*��u"}gXTt�@�vT���K��j
��@������Y�T��?�s��}��4E;����������qYXn��B� ����V�����7�P;d����J���fT�� �����G�O+9}��O��N�3?�f���Jg"��8�9�����������j��!��rY���e�
q����e��fT&���������b�5�-���R��j7����Q�2������<���#b
]6���`����Zk\�N �*_��U�/.�Q
fW��'3Y�|-�"5�P�E��U����?�7��)�&*1������g@����
������|�7��u%W������,u�I�+.�3�N��5w��#����M�QW{��lu6��������yk3l����Nu,����y����c��zHYg���4�����<���cw+�6��8�9����q������c�
Lq�<�#���v�r��
�m�v�)�F#�4�h��c����������O�w�w��eZv�]�9���^��=r��j�������N�2�������.cz�t�(����ZJ'y��Hg��v%��`����2	+8
%��/�Y��������5q��3-@���taA�;YHWqY
50t���*%�F��^^i��^�x�T��?�J��	��P��U����r��>�F^@���V	�Un������\����r��d0=_�>]��U�u�����=�2�����a�����������S��uK�f�q�E��J�����~�m�^���d8JS@�t(��"YNFb���oc�M����	�m����-��d:��d�{u1X`��������/�N�v+�~�f��*�8�G��X�c��	��z����7�ZH�9���J��dN�A��W)gk�\�_[��K��J�
�/��=���6����RY����\Z���P�M��l7O�����Ay�i�$�+���������M��6��X�;[x�5r�V��1�
��\���E�����t3���S8���)�4��Q��
Q�6<j�4���T������$��M|�v&���OU��\�l��h�;8�n-�x����5V8����+=^�%c�lX�������S>'=G��2\��+-eM��Cw�V���o#cKu7���Fi7	2��v�����&<�)���y��K*Uz�T���s9��U=HR�j���R���u����{Q�����Rl��Pe%�vY�z=oMu���|o��p�2��h��-�������SY��v����X8�o��=O�W*9q�����\%�O�>�tR����/�lR|#�� ��I�,�7�1l�s�I�h���������A����z��y��m|/��Y��E���l��r�l��h���t����S`��]T>��q��TB�����A��B����`����3~��W�bE�f^���~;�k6�8���S��������4x--�O��a����mN���}jkS�����9�6�2v�8#����s���+�hDV Hc��q<�wW�\�#�7~��E<W4��!�+9����)����D|�@V >@z`�S���E3>$��"������d��@����|��d9��
~�<B<I�+�`�+)����_]��O+�9Tp4&#s`�&4����������WS������@R����gv2����:__b��ZV%��qq<�������D�$�N	
O�+S��1�'B���?,�a��&�$���B>0���B�Gc��[��(K���D�=��f�1���t,��i��/:P�����nt�-����?��QB��lCR]4�W���}u5wX��^�:��\9�l��75���Z�F{��0C;�UtQ�������#�Z�����S@c
�8]^���Y*o�h=w��|���];LA����.��0/G�%���YOb����9�K�+��wSu:�e�B�W�����X6w�+��=��cg5C�
N���v����t����j
p�.��Z��X�X��;������r1������2���s�����=��gg�9�b���ho�����r�N]�e�lB�V��J��a��z������[�����?�k�v�R�7���{������������v�N������z�jWP����9o�!	��.�Qf�r��)r���� �[GzT�Q:z�����_m�o,�C���BYz~*�}x����c}�.����SC�n����3~��K_�p�/_��v�>:Jyk8a�������4D�^5-�5Cx��h�%m�/_N����U���H�H?�_l�$9K����/����Y&W6a��2l��#d:3*�^`E������=(��~�3���ni�G�Q��"@QW@Yq<�����O�4~�N��tv�&d�c�F?���y��/�Q�b�H�+����3g�<�{��2�ZAd���k���I�M�~T.�����O�� jwl��m�a��6y�K$3R��qY���o�m<��a�v�
�|�<h��f5t�.@�G��t���������[>=�QJ��.g�$���8�Z�4�s�V���&���]�1�(���x�6��f����c��#^���a9�����C�~�h�����?�L6q�e^R��~��Fh���"��O��Zk4�/��uv�`3y�I�>��I:m�7h��k5���e��u�9��"������U��&�O���g4�@S�DqJ�o8O���1�"�i&�O&�5DL[8��^��	e!����b�������`��(�
4���l� }S�n=A��W���_�d���=������+c�~�{��q:����n�������bd����������������M�����Xt+P��fEQ`��?�L�W3_����D[d��r��i��2��^�����+=����jT�������k�g�/�"H�y�n����������b��T
��$��?MG�|]5�j��C���UV
O�����#9��fTXT����������������N�{m�}��xF�u�g�1��([�[���	��u����wk��6Lz����Lgc��`���~�A�j��BX�������^O���Oq�-.�dM�����x;���e�n�G��1Q��l`N����Y��L�s�9?���N��
$����)7��H����OQ������Ek�<��������t�����
�@��I_�N?7�����5o�*����<�b����`*9��f�n{�CW^����a������^P+k�1�i��	"]���4����t�)F����S��I�gg���2�v�"��xL��'���I�wj��^�� ����YP�@�\����S�<��4Ev,^��BM�A��f�����"N������.3��������Os�M+7K&���|v1N/s�����q:���Y���\X���"
E
��w�;�D]�l
�2��3k���}qs��6���b�,�!����������n���W,�+�`��C���l��l-����
CJ�L-��F�6A���M������������I�'W�T��=m�~�&�k��L�E���
����d9~v�W�<+�1y�DAOY@���O�����l���n�r�R.��S�����*��R(#EV��'��`�p�"���6w�P^��mK7��4��4�����-n��;4
3u`�����n��T���_
�p�l�E�yn<��M�	��������:)A�����������b~��13m�����DT�xNz�����,C�b����o��C�/�����x��x���99�����������\].��9 Kf3�����_���Gdf��P�9@h���y���`<��.�t0"#%/��K�7��F�^l�@8V��H������������i������B������9:|U�C�m~Gmooo����|M�u'�<�^�G��E]�H;0�>'�;4��lF����l~t��q��G�u����$����y����C�v��G���yq�)�8�������&�b�W!��AI&oc6�]��Z��g]E$d����{T)�,��fY�$N	d2�����k[�^C�,��`�����>O��w����
�p�F2�D���W���Z�Z
#2Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Gavin Sherry (#1)
Re: Tablespaces

Compile error?

gmake[2]: Entering directory
`/space/1/home/chriskl/pgsql-server/src/timezone'
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes
-Wmissing-declarations -I../../src/include -c -o pgtz.o pgtz.c -MMD
In file included from ../../src/include/storage/bufmgr.h:20,
from ../../src/include/storage/bufpage.h:18,
from ../../src/include/access/htup.h:17,
from ../../src/include/tcop/dest.h:64,
from ../../src/include/utils/guc.h:17,
from pgtz.c:26:
../../src/include/storage/relfilenode.h:29: syntax error before `.'
../../src/include/storage/relfilenode.h:29: syntax error before `.'

Chris

Gavin Sherry wrote:

Show quoted text

Hi all,

Attached is my latest patch implementing tablespaces. This has all the
functionality I was planning for 7.5.

Most of the information about the patch is contained in the
patch/documentation, previous submissions and the archives.

Testing, review, comments would be greatly appreciated.

Gavin

------------------------------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

#3Neil Conway
neilc@samurai.com
In reply to: Gavin Sherry (#1)
Re: Tablespaces

Gavin Sherry wrote:

Attached is my latest patch implementing tablespaces. This has all the
functionality I was planning for 7.5.

A few minor points I happened to notice while reading through the patch:

+  * To simply initialisation and XLog activity, have create and 
maintain
+  * a symbolic link map in data/pg_tablespaces.

Grammar errors.

+ void
+ TblspcCreateDbspace(Oid tbloid)
+ {
+ #ifndef HAVE_SYMLINK
+ 	return;
+ #endif
+ 	struct stat st;
+ 	char		*dir;

If HAVE_SYMLINK is undefined, this is a syntax error (at least in
C89, which is what we ought to limit ourselves to). Similar problems
elsewhere in the same file (tablespc.c)

+ 	dir = (char *) palloc(strlen(DataDir) + 14 + 10 + 10 + 10 + 3 + 1);
+ 	sprintf(dir, "%s/pg_tablespaces/%u/%u", DataDir, tbloid,
+ 				MyDatabaseId);

Is the length of that buffer right? At the least the addition is a
little weird (why are you adding 10 three times for two numeric
variables?) I noticed another buffer allocation (linkloc) that
looked dubious at first glance as well.

+ char realnewpath[MAXPGPATH];

This is somewhat pedantic, but how do we know that MAXPGPATH >=
PATH_MAX (the minimum safe size of the second argument to
realpath(), at least on my local system)?

-Neil

#4Gavin Sherry
swm@linuxworld.com.au
In reply to: Neil Conway (#3)
1 attachment(s)
Re: Tablespaces

Attached is an updated patch, fixing a compile error which my compiler
didn't seem to detect/suffer from and incorporating fixes to problems
raised by Neil.

Thanks,

Gavin

Attachments:

tablespace-20.diff.gzapplication/x-gzip; name=tablespace-20.diff.gzDownload
#5Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Gavin Sherry (#4)
Re: Tablespaces

Just reminding someone to review this some time...it does all seem to
work very well :)

Chris

Gavin Sherry wrote:

Show quoted text

Attached is an updated patch, fixing a compile error which my compiler
didn't seem to detect/suffer from and incorporating fixes to problems
raised by Neil.

Thanks,

Gavin

------------------------------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

#6Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Christopher Kings-Lynne (#5)
Re: Tablespaces

Yes, I was wondering if it was ready for application. Tom, you want to
eyeball it?

---------------------------------------------------------------------------

Christopher Kings-Lynne wrote:

Just reminding someone to review this some time...it does all seem to
work very well :)

Chris

Gavin Sherry wrote:

Attached is an updated patch, fixing a compile error which my compiler
didn't seem to detect/suffer from and incorporating fixes to problems
raised by Neil.

Thanks,

Gavin

------------------------------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#6)
Re: Tablespaces

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Yes, I was wondering if it was ready for application. Tom, you want to
eyeball it?

I do. I'd like to get the composite-type-column stuff out of the way
first, and then I'll buckle down to reviewing patches (this one and the
other major patches in the queue...) Should be able to start on that
within a couple days.

regards, tom lane

#8Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Gavin Sherry (#4)
Re: Tablespaces

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it after review..

---------------------------------------------------------------------------

Gavin Sherry wrote:

Attached is an updated patch, fixing a compile error which my compiler
didn't seem to detect/suffer from and incorporating fixes to problems
raised by Neil.

Thanks,

Gavin

Content-Description:

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#9Dann Corbit
DCorbit@connx.com
In reply to: Bruce Momjian (#8)
Re: [pgsql-hackers-win32] Tablespaces

-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of
Zeugswetter Andreas SB SD
Sent: Friday, March 05, 2004 1:20 AM
To: jearl@bullysports.com; tswan@idigx.com
Cc: Bruce Momjian; Tom Lane; Greg Stark;
pgsql-hackers@postgresql.org; PostgreSQL Win32 port list
Subject: Re: [pgsql-hackers-win32] [HACKERS] Tablespaces

First of all, symlinks are a pretty popular "feature."

Even Windows

supports what would be needed. Second of all, PostgreSQL

will still

run on OSes without symlinks, tablespaces won't be available, but
PostgreSQL will still run. Since we are all using

PostgreSQL without

My idea for platforms that don't support symlinks would be to
simply create a tblspaceoid directory inplace instead of the
symlink (maybe throw a warning). My feeling is, that using
the same syntax on such platforms is important,
but actual distribution is not (since they will most likely
be small systems).

I know of bot SQL*Server and Oracle database systems on Win32 with
hundreds of millions of rows and many hundreds of gigabytes of space.
These are production systems, run by fortune 500 companies.

I expect that PostgreSQL systems on Win32 will have multiple 64-bit CPU
systems, with 16 gigs or so of ram, and a terabyte of disk, not long
after 7.5 is released (unless problems with PostgreSQL on that platform
turn up).

Is that what you have in mind when you say "small systems"?

I expect that one year after release, there will be ten times as many
PostgreSQL systems on Win32 as all combined versions now on UNIX flavors
(of course, that is a SWAG, but I think a sound one)

#10Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dann Corbit (#9)
Re: [pgsql-hackers-win32] Tablespaces

"Dann Corbit" <DCorbit@connx.com> writes:

I expect that one year after release, there will be ten times as many
PostgreSQL systems on Win32 as all combined versions now on UNIX flavors

I surely hope not. Especially not multi-gig databases. The folks
running those should know better than to use Windows, and if they
do not, I'll be happy to tell them so.

regards, tom lane

#11Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Tom Lane (#10)
Re: [pgsql-hackers-win32] Tablespaces

Tom Lane wrote:

"Dann Corbit" <DCorbit@connx.com> writes:

I expect that one year after release, there will be ten times as many
PostgreSQL systems on Win32 as all combined versions now on UNIX flavors

I surely hope not. Especially not multi-gig databases. The folks
running those should know better than to use Windows, and if they
do not, I'll be happy to tell them so.

Admins often don't have a choice, but a company strategy to use win
only. Deciding on the platform before examining the app's requirements
is always a bad idea, but that's what happens. Respecting this,
suggesting "don't use win32 for high performance pgsql databasing" is
equivalent to "don't use pgsql".

Regards,
Andreas

#12Zeugswetter Andreas SB SD
ZeugswetterA@spardat.at
In reply to: Andreas Pflug (#11)
Re: Tablespaces

With the rule system and two underlying tables one could make it work by
hand I think.

The rule system could be used to do this, but there was some discussion of
using inherited tables to handle it. However neither handles the really hard
part of detecting queries that use only a part of the table and taking that
into account in generating the plan.

I think the consensus should be to add smarts to the planner to include
static constraint information to reduce table access.

e.g if you have a constraint "acol integer, check acol < 5"
and you have a query with a "where acol = 10" you could reduce that
to "where false". This would help in all sorts of situations not only
partitioned/inherited tables. I am not sure what the runtime cost of
such an inclusion would be, so maybe it needs smarts to only try in certain
cases ?

Andreas

#13Greg Stark
gsstark@mit.edu
In reply to: Zeugswetter Andreas SB SD (#12)
Re: Tablespaces

"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:

e.g if you have a constraint "acol integer, check acol < 5"
and you have a query with a "where acol = 10" you could reduce that
to "where false".

I think part of the question is how much work do you put into checking this.
Checking constant known values like above is probably not too expensive.
Checking for ranges like "where acol between 5 and 10" is probably doable. And
that might be enough for partitioned tables. I think that's about all Oracle
bothers to check, for example. More complex where clauses and check
expressions might be hard to prove are true or false.

But then the work's still not done, you still have to add an optimization that
prunes members of a UNION ALL (or equivalent if it's done using inherited
tables or some other infrastructure) if they are known to provably produce
zero rows.

And then there are more subtle cases. Like if the query is "where acol = ?".
Then you know it only has to read one partition, but you don't know which one
at compile time. And it's important to handle that case because that might be
the only clause. So knowing that you only need one partition might be the
difference between a sequential scan of one partition, or an index scan of
many thousands of records because they're only a small percentage of the
entire table.

--
greg

#14Noname
pgsql@mohawksoft.com
In reply to: Tom Lane (#10)
Re: [pgsql-hackers-win32] Tablespaces

"Dann Corbit" <DCorbit@connx.com> writes:

I expect that one year after release, there will be ten times as many
PostgreSQL systems on Win32 as all combined versions now on UNIX flavors

I surely hope not. Especially not multi-gig databases. The folks
running those should know better than to use Windows, and if they
do not, I'll be happy to tell them so.

This is a prejudice that we should try to avoid. Yes, Windows is lacking
on so many levels, but that really isn't the point.

A good box running Win2K or XP Server, with no internet connectivity, and
no user applications, can really perform and be reliable. Would I choose
this? Hell no, but there are HUGE amount of people who either don't know
any better or have no real choice.

The REAL bonus here is getting PostgreSQL in their hands. Right now, for
the small to medium business running Windows, Microsoft has a virtual lock
with SQL Server. SQL Server is expensive and a real PAIN.

Giving Windows users PostgreSQL with a good set of .NET, ODBC, and JDBC
drivers loosens the Microsoft stranglehold, just a little bit. If they
develop their application with MSSQL, there is a good chance it will never
use any open source software and always run on Windows. If they develop
their application using PostgreSQL, there is a better likelyhood that
other open source projects will be used, AND that should the requirement
be to upgrade the system, a wider range of OS and hardware options will
present themselves.

#15Dann Corbit
DCorbit@connx.com
In reply to: Noname (#14)
Re: [pgsql-hackers-win32] Tablespaces

-----Original Message-----
From: pgsql@mohawksoft.com [mailto:pgsql@mohawksoft.com]
Sent: Friday, June 11, 2004 9:39 AM
To: Tom Lane
Cc: Dann Corbit; Zeugswetter Andreas SB SD;
jearl@bullysports.com; tswan@idigx.com; Bruce Momjian; Greg
Stark; pgsql-hackers@postgresql.org; PostgreSQL Win32 port list
Subject: Re: [pgsql-hackers-win32] [HACKERS] Tablespaces

"Dann Corbit" <DCorbit@connx.com> writes:

I expect that one year after release, there will be ten

times as many

PostgreSQL systems on Win32 as all combined versions now on UNIX
flavors

I surely hope not. Especially not multi-gig databases. The folks
running those should know better than to use Windows, and

if they do

not, I'll be happy to tell them so.

I know better than to tell people to change their operating system.
Linux is a great OS, and people familiar with it will do exceedingly
well. But there are 40 million computers sold in a year, most of which
have some flavor of Windows installed. People know how to use and
administer them, and they have all their applications in Windows. They
are not going to change for ideological reasons. Also, it isn't just
DBAs that need to implement database systems. Suppose, for instance,
that I want to write an accounting package. I can use PostgreSQL as a
base and save my customers thousands of dollars. If I tell them, "Now,
you need to reformat your machine and install Linux" that would not be
very popular. But they don't even need to know about the database. And
they should not have to care about the OS. A database and an operating
system are both things to help get work done. Believe it or not, lots
of large companies depend on Windows OS.

Personally, I am technology neutral. My position is "use whatever you
like."

This is a prejudice that we should try to avoid. Yes, Windows
is lacking on so many levels, but that really isn't the point.

Every OS has advantages and disadvantages. The applications for Windows
are many and mature. The tool sets available for Linux are extensive
and usually free. If you want real 24x7x365.25 then MVS cannot be beat.
The file versioning and protections of OpenVMS are something that all
operating systems should have modeled.

A good box running Win2K or XP Server, with no internet
connectivity, and no user applications, can really perform
and be reliable. Would I choose this? Hell no, but there are
HUGE amount of people who either don't know any better or
have no real choice.

And there are knowledgeable people who understand Windows, Linux and
many other operating systems who choose Windows because it is the best
choice for their company.

The REAL bonus here is getting PostgreSQL in their hands.
Right now, for the small to medium business running Windows,
Microsoft has a virtual lock with SQL Server. SQL Server is
expensive and a real PAIN.

It is expensive and a multi-user system ramps the cost. But it is
easier to administer than PostgreSQL. Hopefully, autovacuum will remove
most of this discrepancy.

Giving Windows users PostgreSQL with a good set of .NET,
ODBC, and JDBC drivers loosens the Microsoft stranglehold,
just a little bit. If they develop their application with
MSSQL, there is a good chance it will never use any open
source software and always run on Windows. If they develop
their application using PostgreSQL, there is a better
likelyhood that other open source projects will be used, AND
that should the requirement be to upgrade the system, a wider
range of OS and hardware options will present themselves.

Microsoft dominates because they offer real value (the world is not
completely full of idiot CEOs -- they make decisions based on profit).
The open source community is closing the gap, but it has a long way to
go. I don't see Microsoft as the dark side of the force or anything.
Actually, the approach of PostgreSQL and ACE is (too me) the most
superior. The GPL approach is far too confining, and getting a black
box that will be a terrible mystery if it breaks are not nearly so
pleasant.

Instead of telling people how to do their jobs, I suggest the approach
of providing the best possible tools and letting them decide how to use
them.

#16Noname
pgsql@mohawksoft.com
In reply to: Dann Corbit (#15)
Re: [pgsql-hackers-win32] Tablespaces

-----Original Message-----
From: pgsql@mohawksoft.com [mailto:pgsql@mohawksoft.com]
Sent: Friday, June 11, 2004 9:39 AM
To: Tom Lane
Cc: Dann Corbit; Zeugswetter Andreas SB SD;
jearl@bullysports.com; tswan@idigx.com; Bruce Momjian; Greg
Stark; pgsql-hackers@postgresql.org; PostgreSQL Win32 port list
Subject: Re: [pgsql-hackers-win32] [HACKERS] Tablespaces

"Dann Corbit" <DCorbit@connx.com> writes:

I expect that one year after release, there will be ten

times as many

PostgreSQL systems on Win32 as all combined versions now on UNIX
flavors

I surely hope not. Especially not multi-gig databases. The folks
running those should know better than to use Windows, and

if they do

not, I'll be happy to tell them so.

I know better than to tell people to change their operating system.
Linux is a great OS, and people familiar with it will do exceedingly
well. But there are 40 million computers sold in a year, most of which
have some flavor of Windows installed.

How many billions of cigarettes are sold? How many Big Macs? Popularity
does not imply quality or safety.

People know how to use and
administer them, and they have all their applications in Windows. They
are not going to change for ideological reasons.

This is interesting, since when is ideology *not* the american way? Have
you looked at politics lately?

Also, it isn't just
DBAs that need to implement database systems. Suppose, for instance,
that I want to write an accounting package. I can use PostgreSQL as a
base and save my customers thousands of dollars. If I tell them, "Now,
you need to reformat your machine and install Linux" that would not be
very popular. But they don't even need to know about the database. And
they should not have to care about the OS. A database and an operating
system are both things to help get work done. Believe it or not, lots
of large companies depend on Windows OS.

I've been in the trenches for a while now, and I haven't met a single CIO
that is comfortable with Windows. They hate the cost, they hate the
viruses, they hate the instability. The only thing they hate more is being
isolated on an island. Fortunately Linux is becoming less obscure.

Personally, I am technology neutral. My position is "use whatever you
like."

I would call myself "neutral" to a point, but when I have to give advice,
I have to tell the truth. A little Linux goes a long way.

This is a prejudice that we should try to avoid. Yes, Windows
is lacking on so many levels, but that really isn't the point.

Every OS has advantages and disadvantages.

Some more than other.

The applications for Windows
are many and mature. The tool sets available for Linux are extensive
and usually free. If you want real 24x7x365.25 then MVS cannot be beat.
The file versioning and protections of OpenVMS are something that all
operating systems should have modeled.

A good box running Win2K or XP Server, with no internet
connectivity, and no user applications, can really perform
and be reliable. Would I choose this? Hell no, but there are
HUGE amount of people who either don't know any better or
have no real choice.

And there are knowledgeable people who understand Windows, Linux and
many other operating systems who choose Windows because it is the best
choice for their company.

I seriously do not know anyone, including myself, that would choose
Windows on technical merrits alone. I know some need to choose it for
"killer" application requirements, but not on merrit.

As for best choice for their company, I can't even say that with a
straight face.

The REAL bonus here is getting PostgreSQL in their hands.
Right now, for the small to medium business running Windows,
Microsoft has a virtual lock with SQL Server. SQL Server is
expensive and a real PAIN.

It is expensive and a multi-user system ramps the cost. But it is
easier to administer than PostgreSQL. Hopefully, autovacuum will remove
most of this discrepancy.

Having dealt with both, as well as MySQL, DB2, and Oracle, I not sure I
agree with that statement. As long as MSSQL is installed correctly the
first time, it may be OK.

Giving Windows users PostgreSQL with a good set of .NET,
ODBC, and JDBC drivers loosens the Microsoft stranglehold,
just a little bit. If they develop their application with
MSSQL, there is a good chance it will never use any open
source software and always run on Windows. If they develop
their application using PostgreSQL, there is a better
likelyhood that other open source projects will be used, AND
that should the requirement be to upgrade the system, a wider
range of OS and hardware options will present themselves.

Microsoft dominates because they offer real value (the world is not
completely full of idiot CEOs -- they make decisions based on profit).

FACT: Microsoft dominates because they break the law.

The open source community is closing the gap, but it has a long way to
go. I don't see Microsoft as the dark side of the force or anything.

Then you have not had your company stomped on by them. You have not worked
on technologies like "Go Computing."

Actually, the approach of PostgreSQL and ACE is (too me) the most
superior. The GPL approach is far too confining, and getting a black
box that will be a terrible mystery if it breaks are not nearly so
pleasant.

GPL vs BSD is a long debate.

Instead of telling people how to do their jobs, I suggest the approach
of providing the best possible tools and letting them decide how to use
them.

We should provide people with the right tools, true, but we are bound by
our conscience to inform them about Windows' failures.

#17Dann Corbit
DCorbit@connx.com
In reply to: Noname (#16)
Re: [pgsql-hackers-win32] Tablespaces

-----Original Message-----
From: pgsql@mohawksoft.com [mailto:pgsql@mohawksoft.com]
Sent: Friday, June 11, 2004 1:37 PM
To: Dann Corbit
Cc: Tom Lane; Zeugswetter Andreas SB SD;
jearl@bullysports.com; tswan@idigx.com; Bruce Momjian; Greg
Stark; pgsql-hackers@postgresql.org; PostgreSQL Win32 port list
Subject: RE: [pgsql-hackers-win32] [HACKERS] Tablespaces

-----Original Message-----
From: pgsql@mohawksoft.com [mailto:pgsql@mohawksoft.com]
Sent: Friday, June 11, 2004 9:39 AM
To: Tom Lane
Cc: Dann Corbit; Zeugswetter Andreas SB SD; jearl@bullysports.com;
tswan@idigx.com; Bruce Momjian; Greg Stark;
pgsql-hackers@postgresql.org; PostgreSQL Win32 port list
Subject: Re: [pgsql-hackers-win32] [HACKERS] Tablespaces

"Dann Corbit" <DCorbit@connx.com> writes:

I expect that one year after release, there will be ten

times as many

PostgreSQL systems on Win32 as all combined versions

now on UNIX

flavors

I surely hope not. Especially not multi-gig databases.

The folks

running those should know better than to use Windows, and

if they do

not, I'll be happy to tell them so.

I know better than to tell people to change their operating system.
Linux is a great OS, and people familiar with it will do

exceedingly

well. But there are 40 million computers sold in a year, most of
which have some flavor of Windows installed.

How many billions of cigarettes are sold? How many Big Macs?
Popularity does not imply quality or safety.

Right. It implies volume. That was the only point I was making. If
everyone is wearing suede shoes, you will have trouble selling shoe
polish.

People know how to use and
administer them, and they have all their applications in Windows.
They are not going to change for ideological reasons.

This is interesting, since when is ideology *not* the
american way? Have you looked at politics lately?

I am also politically neutral and have not voted since I was 18 as a
matter of conscience.

Also, it isn't just
DBAs that need to implement database systems. Suppose, for

instance,

that I want to write an accounting package. I can use

PostgreSQL as a

base and save my customers thousands of dollars. If I tell them,
"Now, you need to reformat your machine and install Linux"

that would

not be very popular. But they don't even need to know about the
database. And they should not have to care about the OS.

A database

and an operating system are both things to help get work done.
Believe it or not, lots of large companies depend on Windows OS.

I've been in the trenches for a while now, and I haven't met
a single CIO that is comfortable with Windows. They hate the
cost, they hate the viruses, they hate the instability. The
only thing they hate more is being isolated on an island.
Fortunately Linux is becoming less obscure.

Personally, I am technology neutral. My position is "use

whatever you

like."

I would call myself "neutral" to a point, but when I have to
give advice, I have to tell the truth. A little Linux goes a long way.

For me, if I was going to start a company, Linux is a technically
superior solution for a server in my view. This is especially true due
to license reasons. If I want a thousand users on a machine, the cost
for a Windows solution dwarfs any reasons I can think of not to switch
to Linux. However, if a company does not have personnel trained to
administrate Linux machines and applications, then something else might
be a better choice for them. ("Fire all your workers and hire new
ones." does not work)

This is a prejudice that we should try to avoid. Yes, Windows is
lacking on so many levels, but that really isn't the point.

Every OS has advantages and disadvantages.

Some more than other.

And yet each choice can have different weights depending upon who is
using it, for what reasons, and other business factors.

The applications for Windows
are many and mature. The tool sets available for Linux are

extensive

and usually free. If you want real 24x7x365.25 then MVS cannot be
beat. The file versioning and protections of OpenVMS are something
that all operating systems should have modeled.

A good box running Win2K or XP Server, with no internet

connectivity,

and no user applications, can really perform and be

reliable. Would I

choose this? Hell no, but there are HUGE amount of people

who either

don't know any better or have no real choice.

And there are knowledgeable people who understand Windows,

Linux and

many other operating systems who choose Windows because it

is the best

choice for their company.

I seriously do not know anyone, including myself, that would
choose Windows on technical merrits alone. I know some need
to choose it for "killer" application requirements, but not on merrit.

Religious arguments are hard to fight when one person is unable to
listen.

As for best choice for their company, I can't even say that
with a straight face.

Then for those customers for which it is the best choice, you would give
them bad advice.

The REAL bonus here is getting PostgreSQL in their hands.

Right now,

for the small to medium business running Windows, Microsoft has a
virtual lock with SQL Server. SQL Server is expensive and a real
PAIN.

It is expensive and a multi-user system ramps the cost. But it is
easier to administer than PostgreSQL. Hopefully, autovacuum will
remove most of this discrepancy.

Having dealt with both, as well as MySQL, DB2, and Oracle, I
not sure I agree with that statement. As long as MSSQL is
installed correctly the first time, it may be OK.

It is the easiest of those database systems you named to install and
administrate.

Giving Windows users PostgreSQL with a good set of .NET, ODBC, and
JDBC drivers loosens the Microsoft stranglehold, just a

little bit.

If they develop their application with MSSQL, there is a

good chance

it will never use any open source software and always run

on Windows.

If they develop their application using PostgreSQL, there

is a better

likelyhood that other open source projects will be used, AND
that should the requirement be to upgrade the system, a wider
range of OS and hardware options will present themselves.

Microsoft dominates because they offer real value (the world is not
completely full of idiot CEOs -- they make decisions based

on profit).

FACT: Microsoft dominates because they break the law.

FACT: Every blanket statement is an over-generalization.
;-)

Microsoft has done some very seedy and evil things. The destruction of
STAK comes to mind. As far as domination by giving things away, that is
ludicrous. You can download Linux and most Linux applications for
nothing. In essense, they give everything away (really, you are buying
service when you purchase a Linux CD) and MS has to compete with 'free'
-- not just for the tack-on stuff but for the entire system and all the
applications. It shows you how well done some of their stuff is, that
it can compete in that arena.

The open source community is closing the gap, but it has a

long way to

go. I don't see Microsoft as the dark side of the force or

anything.

Then you have not had your company stomped on by them.

I have had to deal with many things that were unpleasant and caused
directly by MS doing something strange or bad. I have lost days of work
because of it.

You
have not worked on technologies like "Go Computing."

I don't even know what 'Go Computing' is, so you are right about that
one.

Actually, the approach of PostgreSQL and ACE is (too me) the most
superior. The GPL approach is far too confining, and

getting a black

box that will be a terrible mystery if it breaks are not nearly so
pleasant.

GPL vs BSD is a long debate.

Clearly won by BSD for me (no contest whatsoever), and others like GPL
better.

Instead of telling people how to do their jobs, I suggest

the approach

of providing the best possible tools and letting them decide how to
use them.

We should provide people with the right tools, true, but we
are bound by our conscience to inform them about Windows' failures.

It must be nice to be young and still see everything as black and white
with no shades of gray. For those who think that Windows should be
canned, Gates should be burned at the stake, and Linux should rule the
world, I have no problem with their opinions. We all get to choose what
we like and dislike. I think that the typical Linux fan is WAY over the
top both in seeing the advantages with rose colored glasses and turing
opposition molehills into mountains. But passion is good, and I like to
see it. If it were not for the passion of the Linux crowd, there would
be a far less interesting competitor for MS and a far less interesting
toolset to use with it.

Maybe the thread should go to some advocacy channel at this point.

My reason for jumping in was to show that:
1. PostgreSQL will have a exponential leap in possible sites when it
opens up to Win32 systems
2. There will be huge installations on Win32 systems, like it or not.

Some other things to keep in mind:
1. The average Windows user is far, far less computer saavy than a
Linux (or other flavor of UNIX user) and hence, there will be a big load
of "deer in the headlights" users coming on board.
2. On the plus side, there are millions of good developers familiar
with Windows. Some of these may become involved with the PostgreSQL
project and give added value.

#18Dann Corbit
DCorbit@connx.com
In reply to: Dann Corbit (#17)
Re: [pgsql-hackers-win32] Tablespaces

-----Original Message-----
From: pgsql@mohawksoft.com [mailto:pgsql@mohawksoft.com]
Sent: Friday, June 11, 2004 2:41 PM
To: Dann Corbit
Cc: pgsql-hackers@postgresql.org; PostgreSQL Win32 port list
Subject: RE: [pgsql-hackers-win32] [HACKERS] Tablespaces

[snip]

Microsoft has harmed the computing industry more than any
single factor that I can remember. I've seen a lot of it,
from DEC to Wang, and microsoft has single handedly wiped out
more computing innovation in 20 years than any 10 other companies.

Stac, Go Computing, Netscape, BeOS, and the list grows for as
long as you think about it.

Netscape and BeOS are still around. I think Linux is a bigger blow to
BeOS than MS.
Stak was unbelievable and MS got a tap on the wrist compared to the harm
caused.
I will have to look up Go Computing to see what all that is about.

It isn't wide eyes passion, I've programed computers since jr
high school, on a PDP-8/e. It is what I love to do, and it is
what I make my living doing.

Some things are important in life. Spending a few extra
dollars *NOT* going to Walmart is one small thing you can do
to improve the world. Taking advantage of every LEGITIMATE
opportunity to move a person or project off Windows is one
small step one can do to improve our industry.

If they are moved to another platform for their benefit or for the right
reasons there is nothing wrong with it. If it is because of your own
ideology and not for the benefit of the client then it is harm to them
and immoral. IMO-YMMV

Maybe the thread should go to some advocacy channel at this point.

Yes.

My reason for jumping in was to show that:
1. PostgreSQL will have a exponential leap in possible

sites when it

opens up to Win32 systems 2. There will be huge installations on
Win32 systems, like it or not.

Some other things to keep in mind:
1. The average Windows user is far, far less computer saavy than a
Linux (or other flavor of UNIX user) and hence, there will be a big
load of "deer in the headlights" users coming on board.

Total koolaid induced delusion. Dumb users are dumb users,
"deer in the headlights" looks come from flashing VCR clocks.
Competent professionals can handle a few twists. The switch
from DOS Windows (3x,9x,ME) to XP was just as traumatic.

You are totally wrong about that. 'Dumb users' are people who don't
care to become computer saavy. Often because they don't need to.
Someone who can't program their VCR may be able to do brain surgery on
you. Like Will Rogers said, "Everyone is ignorant, only in different
areas." If people don't want to become computer experts, we should not
try to force them to become so. You and I enjoy computers but other
people just want what the computer can deliver and don't care to learn
how it got there.

2. On the plus side, there are millions of good developers

familiar

with Windows. Some of these may become involved with the

PostgreSQL

project and give added value.

Having been a Windows developer since version 1.03, with DOS
and CP/M before that, I can say with complete authority that
most Windows developers are not "good." The worst I've seen
is Charles Petzold, and he sets the bar.

Charles Petzold is a decent programmer. I have read his books and he
knows what he's talking about. He no W. Richard Stevens or Donald
Knuth, but I would hire him to do a job.

#19Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Dann Corbit (#18)
Re: [pgsql-hackers-win32] Tablespaces

pgsql@mohawksoft.com wrote:

We should provide people with the right tools, true, but we
are bound by our conscience to inform them about Windows' failures.

It must be nice to be young and still see everything as black and white
with no shades of gray.

I wouldn't call 41 very young.

For those who think that Windows should be
canned, Gates should be burned at the stake, and Linux should rule the
world, I have no problem with their opinions. We all get to choose what
we like and dislike. I think that the typical Linux fan is WAY over the
top both in seeing the advantages with rose colored glasses and turing
opposition molehills into mountains. But passion is good, and I like to
see it. If it were not for the passion of the Linux crowd, there would
be a far less interesting competitor for MS and a far less interesting
toolset to use with it.

Actually, I am not a wide eyed passionate Linux zealot. Like my support
for John Kerry, I gladly choose the better side of mediocrity over extream
evil, it is nothing more than pure practicality.

Well, call me extreme evil too. Then I guess PostgreSQL is partly pure
evil, or partly extreme evil, or something like that.

Of course, if you meet me, I don't appear so. We are taught to hide our
evil so effectively.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#20Noname
pgsql@mohawksoft.com
In reply to: Dann Corbit (#17)
Re: [pgsql-hackers-win32] Tablespaces

We should provide people with the right tools, true, but we
are bound by our conscience to inform them about Windows' failures.

It must be nice to be young and still see everything as black and white
with no shades of gray.

I wouldn't call 41 very young.

For those who think that Windows should be
canned, Gates should be burned at the stake, and Linux should rule the
world, I have no problem with their opinions. We all get to choose what
we like and dislike. I think that the typical Linux fan is WAY over the
top both in seeing the advantages with rose colored glasses and turing
opposition molehills into mountains. But passion is good, and I like to
see it. If it were not for the passion of the Linux crowd, there would
be a far less interesting competitor for MS and a far less interesting
toolset to use with it.

Actually, I am not a wide eyed passionate Linux zealot. Like my support
for John Kerry, I gladly choose the better side of mediocrity over extream
evil, it is nothing more than pure practicality.

A diversity of platforms in the market place creates jobs, increased
security (any particular exploit does not wipe out a vast majority of
targets.), and feeds innovation and competition.

Microsoft has harmed the computing industry more than any single factor
that I can remember. I've seen a lot of it, from DEC to Wang, and
microsoft has single handedly wiped out more computing innovation in 20
years than any 10 other companies.

Stac, Go Computing, Netscape, BeOS, and the list grows for as long as you
think about it.

It isn't wide eyes passion, I've programed computers since jr high school,
on a PDP-8/e. It is what I love to do, and it is what I make my living
doing.

Some things are important in life. Spending a few extra dollars *NOT*
going to Walmart is one small thing you can do to improve the world.
Taking advantage of every LEGITIMATE opportunity to move a person or
project off Windows is one small step one can do to improve our industry.

Maybe the thread should go to some advocacy channel at this point.

Yes.

My reason for jumping in was to show that:
1. PostgreSQL will have a exponential leap in possible sites when it
opens up to Win32 systems
2. There will be huge installations on Win32 systems, like it or not.

Some other things to keep in mind:
1. The average Windows user is far, far less computer saavy than a
Linux (or other flavor of UNIX user) and hence, there will be a big load
of "deer in the headlights" users coming on board.

Total koolaid induced delusion. Dumb users are dumb users, "deer in the
headlights" looks come from flashing VCR clocks. Competent professionals
can handle a few twists. The switch from DOS Windows (3x,9x,ME) to XP was
just as traumatic.

2. On the plus side, there are millions of good developers familiar
with Windows. Some of these may become involved with the PostgreSQL
project and give added value.

Having been a Windows developer since version 1.03, with DOS and CP/M
before that, I can say with complete authority that most Windows
developers are not "good." The worst I've seen is Charles Petzold, and he
sets the bar.

Show quoted text
#21Scott Marlowe
smarlowe@qwest.net
In reply to: Dann Corbit (#15)
Re: [pgsql-hackers-win32] Tablespaces

On Fri, 2004-06-11 at 11:29, Dann Corbit wrote:

-----Original Message-----
From: pgsql@mohawksoft.com [mailto:pgsql@mohawksoft.com]
Sent: Friday, June 11, 2004 9:39 AM
To: Tom Lane
Cc: Dann Corbit; Zeugswetter Andreas SB SD;
jearl@bullysports.com; tswan@idigx.com; Bruce Momjian; Greg
Stark; pgsql-hackers@postgresql.org; PostgreSQL Win32 port list
Subject: Re: [pgsql-hackers-win32] [HACKERS] Tablespaces

"Dann Corbit" <DCorbit@connx.com> writes:

I expect that one year after release, there will be ten

times as many

PostgreSQL systems on Win32 as all combined versions now on UNIX
flavors

I surely hope not. Especially not multi-gig databases. The folks
running those should know better than to use Windows, and

if they do

not, I'll be happy to tell them so.

I know better than to tell people to change their operating system.
Linux is a great OS, and people familiar with it will do exceedingly
well. But there are 40 million computers sold in a year, most of which
have some flavor of Windows installed.

I think the more important part of Tom's point isn't that Windows in
general sucks (even though it does) but that PostgreSQL ON Windows is a
brand new thing, and if you're willing to put a multi-gig ERP system on
it and bet the company, you shouldn't be in a data center, because right
now it simply hasn't been tested enough.

Now, setting up a unix box with postgresql for production and becoming a
part of the windows testing effort in your spare time, until Windows
proves itself ready and worthy, that makes sense.

I'm no fan of microsoft or Bill Gates, for the reasons mentioned in
books like "The Microsoft Files". But my main objection to putting a
PostgreSQL on Windows server online right now would be the same one I
would have against putting a MS SQL server on Windows online right now,
neither one has ever been proven reliable. :-)

#22Andrew Dunstan
andrew@dunslane.net
In reply to: Noname (#20)
Re: [pgsql-hackers-win32] Tablespaces

pgsql@mohawksoft.com wrote:

Actually, I am not a wide eyed passionate Linux zealot. Like my support
for John Kerry, I gladly choose the better side of mediocrity over extream
evil, it is nothing more than pure practicality.

I don't like dubya either, but he isn't extreme evil. This sort of
argument is over the top, and the analogy is out of place. You ought to
know by now that there is almost no correlation between technological
views and political views (e.g. many FOSS advocates have politics that
are anaethema to me). So let's leave the politics out of it. In fact,
let's get on with doing actual work.

cheers

andrew

#23Noname
pgsql@mohawksoft.com
In reply to: Dann Corbit (#18)
Re: [pgsql-hackers-win32] Tablespaces

Having been a Windows developer since version 1.03, with DOS
and CP/M before that, I can say with complete authority that
most Windows developers are not "good." The worst I've seen
is Charles Petzold, and he sets the bar.

Charles Petzold is a decent programmer. I have read his books and he
knows what he's talking about. He no W. Richard Stevens or Donald
Knuth, but I would hire him to do a job.

Funny story. In Windows 2.x days, a bug was found in Petzolds calculator
example having to do with the stupid way Win16 dealt with various aspects
of Window properties such as hMenu. When I read the book, I had been
programming in Windows 1.x and early 2.x, and thought to myself, "that's
not right."

Well, it turns out that it was a bug that broke a lot of Windows program
when Win 3.0 came out in standard mode.

#24Greg Stark
gsstark@mit.edu
In reply to: Dann Corbit (#15)
Re: [pgsql-hackers-win32] Tablespaces

-----Original Message-----
From: pgsql@mohawksoft.com [mailto:pgsql@mohawksoft.com]

I surely hope not. Especially not multi-gig databases. The folks running
those should know better than to use Windows, and if they do not, I'll
be happy to tell them so.

You know, it makes you wonder. Tom must not have enough work to do if he's so
bored that he wants to spice up the postgres mailing lists this way :)

--
greg

#25Noname
pgsql@mohawksoft.com
In reply to: Greg Stark (#24)
Re: [pgsql-hackers-win32] Tablespaces

-----Original Message-----
From: pgsql@mohawksoft.com [mailto:pgsql@mohawksoft.com]

I surely hope not. Especially not multi-gig databases. The folks

running

those should know better than to use Windows, and if they do not,

I'll

be happy to tell them so.

You know, it makes you wonder. Tom must not have enough work to do if he's
so
bored that he wants to spice up the postgres mailing lists this way :)

--
greg

It is the creative mind. We all suffer from "Engineer's Tourettes
Syndrome" (The uncontrollable need to express contrarian and margenally
related opinions.) and at some point.

#26Tom Lane
tgl@sss.pgh.pa.us
In reply to: Gavin Sherry (#4)
Re: Tablespaces

I'm starting to review this patch, and almost immediately came across
what seemed a spectacularly bad idea:

*** src/backend/storage/buffer/bufmgr.c    8 May 2004 19:09:25 -0000    1.165
--- src/backend/storage/buffer/bufmgr.c    26 May 2004 06:21:01 -0000
***************
*** 1148,1152 ****
          {
              bufHdr = &LocalBufferDescriptors[i];
!             if (RelFileNodeEquals(bufHdr->tag.rnode, rnode))
              {
                  bufHdr->flags &= ~(BM_DIRTY | BM_JUST_DIRTIED);
--- 1148,1156 ----
          {
              bufHdr = &LocalBufferDescriptors[i];
!             /* special case for default tblNode */
!             if (RelFileNodeEquals(bufHdr->tag.rnode, rnode) ||
!                     (!OidIsValid(rnode.tblNode) &&
!                      bufHdr->tag.rnode.relNode == rnode.relNode &&
!                      bufHdr->tag.rnode.dbNode == rnode.dbNode))
              {
                  bufHdr->flags &= ~(BM_DIRTY | BM_JUST_DIRTIED);

There has got to be a better way than this. In the first place the
code seems able to seize on the wrong buffer if it's not checking
all three fields; in the second place, if the weak matching is correct
here why is it not needed everyplace else?

What's the purpose of this?

regards, tom lane

#27Gavin Sherry
swm@linuxworld.com.au
In reply to: Tom Lane (#26)
Re: Tablespaces

Hi Tom,

On Wed, 16 Jun 2004, Tom Lane wrote:

I'm starting to review this patch, and almost immediately came across
what seemed a spectacularly bad idea:

*** src/backend/storage/buffer/bufmgr.c    8 May 2004 19:09:25 -0000    1.165
--- src/backend/storage/buffer/bufmgr.c    26 May 2004 06:21:01 -0000
***************
*** 1148,1152 ****
{
bufHdr = &LocalBufferDescriptors[i];
!             if (RelFileNodeEquals(bufHdr->tag.rnode, rnode))
{
bufHdr->flags &= ~(BM_DIRTY | BM_JUST_DIRTIED);
--- 1148,1156 ----
{
bufHdr = &LocalBufferDescriptors[i];
!             /* special case for default tblNode */
!             if (RelFileNodeEquals(bufHdr->tag.rnode, rnode) ||
!                     (!OidIsValid(rnode.tblNode) &&
!                      bufHdr->tag.rnode.relNode == rnode.relNode &&
!                      bufHdr->tag.rnode.dbNode == rnode.dbNode))
{
bufHdr->flags &= ~(BM_DIRTY | BM_JUST_DIRTIED);

There has got to be a better way than this. In the first place the
code seems able to seize on the wrong buffer if it's not checking
all three fields; in the second place, if the weak matching is correct
here why is it not needed everyplace else?

Ahh. This is a hang over from some tests I was doing. I must have missed
it when I send the patch in. The patch should certainly work without this
change. I will verify later today when I have access to my development
machine.

Gavin

#28Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Gavin Sherry (#4)
Tablespace patch review

Gavin Sherry wrote:

Attached is an updated patch, fixing a compile error which my compiler
didn't seem to detect/suffer from and incorporating fixes to problems
raised by Neil.

Thanks,

Gavin

OK, I have reviewed the patch. I think Tom is doing the same, but I
want to report the things I found.

First, let me say that the patch is very good. It adds the
creation/destruction of tablespaces and the infrastructure for object
creation in various tablespaces. The patch seems to cover all the areas
need for change, including reference manual changes. Even though I have
found a number of items to question, these are nit-pick items and should
not reflect on the high quality of the patch.

Here is what I found:

In create_tablespace.sgml:

	+        <para>
	+ 	The name of a schema to be created.
	+        </para>

I assume this should say "tablespace".

In drop_tablespace.sgml, it says all objects must be removed from the
tablespace to drop it, including objects created in other databases. I
imagine it is going to be pretty hard for folks to find all the objects
defined in a tablespaces. We might need to add instructions on how to
do that.

I assume this change in xlog.c wasn't intended:

! bool XLOG_DEBUG = true;

I see the global tablespace is for global tables, and the default is for
everything else.

In catalog.c, should this be pg_tablespaces or pg_tablespace?

! sprintf(path, "%s/pg_tablespaces/%u/global/%u", DataDir,

I don't think we pluralize often. For example, we use "global", not
"globals".

What facility is there for moving objects between tablespaces?

This "<" in dbcommands.c should be removed:

+ * pg_tablespaces/<tblspcoid/src_dbid exists and if so, copy it to the new

Because Win32 doesn't have symlinks, I assume we don't have to support
it with copy:

+ snprintf(buf, sizeof(buf), "cp -r '%s' '%s'", tblspcpath, tblspctarget);

Ah, later I see:

	+ #ifndef WIN32
	+ 		snprintf(buf, sizeof(buf), "rm -rf '%s'", dbdir);
	+ #else
	+ 		snprintf(buf, sizeof(buf), "rmdir /s /q \"%s\"", dbdir);
	+ #endif

Seems we should be consistent in having WIN32 defs or not. I suggest
adding a WIN32 define for copy. Also, we might find a way to do
symlinks on Win32.

In tablespace.c, typo, "wee":

+ * To simplify initialization and XLog activity, wee create and maintain

same file use->user:

+ * (and also as a feature unto itself) when a use creates an object without

It seems that stat() test in tablespc.c should check errno for ENOENT.

Your code in tablespc.c calls realpath(). Do all OS's have that? Also,
my docs say:

CAVEATS
This implementation of realpath() differs slightly from the Solaris im-
plementation. The 4.4BSD version always returns absolute pathnames,
whereas the Solaris implementation will, under certain circumstances, re-
turn a relative resolved_path when given a relative pathname.

SEE ALSO
getcwd(3)

HISTORY
The realpath() function call first appeared in 4.4BSD.

I think we might have portability problems with it, but we can find out
once it is applied.

Would this be clearer as true/false?

+ tblnameexists = (strcmp(NameStr(tmpname), stmt->tblspcname) == 0 ? 1 : 0);

Also in tablespc.c, I see the comment:

+ 		 * We want to avoid situations where user passes in
+ 		 * /path/to/tblspc and a tablespace exists with a loc of
+ 		 * /path/to/tblspc/
+ 		 *                ^

port/path.c now has trim_trailing_separator() that might help, though I
don't see any code related to that comment.

Another 1/0 case:

+ tblspcexists = (strncmp(realp, realnewpath, PATH_MAX) == 0 ? 1 : 0);

Does all object creation code put a lock in the tablespace row to
prevent DROP TABLESPACE from removing a tablespace in use?

If someone creates a non-directory file in the tablespace directory, we
report "Can not open directory". Should we test explicitly for
non-directory files in there?

I would like to see this code converted to a macro:

+ 			if(sde->d_name[0] == '.' &&
+ 					(sde->d_name[1] == '\0' ||
+ 					(sde->d_name[1] == '.' && sde->d_name[2] == '\0')))

There is interesting code that checks to see of the objects existing in
a tablespace are about to be dropped by the transaction.

I think this should be a for() loop:

+ int ntmp = npdels;
+ while(ntmp > 0)

If we can't drop a tablespace, should we report the database and
relfilenode of one of the entries that is preventing the drop.

In commands/*.c I see two references to:

! createStmt->tblspcname = "";

Is that the proper way to specify no tablespace name, rather than NULL?

I see this in gram.y:

+ OptTableSpace:   TABLESPACE name					{ $$ = $2; }
+ 			| /*EMPTY*/								{ $$ = ""; }
+ 		;
+ 

Again, shouldn't we be using NULL? The only '= ""' I see in gram.y is:

opt_lancompiler:
LANCOMPILER Sconst { $$ = $2; }
| /*EMPTY*/ { $$ = ""; }
;

Are we ripping out our initlocation code at the same time?

Would someone research if we can get WIN32 to work for this with symlinks?

Typo in initdb.c:

+ * make a symbolic link from old to new. Preceed pathes with pg_data

We need to check for duplicate oids after patch application.

Where do we need to add mention of tablespaces in the main
non-reference-page docs? Clearly at least in the section on managing
disk space.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#29Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Bruce Momjian (#28)
Re: Tablespace patch review

Bruce Momjian wrote:

Gavin Sherry wrote:

Attached is an updated patch, fixing a compile error which my compiler
didn't seem to detect/suffer from and incorporating fixes to problems
raised by Neil.

Thanks,

Gavin

OK, I have reviewed the patch. I think Tom is doing the same, but I
want to report the things I found.

I have a few other questions:

What is the procedure for moving tablespace directories? I assume with
the postmaster down the directory can be moved and the symlink changed.
However, pg_tablespace still has the old location. Should we use lstat
so pg_tablespace gets updated automatically or as part of pg_dump, or
throw a server message if the symlink doesn't match pg_tablespace. We
need to add instructions that pg_tablespace needs to be updated if the
symlink is changed. What bothers me is that someone updating just the
symlink might run fine but would not be able to restore a dump to the
same machine.

And about restore, particularly to another machine, what do we do if the
tablespace can't be created in the location specified in the dump? The
tablespace creation fails, and all objects specified in that tablespace
also fail? Seems bad, particularly if you are restoring after a
hardware failure. Do we need a GUC that says "if the tablespace doesn't
exist, create the object in the default location?" Do we need a
pg_dump option that ignores tablespaces completely for portability and
for restoring to another server?

Is pg_dump smart enough not to emit the tablespace if the object would
already be created in the right tablespace, perhaps because of its
schema? The new tablespace clause adds a non-standard clause to CREATE
TABLE, something we were hoping to avoid, but I doubt it is possible.

Do we need ALTER TABLESPACE to move tablespaces, and ALTER clauses to
move objects to other tablespaces? Are these TODO items for later?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#30Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Bruce Momjian (#29)
Re: Tablespace patch review

I wrote the pg_dump bits, so I guess I can answer these...

And about restore, particularly to another machine, what do we do if the
tablespace can't be created in the location specified in the dump? The
tablespace creation fails, and all objects specified in that tablespace
also fail? Seems bad, particularly if you are restoring after a
hardware failure. Do we need a GUC that says "if the tablespace doesn't
exist, create the object in the default location?" Do we need a
pg_dump option that ignores tablespaces completely for portability and
for restoring to another server?

Weeeell. There's a lot of stuff that can already fail in a restore -
you always must watch your restore output to ensure things have worked.
When I restore and it can't create a tsearch function because I forgot
to install the tsearch.so, it errors and then keeps going with tables
and triggers and all sorts of stuff failing to restore because they
depended on that function. I don't see the failure to create a
tablespace as being any different.

Is pg_dump smart enough not to emit the tablespace if the object would
already be created in the right tablespace, perhaps because of its
schema?

Yes it is, I was very careful about that. If you never use a tablespace
in your life, you will never see tablespace commands in your dumps. The
changes to pg_dump work just fine against a pre-7.5 backend and again no
tablespace commands will be output.

The new tablespace clause adds a non-standard clause to CREATE
TABLE, something we were hoping to avoid, but I doubt it is possible.

Well, if you don't use them, you won't see them, so I don't have a
problem with that :)

Do we need ALTER TABLESPACE to move tablespaces, and ALTER clauses to
move objects to other tablespaces? Are these TODO items for later?

Would be nice :) I'm also in favour of "ADD [PRIMARY KEY | UNIQUE
](blah) TABLESPACE asdf" which isn't in the current patch.

Chris

#31Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#28)
Re: Tablespace patch review

Bruce Momjian <pgman@candle.pha.pa.us> writes:

OK, I have reviewed the patch. I think Tom is doing the same, but I
want to report the things I found.

I just came up for air after about two solid days of working on this
patch ... had not seen your message before committing it. The good
news is that I think I did see all the stuff you found.

What facility is there for moving objects between tablespaces?

None, as yet.

Seems we should be consistent in having WIN32 defs or not.

Probably. I removed #ifdefs whereever possible --- there are just a few
left in tablespace.c and dbcommands.c now. I was contemplating
replacing HAVE_SYMLINKS with a HAVE_TABLESPACES flag, but with the
occurrences isolated to one file I'm not sure it's worth the trouble.

Your code in tablespc.c calls realpath(). Do all OS's have that?

It doesn't anymore --- I was concerned about the portability question
too. The only point of that code AFAICS was to prevent creation of
two pg_tablespace entries pointing at the same directory. I felt that
the better way to handle this was to write a PG_VERSION file in the
tablespace directory during CREATE TABLESPACE. A subsequent CREATE
TABLESPACE on the same directory will fail because the directory isn't
empty anymore. And the version file might come in handy someday...

Does all object creation code put a lock in the tablespace row to
prevent DROP TABLESPACE from removing a tablespace in use?

I hacked up some logic to deal with this, based on taking out an
ExclusiveLock on pg_tablespace when adding a per-database subdirectory
to a tablespace directory or doing DROP TABLESPACE. It works but it'd
be nice to reduce the strength of the lock ...

There is interesting code that checks to see of the objects existing in
a tablespace are about to be dropped by the transaction.

s/interesting/doesn't work/ ... I didn't commit this stuff. Nor the
smgr changes either; those were far from ready for prime time.

Are we ripping out our initlocation code at the same time?

Not done yet, but it's dead and should be removed as soon as a
decent respect for the deceased permits ;-)

Where do we need to add mention of tablespaces in the main
non-reference-page docs? Clearly at least in the section on managing
disk space.

Yeah. The patch as committed covers the reference pages, but we
desperately need a higher-level discussion of tablespaces for the
administrator's guide.

regards, tom lane

#32Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#29)
Re: Tablespace patch review

Bruce Momjian <pgman@candle.pha.pa.us> writes:

I have a few other questions:

What is the procedure for moving tablespace directories?

There is none.

However, pg_tablespace still has the old location.

Yup. The *only* thing that pg_tablespace.spclocation is used for is
for pg_dumpall to dump appropriate CREATE TABLESPACE commands, so it's
not like you couldn't hack it after the fact.

Do we need ALTER TABLESPACE to move tablespaces, and ALTER clauses to
move objects to other tablespaces? Are these TODO items for later?

TODO. You sound like a man who's expecting a
several-generations-polished facility when we only just committed
the first version today. I do not feel a need to have any of these
features in 7.5 ...

regards, tom lane

#33Gavin Sherry
swm@linuxworld.com.au
In reply to: Tom Lane (#31)
Re: Tablespace patch review

On Fri, 18 Jun 2004, Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

OK, I have reviewed the patch. I think Tom is doing the same, but I
want to report the things I found.

I just came up for air after about two solid days of working on this
patch ... had not seen your message before committing it. The good
news is that I think I did see all the stuff you found.

Awesome.

What facility is there for moving objects between tablespaces?

None, as yet.

Seems we should be consistent in having WIN32 defs or not.

Probably. I removed #ifdefs whereever possible --- there are just a few
left in tablespace.c and dbcommands.c now. I was contemplating
replacing HAVE_SYMLINKS with a HAVE_TABLESPACES flag, but with the
occurrences isolated to one file I'm not sure it's worth the trouble.

Your code in tablespc.c calls realpath(). Do all OS's have that?

It doesn't anymore --- I was concerned about the portability question
too. The only point of that code AFAICS was to prevent creation of
two pg_tablespace entries pointing at the same directory. I felt that
the better way to handle this was to write a PG_VERSION file in the
tablespace directory during CREATE TABLESPACE. A subsequent CREATE
TABLESPACE on the same directory will fail because the directory isn't
empty anymore. And the version file might come in handy someday...

Yes. That's a better idea.

[snip]

Where do we need to add mention of tablespaces in the main
non-reference-page docs? Clearly at least in the section on managing
disk space.

Yeah. The patch as committed covers the reference pages, but we
desperately need a higher-level discussion of tablespaces for the
administrator's guide.

I'll look at this tomorrow.

Thanks for your assistance.

regards, tom lane

Gavin

#34Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#31)
Re: Tablespace patch review

Tom Lane wrote:

Are we ripping out our initlocation code at the same time?

Not done yet, but it's dead and should be removed as soon as a
decent respect for the deceased permits ;-)

You want me to do the honors?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#35Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#32)
Re: Tablespace patch review

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

I have a few other questions:

What is the procedure for moving tablespace directories?

There is none.

However, pg_tablespace still has the old location.

Yup. The *only* thing that pg_tablespace.spclocation is used for is
for pg_dumpall to dump appropriate CREATE TABLESPACE commands, so it's
not like you couldn't hack it after the fact.

Do we need ALTER TABLESPACE to move tablespaces, and ALTER clauses to
move objects to other tablespaces? Are these TODO items for later?

TODO. You sound like a man who's expecting a
several-generations-polished facility when we only just committed
the first version today. I do not feel a need to have any of these
features in 7.5 ...

I just need to know what to add to the TODO list, and so we can answer
people who are going to ask for this functionality. Added to TODO:

* Allow reporting of which objects are in which tablespaces
* Allow database recovery where tablespaces can't be created
o Add ALTER TABLESPACE to change location, name, owner
o Allow objects to be moved between tablespaces

I think this all the items still needed.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#36Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#34)
Re: Tablespace patch review

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom Lane wrote:

Are we ripping out our initlocation code at the same time?

Not done yet, but it's dead and should be removed as soon as a
decent respect for the deceased permits ;-)

You want me to do the honors?

Nah, I'll get it. I want to do some other small cleanup on that patch,
too. (But Gavin, you're on the hook for a rewrite of the admin guide
section about alternate locations into something about tablespaces...)

Somebody's got to fix oid2name and dbsize though. Bruce, you want
to catch those?

regards, tom lane

#37Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#36)
Re: Tablespace patch review

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom Lane wrote:

Are we ripping out our initlocation code at the same time?

Not done yet, but it's dead and should be removed as soon as a
decent respect for the deceased permits ;-)

You want me to do the honors?

Nah, I'll get it. I want to do some other small cleanup on that patch,
too. (But Gavin, you're on the hook for a rewrite of the admin guide
section about alternate locations into something about tablespaces...)

Somebody's got to fix oid2name and dbsize though. Bruce, you want
to catch those?

Uh, how do they have to be fixed? Isn't the relfilenode unchanged? Do
we just need to add tablespace lookups?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#38Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#37)
Re: Tablespace patch review

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom Lane wrote:

Somebody's got to fix oid2name and dbsize though. Bruce, you want
to catch those?

Uh, how do they have to be fixed? Isn't the relfilenode unchanged? Do
we just need to add tablespace lookups?

How useful will oid2name be if it doesn't understand about tablespaces?
I dunno how it ought to be changed, but surely it needs some thought.

dbsize doesn't even compile right now, because it's using
GetDatabasePath which now has another argument. I did not patch it
because it needs more thought: should it report the total of all
tablespaces for the database, or should its API be extended so you
can ask about individual tablespaces, or what? In any case it's
not a one-liner fix...

regards, tom lane

#39Gavin Sherry
swm@linuxworld.com.au
In reply to: Tom Lane (#36)
Re: Tablespace patch review

On Fri, 18 Jun 2004, Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom Lane wrote:

Are we ripping out our initlocation code at the same time?

Not done yet, but it's dead and should be removed as soon as a
decent respect for the deceased permits ;-)

You want me to do the honors?

Nah, I'll get it. I want to do some other small cleanup on that patch,
too. (But Gavin, you're on the hook for a rewrite of the admin guide
section about alternate locations into something about tablespaces...)

I can either replace the "Alternative Locations" section or make a higher
level reference to tablespaces under Server Administration in the main
index. What do people think?

Gavin

#40Gavin Sherry
swm@linuxworld.com.au
In reply to: Bruce Momjian (#35)
Re: Tablespace patch review

On Fri, 18 Jun 2004, Bruce Momjian wrote:

[snip]

TODO. You sound like a man who's expecting a
several-generations-polished facility when we only just committed
the first version today. I do not feel a need to have any of these
features in 7.5 ...

I just need to know what to add to the TODO list, and so we can answer
people who are going to ask for this functionality. Added to TODO:

* Allow reporting of which objects are in which tablespaces

Do we need an information_schema.tablespaces view as well as an update to
information_schema.{tables|indexes|...} ?

Gavin

#41Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Gavin Sherry (#40)
Re: Tablespace patch review

Gavin Sherry wrote:

On Fri, 18 Jun 2004, Bruce Momjian wrote:

[snip]

TODO. You sound like a man who's expecting a
several-generations-polished facility when we only just committed
the first version today. I do not feel a need to have any of these
features in 7.5 ...

I just need to know what to add to the TODO list, and so we can answer
people who are going to ask for this functionality. Added to TODO:

* Allow reporting of which objects are in which tablespaces

Do we need an information_schema.tablespaces view as well as an update to
information_schema.{tables|indexes|...} ?

I checked this to implement it, and found it being less then trivial
when *all* objects of a tablespace should be displayed, not just the
ones in the current database.

There seem to be several ways to implement:
(1) dblink like access iterating all databases. This seems
extraordinarily expensive
(2) low level scanning tablespace location, then try to translate found
oids to names withoug SPI. Probably not desirable.
(3) extending parser/executor to allow a table specification of the form
database.namespace.tablename. This has been requested several times
before, but was rejected, with the advise to use dblink.
(4) Copy the contents of the desired cross-db table to a temporary table
(generate new oid in local db, copy cross-db table file to new oid file,
insert pg_class). A typically weird Andreas' approach :-)

Regards,
Andreas

#42Gavin Sherry
swm@linuxworld.com.au
In reply to: Andreas Pflug (#41)
Re: Tablespace patch review

On Fri, 18 Jun 2004, Andreas Pflug wrote:

Gavin Sherry wrote:

On Fri, 18 Jun 2004, Bruce Momjian wrote:

[snip]

TODO. You sound like a man who's expecting a
several-generations-polished facility when we only just committed
the first version today. I do not feel a need to have any of these
features in 7.5 ...

I just need to know what to add to the TODO list, and so we can answer
people who are going to ask for this functionality. Added to TODO:

* Allow reporting of which objects are in which tablespaces

Do we need an information_schema.tablespaces view as well as an update to
information_schema.{tables|indexes|...} ?

I checked this to implement it, and found it being less then trivial
when *all* objects of a tablespace should be displayed, not just the
ones in the current database.

I don't think we should try and show all objects for a tablespace in
information_schema. That, as you point out, is hard and possibly gets
users into some messy situations.

Being able to list all objects in a tablespace, including which databases
they are in, is clearly useful, however (eg: hunting down use of a give
tablespace that you want dropped). Sounds like a script in contrib (or the
main source tree?) to me.

Gavin

#43Tom Lane
tgl@sss.pgh.pa.us
In reply to: Gavin Sherry (#40)
Re: Tablespace patch review

Gavin Sherry <swm@linuxworld.com.au> writes:

On Fri, 18 Jun 2004, Bruce Momjian wrote:

* Allow reporting of which objects are in which tablespaces

Do we need an information_schema.tablespaces view as well as an update to
information_schema.{tables|indexes|...} ?

That would depend on your theology about whether implementation-specific
additions to information_schema are a good idea or not. I'd lean
against doing this myself. ISTM the entire point of information_schema
is to be standard, and additions are, well, not. Worse, they might
conflict with future extensions to the standard.

I don't actually see a way *inside the database* to implement Bruce's
TODO item; there's no way for a backend to look at the catalogs of other
databases. We could look to see which databases had nonempty
subdirectories of a tablespace, and report those databases by name, but
explaining exactly what's inside those subdirectories is a lot harder.

It might be better to think about supporting this need with oid2name
or some similar client-level tool. It's easy to see how oid2name
might be extended to produce an output like

Tablespace t1
Database d1
Table x
Table y
Database d2
etc etc

regards, tom lane

#44Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Gavin Sherry (#42)
Re: Tablespace patch review

Gavin Sherry wrote:

On Fri, 18 Jun 2004, Andreas Pflug wrote:

Gavin Sherry wrote:

On Fri, 18 Jun 2004, Bruce Momjian wrote:

[snip]

TODO. You sound like a man who's expecting a
several-generations-polished facility when we only just committed
the first version today. I do not feel a need to have any of these
features in 7.5 ...

I just need to know what to add to the TODO list, and so we can answer
people who are going to ask for this functionality. Added to TODO:

* Allow reporting of which objects are in which tablespaces

Do we need an information_schema.tablespaces view as well as an update to
information_schema.{tables|indexes|...} ?

I checked this to implement it, and found it being less then trivial
when *all* objects of a tablespace should be displayed, not just the
ones in the current database.

I don't think we should try and show all objects for a tablespace in
information_schema.

Agreed, information_schema is database specific. I was thinking about a
pg_tablespace_contents(..) function anyway.

Being able to list all objects in a tablespace, including which databases
they are in, is clearly useful, however (eg: hunting down use of a give
tablespace that you want dropped). Sounds like a script in contrib (or the
main source tree?) to me.

You're suggesting the dblink way using a shell script. Imagine 20, 200,
... databases. This would be a costly thing (and has to be implemented
differently in win32).
I'd like to see an implementation that enables gui interfaces to show
objects that depend on a tablespace, so you'd need to be aware of a user
clicking on "show what's in that tablespace" and he probably wouldn't
expect to wait an extended period of time for all databases to be
scanned, or impose a 200-connection load on the server.

IMHO checking objects in a tablespace is a routine administrative task,
so it should be supported natively by the server without need of
contribs. And for win user acceptance, a command line tool won't be
sufficient either.

Regards,
Andreas

#45Gavin Sherry
swm@linuxworld.com.au
In reply to: Andreas Pflug (#44)
Re: Tablespace patch review

On Sat, 19 Jun 2004, Andreas Pflug wrote:

[snip]

I don't think we should try and show all objects for a tablespace in
information_schema.

Agreed, information_schema is database specific. I was thinking about a
pg_tablespace_contents(..) function anyway.

Being able to list all objects in a tablespace, including which databases
they are in, is clearly useful, however (eg: hunting down use of a give
tablespace that you want dropped). Sounds like a script in contrib (or the
main source tree?) to me.

You're suggesting the dblink way using a shell script. Imagine 20, 200,
... databases. This would be a costly thing (and has to be implemented
differently in win32).
I'd like to see an implementation that enables gui interfaces to show
objects that depend on a tablespace, so you'd need to be aware of a user
clicking on "show what's in that tablespace" and he probably wouldn't
expect to wait an extended period of time for all databases to be
scanned, or impose a 200-connection load on the server.

I see this more as a script like Tom described in another email. We'd have
a list of tablespacecs and databases and scan each database (on connection
at a time) and get the information the user wants.

IMHO checking objects in a tablespace is a routine administrative task,
so it should be supported natively by the server without need of
contribs. And for win user acceptance, a command line tool won't be
sufficient either.

I would debate that.

Firstly, tablespaces aren't supported on windows yet. Secondly, I'd think
that Unix users would be fine with a command line tool, especially one
that can connect to a remote host.

For those not used to command line tools, I can imagine extensions to
pgadmin or phppgadmin.

Gavin

#46Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Gavin Sherry (#45)
Re: Tablespace patch review

Gavin Sherry wrote:

I would debate that.

Firstly, tablespaces aren't supported on windows yet.

Just a matter of time. And I'm talking of win32 workstations connecting
to *ix servers too.

Secondly, I'd think
that Unix users would be fine with a command line tool, especially one
that can connect to a remote host.

For those not used to command line tools, I can imagine extensions to
pgadmin or phppgadmin.

:-) :-) :-)

Unfortunately, us admin tool programmers can't practice witchcraft, so
we need a pgsql function for that...
Certainly, we could iterate all known databases making a one-time
connection (if allowed to connect, what about template0?), retrieving
tablespace dependencies, and close again. As debated above, that's quite
costly, especially if more sophisticated authentication mechanisms are used.

Regards,
Andreas

#47Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Pflug (#44)
Re: Tablespace patch review

Andreas Pflug <pgadmin@pse-consulting.de> writes:

IMHO checking objects in a tablespace is a routine administrative task,
so it should be supported natively by the server without need of
contribs.

I strongly disagree. Dropping a tablespace is not a routine activity,
and we don't have to have submillisecond response to operations that
are only needed when your first attempt to drop one fails.

As for the authentication-is-expensive issue, what of it? You *should*
have to authenticate yourself in order to look inside another person's
database. The sort of cross-database inspection being proposed here
would be a big security hole in many people's view.

And for win user acceptance, a command line tool won't be
sufficient either.

This does not deserve a response.

regards, tom lane

#48Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#43)
Re: Tablespace patch review

Tom Lane wrote:

Gavin Sherry <swm@linuxworld.com.au> writes:

On Fri, 18 Jun 2004, Bruce Momjian wrote:

* Allow reporting of which objects are in which tablespaces

This would have to be an external tool that connects to each database.

Do we need an information_schema.tablespaces view as well as an update to
information_schema.{tables|indexes|...} ?

That would depend on your theology about whether implementation-specific
additions to information_schema are a good idea or not. I'd lean
against doing this myself. ISTM the entire point of information_schema
is to be standard, and additions are, well, not. Worse, they might
conflict with future extensions to the standard.

I don't actually see a way *inside the database* to implement Bruce's
TODO item; there's no way for a backend to look at the catalogs of other
databases. We could look to see which databases had nonempty
subdirectories of a tablespace, and report those databases by name, but
explaining exactly what's inside those subdirectories is a lot harder.

The best we could do here is to just report the database name and the
relfilenode.

It might be better to think about supporting this need with oid2name
or some similar client-level tool. It's easy to see how oid2name
might be extended to produce an output like

Tablespace t1
Database d1
Table x
Table y
Database d2
etc etc

Yep, that's what I was thinking --- an external tool.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#49Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Tom Lane (#47)
Re: Tablespace patch review

Tom Lane wrote:

Andreas Pflug <pgadmin@pse-consulting.de> writes:

IMHO checking objects in a tablespace is a routine administrative task,
so it should be supported natively by the server without need of
contribs.

I strongly disagree. Dropping a tablespace is not a routine activity,

Dropping certainly not. But inspecting? If implemented in a gui, it's
just a click away.

As for the authentication-is-expensive issue, what of it? You *should*
have to authenticate yourself in order to look inside another person's
database. The sort of cross-database inspection being proposed here
would be a big security hole in many people's view.

Accessing pg_class et al using the current sysuseid with acl checking
should be ok and satisfy security demands, no? Since it's the same
cluster, we can be sure that it 's the same user in that cross db too.
If the user has no access, the result won't have a meaning either.

The auth-is-expensive issue is about creating the db connection itself
again and again, when we only want to change a database.

And for win user acceptance, a command line tool won't be
sufficient either.

This does not deserve a response.

Well, that's not quite appropriate. A 'command line is enough for server
maintenance' attitude won't attract win people; they're blind without a
mouse.

Regards,
Andreas

#50Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Pflug (#49)
Re: Tablespace patch review

Andreas Pflug <pgadmin@pse-consulting.de> writes:

Tom Lane wrote:

As for the authentication-is-expensive issue, what of it? You *should*
have to authenticate yourself in order to look inside another person's
database. The sort of cross-database inspection being proposed here
would be a big security hole in many people's view.

Accessing pg_class et al using the current sysuseid with acl checking
should be ok and satisfy security demands, no?

No. If the other user has you locked out from connecting to his
database at all, he's probably not going to feel that he should have to
disable your access to individual objects inside it.

This has some connections to the discussions we periodically have about
preventing Joe User from looking at the system catalogs. If we make any
changes in this area at all, I would expect them to be in the direction
of narrowing access, not widening it to include being able to see
other databases' catalogs.

regards, tom lane

#51Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Andreas Pflug (#49)
Re: Tablespace patch review

Andreas Pflug wrote:

And for win user acceptance, a command line tool won't be
sufficient either.

This does not deserve a response.

Well, that's not quite appropriate. A 'command line is enough for server
maintenance' attitude won't attract win people; they're blind without a
mouse.

We can build a gui on top of the command-line tool, no?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#52Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#38)
Re: Tablespace patch review

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom Lane wrote:

Somebody's got to fix oid2name and dbsize though. Bruce, you want
to catch those?

Uh, how do they have to be fixed? Isn't the relfilenode unchanged? Do
we just need to add tablespace lookups?

How useful will oid2name be if it doesn't understand about tablespaces?
I dunno how it ought to be changed, but surely it needs some thought.

Well, I figure we would copy the database capability we have for
tablespaces.

If you call oid2name with no args, you get:

All databases:
---------------------------------
17219 = test
1 = template1
17218 = template0

If we specify just the database name we get:

(2) aspg oid2name -d template1
All tables from database "template1":
---------------------------------
17147 = sql_features
17152 = sql_implementation_info
17157 = sql_languages
17162 = sql_packages
17167 = sql_sizing
17172 = sql_sizing_profiles

I assume we just need to add a tablespace display when run with no args,
and a -s option to display _with_ -d to display only objects in that
database. We could go fancy and spin through all the databases and list
the datbase name and objects in that tablespace.

dbsize doesn't even compile right now, because it's using
GetDatabasePath which now has another argument. I did not patch it
because it needs more thought: should it report the total of all
tablespaces for the database, or should its API be extended so you
can ask about individual tablespaces, or what? In any case it's
not a one-liner fix...

For dbsize, I assume we have to follow the symlinks. We would have to
spin through all the tablespaces looking for directories with the
database oid.

Given the number of open items for 7.5, I am thinking of keeping this
for post-feature freeze. Both are contrib.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#53Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#52)
Re: Tablespace patch review

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom Lane wrote:

How useful will oid2name be if it doesn't understand about tablespaces?
I dunno how it ought to be changed, but surely it needs some thought.

I assume we just need to add a tablespace display when run with no args,
and a -s option to display _with_ -d to display only objects in that
database. We could go fancy and spin through all the databases and list
the datbase name and objects in that tablespace.

I should think that the table-level display ought to show both the
relfilenode and tablespace OIDs for each table.

Given the number of open items for 7.5, I am thinking of keeping this
for post-feature freeze. Both are contrib.

Right, I doubt Marc will object to fixing contrib stuff after feature
freeze ...

regards, tom lane

#54Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#53)
Re: Tablespace patch review

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom Lane wrote:

How useful will oid2name be if it doesn't understand about tablespaces?
I dunno how it ought to be changed, but surely it needs some thought.

I assume we just need to add a tablespace display when run with no args,
and a -s option to display _with_ -d to display only objects in that
database. We could go fancy and spin through all the databases and list
the datbase name and objects in that tablespace.

I should think that the table-level display ought to show both the
relfilenode and tablespace OIDs for each table.

This is the existing display:

(3) aspg oid2name -d test
All tables from database "test":
---------------------------------
17147 = sql_features
17152 = sql_implementation_info
17157 = sql_languages
17162 = sql_packages
17167 = sql_sizing
17172 = sql_sizing_profiles
17220 = x

For objects in the default tablespace, they don't show a tablespace oid,
right? Where do we put it? A column that will be empty if they don't
use tablespaces?

Given the number of open items for 7.5, I am thinking of keeping this
for post-feature freeze. Both are contrib.

Right, I doubt Marc will object to fixing contrib stuff after feature
freeze ...

Also, remember I am only online fulltime for another two days, then I am
leaving for Europe, return on July 3, after feature freeze.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#55Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Bruce Momjian (#34)
Re: Tablespace patch review

Are we ripping out our initlocation code at the same time?

Not done yet, but it's dead and should be removed as soon as a
decent respect for the deceased permits ;-)

You want me to do the honors?

What about people upgrading from 7.4 databases that used database locations?

Chris

#56Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#55)
Re: Tablespace patch review

Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:

What about people upgrading from 7.4 databases that used database locations?

They'll get a nice warning:

regression=# create database foo location 'bar';
WARNING: LOCATION is not supported anymore
HINT: Consider using tablespaces instead.
CREATE DATABASE

and everything will go into the default tablespace. I don't really
see how to do much better than that ...

regards, tom lane

#57Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#54)
Re: Tablespace patch review

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom Lane wrote:

I should think that the table-level display ought to show both the
relfilenode and tablespace OIDs for each table.

For objects in the default tablespace, they don't show a tablespace oid,
right? Where do we put it? A column that will be empty if they don't
use tablespaces?

pg_class will show a zero for objects in the default tablespace, but
I think oid2name should pull the actual tablespace ID from
pg_database.dattablespace and show that. The convention about zero
is just to make life simple for CREATE DATABASE --- users of oid2name
should not have to think about it.

regards, tom lane

#58Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#57)
Re: Tablespace patch review

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom Lane wrote:

I should think that the table-level display ought to show both the
relfilenode and tablespace OIDs for each table.

For objects in the default tablespace, they don't show a tablespace oid,
right? Where do we put it? A column that will be empty if they don't
use tablespaces?

pg_class will show a zero for objects in the default tablespace, but
I think oid2name should pull the actual tablespace ID from
pg_database.dattablespace and show that. The convention about zero
is just to make life simple for CREATE DATABASE --- users of oid2name
should not have to think about it.

Well, I didn't use tablespaces here so the pg_tablespaces directory is
empty, so I can't think of what the tablespace is. Is it the database
oid? Also, are we calling it pg_tablespaces (plural) rather than
pg_tablespace?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#59Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#58)
Re: Tablespace patch review

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Well, I didn't use tablespaces here so the pg_tablespaces directory is
empty, so I can't think of what the tablespace is.

You look in the pg_tablespace catalog for the row with that OID.

Also, are we calling it pg_tablespaces (plural) rather than
pg_tablespace?

I didn't have any particular opinion about that till just now ...
but now I see that it's a good idea for the pg_tablespaces directory
(the one that holds all the symlinks) to have a different name from the
pg_tablespace catalog, especially since the latter has a couple of rows
that do not correspond to any entries in the former.

I'm not wedded to "pg_tablespaces" as the name in particular, but
it should not be "pg_tablespace", or we'll suffer the same confusion
over and over that you just did.

regards, tom lane

#60Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Tom Lane (#56)
Re: Tablespace patch review

regression=# create database foo location 'bar';
WARNING: LOCATION is not supported anymore
HINT: Consider using tablespaces instead.
CREATE DATABASE

and everything will go into the default tablespace. I don't really
see how to do much better than that ...

You could create an automatically named tablespace instead of the
location...

By the way, I think that we should deny users the ability to create
tablespaces that begin with pg_. Also, the existing ones should be
pg_global and pg_default. That way, we have room to move if ever we
decide we want more system tablespaces. It also makes it easier to dump
non-system tablespaces.

Chris

#61Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Tom Lane (#50)
Re: Tablespace patch review

Tom Lane wrote:

Andreas Pflug <pgadmin@pse-consulting.de> writes:

Tom Lane wrote:

As for the authentication-is-expensive issue, what of it? You *should*
have to authenticate yourself in order to look inside another person's
database. The sort of cross-database inspection being proposed here
would be a big security hole in many people's view.

Accessing pg_class et al using the current sysuseid with acl checking
should be ok and satisfy security demands, no?

No. If the other user has you locked out from connecting to his
database at all, he's probably not going to feel that he should have to
disable your access to individual objects inside it.

Well he's using my tablespace, so I'd like to know at least the object name.

This has some connections to the discussions we periodically have about
preventing Joe User from looking at the system catalogs. If we make any
changes in this area at all, I would expect them to be in the direction
of narrowing access, not widening it to include being able to see
other databases' catalogs.

Superuser/tablespace owner isn't quite Joe User, I believe.

Actually, there seem quite some other cross database/shared table issues
(schema default tablespace, dropping user who owns objects) which make
it desirable to have superuser readonly access to pg_catalog tables.
Maybe a todo for 7.6...

Regards,
Andreas

#62Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#60)
Re: [PATCHES] Tablespace patch review

[ switching to pghackers for wider comment ]

Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:

By the way, I think that we should deny users the ability to create
tablespaces that begin with pg_. Also, the existing ones should be
pg_global and pg_default. That way, we have room to move if ever we
decide we want more system tablespaces. It also makes it easier to dump
non-system tablespaces.

Seems like a reasonable suggestion to me. Any objections?

BTW, another argument for this is that "default" is a reserved word.
I'd already noticed in testing that CREATE TABLE ... TABLESPACE default
doesn't work unless you double-quote "default". Calling it pg_default
would avoid that annoyance.

regards, tom lane

#63Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Tom Lane (#62)
Re: Tablespace patch review

Tom Lane wrote:

[ switching to pghackers for wider comment ]

Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:

By the way, I think that we should deny users the ability to create
tablespaces that begin with pg_. Also, the existing ones should be
pg_global and pg_default. That way, we have room to move if ever we
decide we want more system tablespaces. It also makes it easier to dump
non-system tablespaces.

Seems like a reasonable suggestion to me. Any objections?

BTW, another argument for this is that "default" is a reserved word.
I'd already noticed in testing that CREATE TABLE ... TABLESPACE default
doesn't work unless you double-quote "default". Calling it pg_default
would avoid that annoyance.

CREATE .... TABLESPACE DEFAULT with default as keyword seems reasonable
too, with default -> pg_default.

I could think of cases where temporary schemas should go to a different
tablespace, but AFAICS since these are created implicitely there's no
way to redirect them. Maybe an additional attribute in pg_database for a
default temp tablespace is desirable?

Regards,
Andreas

#64Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Pflug (#63)
Re: Tablespace patch review

Andreas Pflug <pgadmin@pse-consulting.de> writes:

I could think of cases where temporary schemas should go to a different
tablespace, but AFAICS since these are created implicitely there's no
way to redirect them. Maybe an additional attribute in pg_database for a
default temp tablespace is desirable?

By default, temp tables will live in the database's default tablespace,
which is not necessarily the pg_default tablespace. (Hmm, there's
another good reason for renaming it ... if I'd said "default" tablespace
I'd have had to go out of my way to make it clear what I meant.) This
arguably is sufficient control. In any case, I'd prefer not to add a
knob to relocate temp stuff until there's proven need for it. We can
always add features later, but inventing stuff because somebody might
need it is a recipe for overdesign. (Remember that you can always
redirect a specific temp table to a specific tablespace when you
create it.)

The other thing I think people might possibly want to move around is
pg_largeobject. If Gavin finishes ALTER TABLE SET TABLESPACE (or
whatever we call it), that should provide a sufficient answer there.

regards, tom lane

#65Gavin Sherry
swm@linuxworld.com.au
In reply to: Tom Lane (#62)
Re: [PATCHES] Tablespace patch review

On Sat, 19 Jun 2004, Tom Lane wrote:

[ switching to pghackers for wider comment ]

Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:

By the way, I think that we should deny users the ability to create
tablespaces that begin with pg_. Also, the existing ones should be
pg_global and pg_default. That way, we have room to move if ever we
decide we want more system tablespaces. It also makes it easier to dump
non-system tablespaces.

Seems like a reasonable suggestion to me. Any objections?

BTW, another argument for this is that "default" is a reserved word.
I'd already noticed in testing that CREATE TABLE ... TABLESPACE default
doesn't work unless you double-quote "default". Calling it pg_default
would avoid that annoyance.

Great idea. I recognised that default was reserved and was using "default"
in testing. I meant to raise this for discussion when I submitted the
patch. pg_default/pg_global are great.

Gavin

#66Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#59)
Re: Tablespace patch review

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Well, I didn't use tablespaces here so the pg_tablespaces directory is
empty, so I can't think of what the tablespace is.

You look in the pg_tablespace catalog for the row with that OID.

Also, are we calling it pg_tablespaces (plural) rather than
pg_tablespace?

I didn't have any particular opinion about that till just now ...
but now I see that it's a good idea for the pg_tablespaces directory
(the one that holds all the symlinks) to have a different name from the
pg_tablespace catalog, especially since the latter has a couple of rows
that do not correspond to any entries in the former.

If you want something distinct, which I understand, perhaps pg_tblspc.

I'm not wedded to "pg_tablespaces" as the name in particular, but
it should not be "pg_tablespace", or we'll suffer the same confusion
over and over that you just did.

OK.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#67Simon Riggs
simon@2ndquadrant.com
In reply to: Gavin Sherry (#1)
Re: Tablespaces

On Thu, 2004-05-27 at 07:59, Gavin Sherry wrote:

Attached is my latest patch implementing tablespaces. This has all the
functionality I was planning for 7.5.

Most of the information about the patch is contained in the
patch/documentation, previous submissions and the archives.

Testing, review, comments would be greatly appreciated.

I've reviewed your patch by eye, but can't see anything in your patch
about relocating the pg_xlog directory.

There was/is a TODO item:
- Allow xlog directory location to be specified during initdb, perhaps
using symlinks

Is that something you've addressed in your patch?

If not, is that something that would be easily do-able (before freeze)?

AFAICS, pg_xlog could be treated as the name of a tablespace, rather
than as a fixed directory beneath PGDATA.

pg_xlog is only referred to in 4 lines in the code (incl. PITR patch):
- xlog.c
- pgarch.c (PITR patch)
- initdb.c
- pgresetxlog.c
Each time it is simply setting a string to the location of the xlog
directory.

If we could work out a way of...
i) letting the pg_xlog be created by default
ii) then transferring this to another tablespace later?
That would give us maximum flexibility, since you may wish to change
location later when workload changes/increases.

Perhaps adding a GUC...for wal_tablespace (pls suggest name!)
defaults to the pg_xlog directory, when not listed?
Changeable only at postmaster startup...

This could be done independently of tablespaces, but I think any
directory flexibility/change should work using the tablespace
infrastructure, not in addition to it.

Could we discuss this? it sounds like a change we could make happen
fairly quickly now your code is in place.

Of course, I accept that many may say that such a change is not really
needed, but then...

Best regards, Simon Riggs

#68Tom Lane
tgl@sss.pgh.pa.us
In reply to: Simon Riggs (#67)
Re: Tablespaces

Simon Riggs <simon@2ndquadrant.com> writes:

I've reviewed your patch by eye, but can't see anything in your patch
about relocating the pg_xlog directory.

I see no reasonable way to move pg_xlog while the postmaster is up.
So this is something that will always require outside-the-database
activity. We could maybe offer a script to do it, but I can't see
any fundamental advantage there over telling people how to do it by
hand.

There was/is a TODO item:
- Allow xlog directory location to be specified during initdb, perhaps
using symlinks

Note this says "during initdb", which is a whole different ballgame.
We could certainly add a "symlink pg_xlog to foo" switch to initdb,
but again, just how much functionality is that really adding?
Not a whole lot. (I'll not stand in the way if someone wants to write
and document such a switch in the next ten days; but really the bang
for buck ratio seems low, compared to working on things that you can't
do nohow in current PG.)

AFAICS, pg_xlog could be treated as the name of a tablespace, rather
than as a fixed directory beneath PGDATA.

Definitely not. pg_xlog is *not* a tablespace. xlog activity happens
below the level at which it is reasonable to pay attention to tablespaces.

regards, tom lane

#69Gavin Sherry
swm@linuxworld.com.au
In reply to: Simon Riggs (#67)
Re: Tablespaces

On Sun, 20 Jun 2004, Simon Riggs wrote:

On Thu, 2004-05-27 at 07:59, Gavin Sherry wrote:

Attached is my latest patch implementing tablespaces. This has all the
functionality I was planning for 7.5.

Most of the information about the patch is contained in the
patch/documentation, previous submissions and the archives.

Testing, review, comments would be greatly appreciated.

I've reviewed your patch by eye, but can't see anything in your patch
about relocating the pg_xlog directory.

I didn't intend on looking at that in this patch.

pg_xlog is only referred to in 4 lines in the code (incl. PITR patch):
- xlog.c
- pgarch.c (PITR patch)
- initdb.c
- pgresetxlog.c
Each time it is simply setting a string to the location of the xlog
directory.

If we could work out a way of...
i) letting the pg_xlog be created by default
ii) then transferring this to another tablespace later?
That would give us maximum flexibility, since you may wish to change
location later when workload changes/increases.

Sounds reasonable.

Perhaps adding a GUC...for wal_tablespace (pls suggest name!)
defaults to the pg_xlog directory, when not listed?
Changeable only at postmaster startup...

This could be done independently of tablespaces, but I think any
directory flexibility/change should work using the tablespace
infrastructure, not in addition to it.

If the change is as simple as you propose, it has nothing to do with
the tablespace code. Also, I don't see any situation where we would want
to make use of the tablespace code.

Could we discuss this? it sounds like a change we could make happen
fairly quickly now your code is in place.

Again, I don't think my code really has any affect on the location of
xlog.

Of course, I accept that many may say that such a change is not really
needed, but then...

Comments anyone?

Gavin

#70Simon Riggs
simon@2ndquadrant.com
In reply to: Tom Lane (#68)
Re: Tablespaces

On Sun, 2004-06-20 at 22:28, Tom Lane wrote:

Simon Riggs <simon@2ndquadrant.com> writes:

There was/is a TODO item:
- Allow xlog directory location to be specified during initdb, perhaps
using symlinks

Note this says "during initdb", which is a whole different ballgame.
We could certainly add a "symlink pg_xlog to foo" switch to initdb,
but again, just how much functionality is that really adding?
Not a whole lot. (I'll not stand in the way if someone wants to write
and document such a switch in the next ten days; but really the bang
for buck ratio seems low, compared to working on things that you can't
do nohow in current PG.)

I think its less useful at initdb time....

We probably have time for a change, but robustness makes me think not
to, especially as its gloss, not feature.

So, buried it is then.

Best Regards, Simon Riggs