---
# System prepended metadata

title: Postgres Timescale DB on Mac
tags: [timescaledb]

---


# PostgreSQL and TimescaleDB Installation and Import Guide on Mac

## Install PostgreSQL with Homebrew

### Update Homebrew
Ensure your Homebrew is up to date:
```bash
brew update
```

### Install PostgreSQL
Install PostgreSQL using Homebrew:
```bash
brew install postgresql
```

### Start PostgreSQL Service
Start the PostgreSQL service:
```bash
brew services start postgresql
```

## Install TimescaleDB

### Add Timescale Tap
TimescaleDB is available as a Homebrew "tap":
```bash
brew tap timescale/tap
```

### Install TimescaleDB
Then, install TimescaleDB:
```bash
brew install timescaledb
```

### Configure PostgreSQL to Use TimescaleDB
Run the TimescaleDB setup command. This will modify your PostgreSQL configuration to include the necessary extensions.
```bash
timescaledb-tune --quiet --yes
```

### Restart PostgreSQL Service
Restart PostgreSQL to apply the changes:
```bash
brew services restart postgresql
```

## Import `pg_dump` File

### Create a New Database (if needed)
First, you might need to create a new database into which you will import the dump.
```bash
createdb pioflowwarehouseV2
```

### Import the Dump File
Use the `psql` command to import the dump file into your database.
```bash
psql pioflowwarehouseV2 < /path/to/dumpfile.sql
```

## Verify Installation

### Verify PostgreSQL
You can check if PostgreSQL is running correctly:
```bash
psql -V
```

### Verify TimescaleDB
To confirm TimescaleDB is installed, you can connect to your PostgreSQL using `psql` and then run the following SQL command:
```sql
SELECT * FROM pg_extension;
```
This should list `timescaledb` as one of the extensions if it's installed correctly.

