Before you log out, you should always make sure that the database is not still running. To see if the postmaster is still running you can issue the command:
If the postmaster is still running you can shut it down with the command:
NOTE: As with the pg_ctl start command, if the PGDATA variable is not set it must be specified with the -D option for both the pg_ctl status and pg_ctl stop commands.