Windows
Open the Services tool. To do this, click Start, click Control Panel double-click the Administrative Tools, then Services.
Select PostgreSQL service in the list, and then select Stop in Action menu, or click the service with the right mouse button, and then select Stop from the context menu.
Linux
In the Linux perform the following command in the root console:
/etc/init.d/postgresql stop