Feb 25, 2025
MUHAMMAD GHIFARY
Last time we have seen how to setup PostgreSQL in mac OS. The following article is to enable an extension called PGVector, which is used to
cd /tmp
git clone --branch v0.8.0 <https://github.com/pgvector/pgvector.git>
cd pgvector
make
make install # may need sudo
brew services restart postgresql@15
# Start PostgreSQL service
brew services start postgresql@15
# Connect to your database
psql -d <db-name> -U <username>
# Create the vector extension
CREATE EXTENSION vector;
# Verify installation
\\dx vector
If the installation succeed, we should see the following output after executing \\dx vector:
List of installed extensions
Name | Version | Schema | Description
--------+---------+--------+------------------------------------------------------
vector | 0.8.0 | public | vector data type and ivfflat and hnsw access methods
Check Postgres log:
tail -f /opt/homebrew/var/log/[email protected]