How do I stop the postmaster?

Chairudin Sentosa Harjo <chai@dnet.net.id>

From: Chairudin Sentosa Harjo <chai@dnet.net.id>
To: "pgsql-questions@postgresql.org" <pgsql-sql@postgreSQL.org>
Date: 1998-08-06T06:42:12Z
Lists: pgsql-sql
Hi all,

I started the postmaster by running this command:
/usr/local/psql/bin/postmaster -oe -S -D /usr/local/pgsql/data

Then I type:
psql mydb

Error:
Connection to database 'mydb' failed.
PQexec() -- Request was sent to backend, but backed closed the channel before
responding.
                        This probably means the backend terminated abnormally
before or while
                        processing request.


What is the proper way to terminate the postmaster?

Regards
Chai