How can I start postgres automatically on startup?
In general for Apple systems you should add a .plist to your Launchd configuration.

Exactly how to do this varies a little from Mac OS X release to Mac OS X release. You haven't specified yours so I can't give a more specific answer.

The main thing to be aware of is that your postgresql plist should make sure to run PostgreSQL as the correct user.

If you use the EnterpriseDB installers for PostgreSQL they should take care of this task for you.