Hi Tom, thanks for you reply. You're right, and I apologise for the confusion. Options I was talking about are specified via the `--old-options` parameter of the pg_upgrade (ex.: --old-options '-c unix_socket_directories=/run') Mentioning of the environment variable came only from my own confusion. I also attached the mentioned patch.
Regards, On Tue, Sep 10, 2019 at 4:13 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > > Patrik Novotny <panov...@redhat.com> writes: > > when the environment variable POSTGRESQL_UPGRADE_PGUPGRADE_OPTIONS is > > used to specify options for pg_upgrade, options related to > > unix_socket_directory/ies are being overridden by hardcoded options, > > making it difficult to upgrade in some usecases. > > > The attached patch changes the order of those options so that the > > hardcoded ones are eventually overridden by the user specified > > options. > > Hi Patrik, > > It looks like you forgot to attach the patch? But in any case, > I see no references to POSTGRESQL_UPGRADE_PGUPGRADE_OPTIONS in > any community Postgres code, so I'm wondering if this is just > changing some script that Red Hat supplies as part of packaging. > That would make it not our concern, really. > > regards, tom lane -- Patrik Novotný Associate Software Engineer Red Hat panov...@redhat.com
From b34018a51f811b680d602ae65014dadfe8992f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= <panov...@redhat.com> Date: Tue, 27 Aug 2019 14:13:00 +0200 Subject: [PATCH] Move user options to the end of the command --- src/bin/pg_upgrade/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c index 5563a5020b..6cb80d5fc7 100644 --- a/src/bin/pg_upgrade/server.c +++ b/src/bin/pg_upgrade/server.c @@ -249,7 +249,7 @@ start_postmaster(ClusterInfo *cluster, bool report_and_exit_on_error) " -c autovacuum=off -c autovacuum_freeze_max_age=2000000000", (cluster == &new_cluster) ? " -c synchronous_commit=off -c fsync=off -c full_page_writes=off" : "", - cluster->pgopts ? cluster->pgopts : "", socket_string); + socket_string, cluster->pgopts ? cluster->pgopts : ""); /* * Don't throw an error right away, let connecting throw the error because -- 2.21.0