Skip to content

2.25.1.0-b186

@timothy-e timothy-e tagged this 14 Jan 21:07
Summary:
`check_pghost_envvar` is used by Postgres to validate that the pg server we are connecting to for upgrade to is a local server. It checks for conditions:
```
(strcmp(value, "localhost") != 0 && strcmp(value, "127.0.0.1") != 0 && strcmp(value, "::1") != 0 && !is_unixsock_path(value)))
```

However, in Yugabyte, the servers don't necessarily match this layout. `test_upgrade.sh` creates a server with IP 127.0.0.200, which causes `check_pghost_envvar` to fail with
```
+ build/latest/postgres/bin/pg_upgrade --old-datadir /tmp/pg15_cluster_data/node-1/disk-1/pg_data --old-host 127.0.0.200 --old-port 5433 --username yugabyte --check

libpq environment variable PGHOST has a non-local server value: 127.0.0.200
```

Rather than updating this check to work for every possible scenario in Yugabyte, it is simpler to just disable the check for Yugabyte, since the new cluster creation is owned by Yugabyte anyways.
Jira: DB-14727

Test Plan:
Jenkins
```
pg15_tests/test_upgrade.sh
```

Reviewers: hsunder, fizaa

Reviewed By: hsunder

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D41041
Assets 2
Loading