Database name


Using windows, run:

wal-g.exe backup-push "C:/Program Files/PostgreSQL/13/data"

And the following error pops up:

ERROR: 2021/07/01 15:04:45.755930 !Data directory read from Postgres (C:Program FilesPostgreSQL13data) is different then as parsed (C:/Program Files/PostgreSQL/13/data).

Note that the difference is the forward/back slash.

Investigating the code, found that:

if utility.ResolveSymlink(bh.arguments.pgDataDirectory) != bh.pgInfo.pgDataDirectory {
tracelog.ErrorLogger.Panicf("Data directory read from Postgres (%s) is different then as parsed (%s).",
bh.arguments.pgDataDirectory, bh.pgInfo.pgDataDirectory)

Note that it uses "ResolveSymlink" in just one side of comparison. Changing it to both sides solves the problem (since it will normalize inverted slashed in both paths.

Source link