Setting up postgres locally on Windows

08-09-2025

initdb -D "C:\Users\lmiloszewski\dev_programs\postgres\17.6-1\data" -U postgres

Start script:

@echo off
cd /d "C:\Users\lmiloszewski\dev_programs\postgres\17.6-1\pgsql\bin"
pg_ctl -D "C:\Users\lmiloszewski\dev_programs\postgres\17.6-1\data" -l "C:\Users\lmiloszewski\dev_programs\postgres\17.6-1\logs\postgres.log" start
pause

Stop script:

@echo off
cd /d "C:\Users\lmiloszewski\dev_programs\postgres\17.6-1\pgsql\bin"
pg_ctl -D "C:\Users\lmiloszewski\dev_programs\postgres\17.6-1\data" stop
pause

Installing extensions: