greenmask icon indicating copy to clipboard operation
greenmask copied to clipboard

how to select correct version of postgress binaries?

Open trever-atr opened this issue 8 months ago • 2 comments

we are using the greenmask docker image (latest) which defaults to pg v17. our database however is still pg v16.

as this can change at any time, we dont want to manually pin greenmask to a specific version.

is there a way to have the greenmask docker image try all its installed pg binaries versions? e.g. start with newest (v17 currently), if it fails try v16, then v15... so on.

(i found PG_VERSIONS_CHECK but no docs on what exactly it does)

in case thats not possible, what is the preferred way to instruct the greenmask docker image to use a specific pg binaries version? COMMON_PG_BIN_PATH?

trever-atr avatar Apr 08 '25 16:04 trever-atr

Hi! Thank you for reporting. Let me check something and I revert to you

wwoytenko avatar Apr 08 '25 17:04 wwoytenko

@trever-atr

we are using the greenmask docker image (latest) which defaults to pg v17. our database however is still pg v16.

as this can change at any time, we dont want to manually pin greenmask to a specific version.

is there a way to have the greenmask docker image try all its installed pg binaries versions? e.g. start with newest (v17 currently), if it fails try v16, then v15... so on.

We now provide the Greenmask image with all supported PostgreSQL binaries included. However, Greenmask does not currently set the binary path automatically based on the PostgreSQL major version. That said, it's a good idea for a future feature—perhaps we could implement some kind of workaround for this case.

in case thats not possible, what is the preferred way to instruct the greenmask docker image to use a specific pg binaries version? COMMON_PG_BIN_PATH?

Yes, if you want to use Greenmask, you need to manually specify the path via COMMON_PG_BIN_PATH. You can do this either through the environment variable mentioned earlier or by setting it directly in your YAML config under common.pg_bin_path.

I'll mark this issue as a feature so we can keep it in mind and think about how to simplify the experience in the future.

wwoytenko avatar Apr 08 '25 17:04 wwoytenko