You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is intended to work even in environments without an internet connection.
- Use latest version of pg_isready on checking database connection
- Switch postgresql-client version checking server on startup
- If the server versions do not match exactly, use the latest installed client
and warn on docker log
From postgresql documentation:
https://www.postgresql.org/docs/15/app-pgdump.html#PG-DUMP-NOTES
> Also, it is not guaranteed that pg_dump's output can be loaded
> into a server of an older major version — not even if the dump
> was taken from a server of that version.
To switch client version, generate a file ~/.postgresqlrc with content like:
{server side major version} {server hostname}:{server port} {default database}
See detail on:
https://manpages.ubuntu.com/manpages/bionic/man5/postgresqlrc.5.html
Following messages appear on docker log:
- Detected server version: 140007
- Generating /home/git/.postgresqlrc
echo"gitlab_generate_postgresqlrc(): WARNING - Suitable client not installed. postgresql-client-${DB_CLIENT_VERSION_PACKAGE_NAME} will be used but you may face issue (database in backup will be empty, for example)"
215
+
fi
216
+
217
+
# generate ~/.postgresqlrc to switch client version
0 commit comments