-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add postgres install instrucitons
- Loading branch information
Showing
3 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# PostgreSQL | ||
|
||
Install local PostgreSQL database for your projects and PoCs. | ||
We will be using [TimescaleDB](https://www.timescale.com/) as **PostgreSQL** which add extentions `pgvectorscale` and `pgai` to support [AI](https://www.timescale.com/ai) | ||
|
||
## Setup | ||
|
||
1. At the command prompt, add the TimescaleDB Homebrew tap: | ||
|
||
```shell | ||
brew tap timescale/tap | ||
``` | ||
|
||
2. Install TimescaleDB and psql: | ||
|
||
```shell | ||
Install TimescaleDB and psql: | ||
``` | ||
|
||
3. Update your path to include psql. | ||
|
||
```shell | ||
brew link --force libpq | ||
``` | ||
|
||
4. Run the timescaledb-tune script to configure your database: | ||
|
||
```shell | ||
timescaledb-tune --quiet --yes | ||
``` | ||
|
||
5. Change to the directory where the setup script is located. It is typically, located at | ||
|
||
`/opt/homebrew/Cellar/timescaledb/<VERSION>/bin/`, where `<VERSION>`is the version of `timescaledb` that you installed: | ||
|
||
```shell | ||
cd /opt/homebrew/Cellar/timescaledb/<VERSION>/bin/ | ||
``` | ||
|
||
6. Run the setup script to complete installation. | ||
|
||
```shell | ||
./timescaledb_move.sh | ||
``` | ||
|
||
7. Login to PostgreSQL as postgres | ||
|
||
```shell | ||
sudo -u postgres psql | ||
``` | ||
|
||
8. Set the password for postgres (optional) | ||
|
||
```shell | ||
\password postgres | ||
``` | ||
|
||
When you have set the password, type `\q` to exit psql. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters