Upgrading to v5
v5 modernizes the library. What changed for callers:
Target frameworks: .NET 8, 9, 10 and 11. .NET 6 and 7 (out of support) are dropped.
Async only:
Start(),Stop()andDispose()are removed. Useawait StartAsync(),await StopAsync()andawait using.PgServerimplementsIAsyncDisposableonly.Options object: the long constructor is replaced by
new PgServer(pgVersion)andnew PgServer(PgServerOptions). The parameters map to option properties of the same name:v4 parameter v5 option startupWaitTime(ms)StartupTimeout(TimeSpan)pgServerParamsServerParamspgExtensionsExtensionsdeleteFolderRetryCountDeleteFolderRetryCountdeleteFolderInitialTimeout(ms)DeleteFolderInitialDelay(TimeSpan)deleteFolderTimeoutFactorgone: the delay always doubles Instance cleanup: instances without an
InstanceIdare now deleted on stop by default. SetClearInstanceDirOnStop = falseto keep them.Folder layout: binaries now live in a shared install folder under
BinariesDir, soPgBinDirpoints there instead of<instance>/bin. Existing named instances keep their data.Removed:
PgExtensionConfig.CreateExtensionSqlList(it was never executed). RunCREATE EXTENSIONyourself.Errors: failures are reported as
PostgresEmbedException, and startup errors include the end of the server log.New:
ConnectionString,IsRunning,LogFile,InstallDir,CancellationTokensupport, logging, proxy support throughHttpClient, Linux arm64 and Alpine support, and support for paths with spaces and non-ASCII characters.
