[Patch] - Fix for bug #2558, InitDB failed to run on windows 2003
Hi All,
As some of you already noticed and as mentioned in pgsql-hackers before,
the initDB process failed to run on some windows 2003 machines.
Although this issue was already discussed by James Hughes,Martijn,Jim Nasby and others I didn't no patch was created and
no fix was committed to the CVS.
Description:
On some windows 2003 machine there is no access to the nul device for non administrator's users.
The initDB.c redirect the output to > DEVNUL which on windows defined has "nul".
There were two options to solve this issue:
Create a new file , grant a write permission for the Postgres user and redirect the output to that file. (EnterpriseDB use this method)
Canceling the redirection at all.
I choose the second option and omit the redirection in any case that it windows machine and the redirection was sent to DEVNULL.
The only files that I changed are: initDB.c, exec.c and pg_ctl.c
I think postgres must solve this issue, as more and more windows 2003 machine will be discovered with this limitation which prevent from the users to install (actually to initialize ) the DB.
One more comment:
As today we have and MSI installer which redirect the initDB output to a log file by default (and we can also run it in the background) there is no point to use redirection at all.
The fixed files are attached.
Regards
Dror Bar-Gil
_________________________________________________________________
Try Live.com: where your online world comes together - with news, sports, weather, and much more.
http://www.live.com/getstarted
Attachments:
initDb patch.zipapplication/x-zip-compressedDownload
PK |5�[l&w 47 initDb patch/exec.c�[ks���LV�����I��{om��)E�lnd�+�����5�$���df(��������y���Tm����G�������������^���h���W�v���Da��Q��&��p��p����L��>i�2�����@�B�(}��}������j�Mu��w�l�����i6K��?��� {�:�w:���3�.�������R�z�����*�k�)4w:IM���c� �C�l�Oz���i��h��8��*�����*���{i���XxO��S�W�u;���;8�;<T������Wj-~3^�z_b�7Y��"������1�p������|�;?AC���V;�p�v�;�ot��-}���n���^�~�����RC��T�u��f^�����m�����G�g}�xtq~�Ki�24i&�sd�`���4��������Z�:�|�Y��hL�X+*O��7� �L3�.f����I��*����{�����w�;��{w�=��%�|��U�B�4�j������m./���-����W�\�\��5W��J�e�Uk��{���d c�)���D��M�V�b�O�"�O����������c�b�f*N�;����,�_2�SN"��g���R#�$Q�@OK1�q�8�x�R�V����lL�����P��B ������ w��4+"z@]������4�o+�aS�w:;^& \��I��E��������.Y��!��f]���h�p_������^6ov�ca�Qp�G�z��6mlh�L�G a���������U�Kj�[�@gG����j��x ,������G�n3��2��WF<-�)�>l�
a����U�>��bz��`�T��MM�lx���kO"��B���'��^H��~��D��>>�������x�����:�E���r@�?�5(���M�i�^ut���LFY����n>|FqK���ES���j�+j�#��L�+� �7j�k�F��j���������>
����5�6v:��i��:��u
���D�
_����ur�W&|u���bCV�r:5_�
`��&I��� B�,$����������`|6B����_�<�/Ol���R��3���� ~���Nd�l���;��x�7������@��z
���e��B8�\�X�RVeC�(�i���T
O��:Z��w�1n�D�:T��^�4Q;�QtR��5o�b�n�J[`B: ����� Je�\�v�-���T���jb��//l���f�E���"���!K�~^��m��"���P����e6�(���!,{����@���dLV�
�|R7&3Y��vDa��]���V�7�J1�[w:��}-�v�<��`b?����wi���1�y�b�j4E`�?U�*��5��R�-��h���56�&wxB$�_V�������I�0�?�,�����<�l1^���f����lN��N���7�n��~�F��.��$�5��Yx�Z����j/_���}��U�T@�;!�3���m���^�:;�X� �Da��d���� d����\��g�0h�d^SK�\a��-���|�*l�h�0D��A��U�����)vNE�3��������O+j���g��?���z��7�
x���V��Y�v8�����!F�V�G�~�=��3G4������7��1 �Ep��
$���%��}�P��X�(V������h� gE����M�igD�8�����7�@�U��4����1b�X�5dp��X����_E��J#|'���K������m%�2��"%j�C�`�}�������������� "��Cm��w�:
��E�C
)yj��g��(hbQ��D�����(�����Xt�� p�������� �E�y����<��R����4g�Er�{�-�0/M��k����e��K2�|$i:�r�s�D��GH��]����lnU���QY��?���_kvjU�E
��DgB�Fa[��%F#
/H�3N����eP�T�/����T`/���#��30�D����[��2
S�q������ iJ��r��i�R�x����{��L�q��Z��|��Z}�6�o'0)��w5���X��-���������2iJA�EG*��+/%�!��Q��$�4���L�Y�+.,��9+e9����Yr~xkE�R�
���H������%�QHE�b*Uh�$��������N�9���������Io#5���� m�E��V7;��7;���)��@6�E<���+>