Skip to content

Instantly share code, notes, and snippets.

set fish_greeting
# psql
set -gx PGHOST localhost
set -gx PGPORT 5432
set -gx PGUSER user
set -gx PGPASSWORD pass
set -gx PGDATABASE template1
# defaults
@arkady-emelyanov
arkady-emelyanov / haproxy.cfg
Last active October 25, 2023 22:02
haproxy check: postgresql is master
# Sample haproxy postgresql master check
#
# haproxy listen: 5431
# pg, instance #1 listen: 5432 (master node)
# pg, instance #2 listen: 5433 (replica node)
# external failover, promoting replica to master in case of failure
# passwordless auth for user web
# template1 database is accessible by user web
#
# haproxy will pass connection to postgresql master node:
@arkady-emelyanov
arkady-emelyanov / config.fish
Last active February 15, 2026 21:09
fish configuration
set fish_greeting
# psql
set -gx PGHOST localhost
set -gx PGPORT 5432
set -gx PGUSER user
set -gx PGPASSWORD password
set -gx PGDATABASE database
# defaults