PostgreSQL メモ
キャッシュ、キュー、全文検索、なんにでも PostgreSQL を使おう!という主張
Redis is fast - I'll cache in Postgres | Dizzy zone
Just Use Postgres for Everything | Amazing CTO
Just Use Postgres! - Denis Magda
PostgreSQL の設定生成器
DBバージョンやコア数やメモリ容量に合わせて最適な設定値を生成してくれる
https://pgtune.leopard.in.ua/
PostgreSQLはINSERT時に RETURNING id と指定しないと挿入した行のIDを取得できない。
psql で update/commit が必要になるのは autocommit を切っている場合
autocommit の確認方法は https://www.glamenv-septzen.net/view/726
hstore のバージョンが合わないとかで Postgres の pg_upgrade ができないときの対処法
https://dba.stackexchange.com/a/156084
PostgreSQLで、あるテーブルとそのテーブルを外部キー参照する計2つのカラムを1つのSQLでインサートする方法
https://stackoverflow.com/a/21766104
macOS で再起動
code:shell.sh
$ launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
macOS で自動起動を止めたいとき
$ launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
postgresql 10.5
timezone の設定値
Asia/Japan はNG
Asia/Tokyo はOK
Nikolay Samokhvalov on X: "Some @PostgreSQL footguns: - default configuration - long transactions mixed with OLTP workload - repmgr (and other HA tools not based on consensus algorithms) - LISTEN/NOTIFY - "pg_dump is a utility for backing up a PostgreSQL database" says the official doc - moving/copying…" / X
#postgres #データベース