Skip to content

Instantly share code, notes, and snippets.

@gowatana
Last active May 6, 2024 13:09
Show Gist options
  • Save gowatana/e23b8d5cfde154adfbf394c7e38caa4e to your computer and use it in GitHub Desktop.
Save gowatana/e23b8d5cfde154adfbf394c7e38caa4e to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
OUTFILE=$HOME/post_script.log
source ~/.bash_profile
echo "Check Env ---" >> $OUTFILE
env | grep PG >> $OUTFILE
sed -i '/^local.*all.*all/i local all postgres peer' $PGDATA/pg_hba.conf
sudo systemctl restart era_postgres
sleep 10
echo "Check $PGDATA/pg_hba.conf ---" >> $OUTFILE
cat $PGDATA/pg_hba.conf | grep -E -v "^#|^$" >> $OUTFILE
psql -V 2>&1 >> $OUTFILE
psql --dbname=vectordb --command='CREATE EXTENSION vector;'
exit 0
@gowatana
Copy link
Author

gowatana commented May 6, 2024

下記の投稿むけ。

NDB で Vector DB をプロビジョニングしてみる。(PostgreSQL 15 + pgvector)
https://blog.ntnx.jp/entry/2024/05/06/205254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment