No subject


Tue Feb 23 11:03:59 CST 2010


the pg_ctl.exe binary. This new feature starts the server and then drops all
privileges. This functionality is not available in the initdb.exe program which
tries to start postmaster as an unprivileged user. the pg_ctl functionality is
I think intended as a test mode.
I have been able to test this mode by doing the following:-
Obtain the windows binary tree from the postgresql site, unzip it and copy
everything under the psql directory into a directory named postgresql in the
wine c_drive.
Run the following commands from within the bin directory of the tree:-
wine cmd
 initdb -n -D c:\postgresql\data
The -n flag disables the deletion of the files created even though the server
fails to start properly. Remember initdb does not have the special
functionality.

If one exits the wine console and checks the process tree one finds that the
wineservice appears to be running but any attempt to connect to it failed for
me.
Kill these services.
Run "wine cmd" again and after some time the following message will be
displayed.

 pg_ctl: no operation specified
 Try "pg_ctl --help" for more information.

Wine has tried to start the server using pg_ctl but its registry entry is not
complete. If you exit you will again find that the wine services processes are
running.
Kill them again (I thinks wineserver -k may not be enough, I found that
services.exe continued to run.).

Open the the system registry in a text editor and search for pg_ctl service
edit the the Start key such that dword:00000003 this disables the service at
start up so that it can be started manually.
Now from the posresql bin directory run 
"pg_ctl.exe start -D c:\postgresql\data" 
to try and manually start the server.
This what you get.

fixme:advapi:CreateRestrictedToken (0xbc, 0x1, 2, 0x81f45c, 0, (nil), 0, (nil),
0x81f44c): stub
Failed to create restricted token: 120
pg_ctl: could not start server: exit code was 5

Alas we are at a fixme. Can anything be done with this?

I have run the various utilities such as psql and pgadmin3 under wine and have
been able to connect the a linux postgresql server with full functionality so
it is only the server part of postgresql that is broken

In summary it would be possible to install and run postgresql in wine by using
a "winetricks" approach given that CreateRestrictedToken can be fixed. It will
not be possible to use the distributed msi installer for postgresql because it
uses initdb to set up and start the server. The installer could be changed
(it's available from cvs) to implement the workaround but in truth a simple
script and the binary sources would suffice. 

Colin Close

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list