diff --git a/devdocs/solutions.txt b/devdocs/solutions.txt index 302657fe..0d570850 100644 --- a/devdocs/solutions.txt +++ b/devdocs/solutions.txt @@ -246,3 +246,14 @@ Good test time zones: America/St_Johns - because it has a fractional hour difference America/New_York America/Los_Angeles + + +## How to make a postgres portable from binaries + download latest binaries: https://www.enterprisedb.com/download-postgresql-binaries + unzip latest binaries to a source folder + make a dest folder in c:\data\code\postgres_xx + copy bin, lib, share folders from source to dest + Create a new db, run this once: + c:\data\code\postgres_14\bin\initdb -D ^"C^:^\data^\code^\postgres^_14^\ayanova^" -U postgres -A trust + that's it, run it with: + C:\data\code\postgres_14\bin\pg_ctl -D ^"C^:^\data^\code^\postgres^_14^\ayanova^" -l logfile start \ No newline at end of file diff --git a/startsql.bat b/startsql.bat index 19d5634b..bf727a83 100644 --- a/startsql.bat +++ b/startsql.bat @@ -1,9 +1,12 @@ -REM docker start dock-pg10 dock-pgadmin -REM docker run --rm --name pg -p 5432:5432 -e POSTGRES_PASSWORD=raven -e POSTGRES_DB=AyaNova -d postgres:latest -REM GONE PORTABLE INSTEAD -rem start C:\data\code\PostgreSQLPortable_12.0\postgresqlportable.exe +@rem this is to initialize a new db first time a new version is set up of postgres +@rem c:\data\code\postgres_14\bin\initdb -D ^"C^:^\data^\code^\postgres^_14^\ayanova^" -U postgres -A trust -C:\data\code\postgres_13\bin\pg_ctl -D ^"C^:^\data^\code^\postgres^_13^\ayanova^" -l logfile start +@rem old version +@rem C:\data\code\postgres_13\bin\pg_ctl -D ^"C^:^\data^\code^\postgres^_13^\ayanova^" -l logfile start +C:\data\code\postgres_14\bin\pg_ctl -D ^"C^:^\data^\code^\postgres^_14^\ayanova^" -l logfile start +ECHO Press any key to stop POSTGRES database server +pause +C:\data\code\postgres_14\bin\pg_ctl -D ^"C^:^\data^\code^\postgres^_14^\ayanova^" stop @REM @ECHO OFF @REM setlocal @@ -13,6 +16,7 @@ C:\data\code\postgres_13\bin\pg_ctl -D ^"C^:^\data^\code^\postgres^_13^\ayanova^ @REM SET PGUSER=postgres @REM SET PGPORT=5432 @REM SET PGLOCALEDIR=%~dp0postgres\share\locale + @REM "%~dp0\postgres\bin\pg_ctl" -D "%~dp0/data/database" -l %~dp0data\logs\postgreslog start @REM ECHO Press any key to stop POSTGRES database server