
Now use the pg_start script to start up PostgreSQL.
Macports update r mac os x#
(There is a Mac OS X way of starting PostgreSQL using launchctl but I don't tend to use that because I'm used to the standard pg_ctl command.)

opt/local/lib/postgresql90/bin/pg_ctl -D /opt/local/var/db/postgresql90/defaultdb -l /opt/local/var/log/postgresql90/postgres.log stop opt/local/lib/postgresql90/bin/pg_ctl -D /opt/local/var/db/postgresql90/defaultdb -l /opt/local/var/log/postgresql90/postgres.log start &īelow are the contents of the pg_stop file: Make sure to create these files as the postgres user in the home directory: Below are the contents of the pg_start file.
Macports update r full#
To prevent having to retype the full command every time I want to start or stop the database, create a start script and a stop script in the postgres user's home directory named pg_start and pg_stop. This is simply because I learned PostgreSQL on Linux and that's all there was. I prefer to use the pg_ctl command to start and stop PostgreSQL. This should allow you to connect easily using the psql utility. # "local" is for Unix domain socket connections only

Now edit the pg_hba.conf file to add the appropriate permissions: NFSHomeDirectory: /opt/local/var/db/postgresql90 View the postgres user account just to make sure it all looks OK: create /Users/postgres UserShell /bin/bash I prefer to change the postgres user's shell to bash: $ sudo -u postgres /opt/local/lib/postgresql90/bin/initdb -D /opt/local/var/db/postgresql90/defaultdb Now you need to initialize the database using the data directory that was created above: $ sudo chown -R postgres:postgres /opt/local/var/log/postgresql90 $ sudo mkdir -p /opt/local/var/log/postgresql90 $ sudo chown -R postgres:postgres /opt/local/var/db/postgresql90 $ sudo mkdir -p /opt/local/var/db/postgresql90/defaultdb
Macports update r install#
Use the MacPorts command port to install PostgreSQL 9.0, then create and own a data directory and a logs directory: I'm hopeful that this will help others as well. So I'm documenting this process for my own sake because I have been through this now twice on two computers recently, having to hunt down all of these commands each time. Do not use anything from here for any other PPC systems, including 10.6.x Rosetta.While installing PostgreSQL 9.0 on Mac OS X again, I had to figure out all these steps yet again.

If something works on 10.5.8, but fails on 10.6 PPC, REPORT HERE, I will try fixing it. It can be reasonably assumed that everything else should work as-is (aside of other gcc versions, I will make fixes for some soon), as long as PPC is supported in principle. Git(at the moment there is a general bug preventing a build with gcc-4.2 use gcc7 or later until fixed: sudo port -v install/upgrade git piler=macports-gcc-7) Ports fixed for 10A190 (I will try keeping versions updated with the master):

THERE ARE STILL FEW ISSUES WITH ROSETTA – so even though it works, it is not smooth.ĬUSTOM FIXES FOR 10.6 PPC (10A190): (here I will put the staff that either won’t be or unlikely to be accepted with upstream). UPD (06.10.22): Nuked my Rosetta ports tree for now, since everything is either merged to Macports or in the process (10.6.8 is officially supported, so fixes are accepted, usually). Gcc10, gcc11 and gcc12 still need custom patches for 10.6 PPC. Some errors reported below are no longer relevant. UPD (30.08.22): Large part of Rosetta (and by extension some of 10.6 PPC) fixes are merged in Macports base. The attachment below is the original repo by (29.03.22): As of now, there is an error on 10A96. Build whatever you need with "sudo port -v install". (Nothing breaks down if you don't, but Macports gonna try using compilers that are unavailable for 10.6 PPC.)ġ2. This (11) should be done every time after port sync. Sudo ln -s /opt/PPCSnowLeopardPorts/_resources/port1.0/compilers /opt/local/var/macports/sources//macports/release/tarballs/ports/_resources/port1.0/compilers Sudo mv /opt/local/var/macports/sources//macports/release/tarballs/ports/_resources/port1.0/compilers /opt/local/var/macports/sources//macports/release/tarballs/ports/_resources/port1.0/compilers-moved
