Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions docs/development/macos/postgresql.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Run PostgreSQL v9.6 on macOS
# Run PostgreSQL v18 on macOS

### Install
```bash
brew install postgresql@9.6
brew install postgresql@18
```

### Start
```bash
brew services start postgresql@9.6
brew services start postgresql@18
```

### Stop
```bash
brew services stop postgresql@9.6
brew services stop postgresql@18
```

### Post Installation
Create a user `postgres`
Create a user `root`
```bash
createuser -s root
```

Verify PostgreSQL v9.6 is running and accessible:
Verify PostgreSQL v18 is running and accessible:
```bash
psql -h 127.0.0.1 -p 5432 -U root -d postgres
```
Expand All @@ -36,7 +36,7 @@ ALTER USER temporal WITH SUPERUSER;

Change the following file context:
```bash
emacs /usr/local/var/postgresql@9.6/pg_hba.conf
pico /opt/homebrew/var/postgresql@18/pg_hba.conf
```
from
```
Expand All @@ -52,7 +52,7 @@ host all all ::1/128 md5
```
then restart PostgreSQL:
```bash
brew services restart postgresql@9.6
brew services restart postgresql@18
```

Verify password:
Expand All @@ -65,7 +65,7 @@ psql -h 127.0.0.1 -p 5432 -U temporal -d postgres
[TLS Key / Cert Setup Guide](../tls/tls.md)

```bash
emacs /usr/local/var/postgresql@9.6/postgresql.conf
emacs /usr/local/var/postgresql@18/postgresql.conf
```

setting the variables below to
Expand All @@ -77,7 +77,7 @@ ssl_ca_file=<path to the ca.pem>
```

```bash
emacs /usr/local/var/postgresql@9.6/pg_hba.conf
emacs /usr/local/var/postgresql@18/pg_hba.conf
```

changes the configs like below
Expand All @@ -87,7 +87,7 @@ hostssl all all ::1/128 md5 clientcer
```
then restart PostgreSQL:
```bash
brew services restart postgresql@9.6
brew services restart postgresql@18
```

Verify TLS & password:
Expand All @@ -96,4 +96,4 @@ psql "sslmode=require host=localhost dbname=postgres user=root \
sslkey=<path to the client-key.pem> \
sslcert=<path to the client-cert.pem> \
sslrootcert=<path to the ca.pem>"
```
```
Loading