[ovirt-users] upgrade to 4.1

Yedidyah Bar David didi at redhat.com
Sun Apr 23 05:59:42 UTC 2017


On Thu, Apr 20, 2017 at 6:59 PM, Simone Tiraboschi <stirabos at redhat.com> wrote:
>
> On Thu, Apr 20, 2017 at 3:50 PM, Fabrice Bacchella
> <fabrice.bacchella at orange.fr> wrote:
>>
>> I tried to upgrade ovirt to version 4.1 from 4.0 and got:
>>
>>           Found the following problems in PostgreSQL configuration for the
>> Engine database:
>>            autovacuum_vacuum_scale_factor required to be at most 0.01
>>            autovacuum_analyze_scale_factor required to be at most 0.075
>>            autovacuum_max_workers required to be at least 6
>>            Postgresql client version is '9.4.8', whereas the version on
>> XXX is '9.4.11'. Please use a Postgresql server of version '9.4.8'.
>>           Please set:
>>            autovacuum_vacuum_scale_factor = 0.01
>>            autovacuum_analyze_scale_factor = 0.075
>>            autovacuum_max_workers = 6
>>            server_version = 9.4.8
>>           in postgresql.conf on 'XXXX'. Its location is usually
>> /var/lib/pgsql/data , or somewhere under /etc/postgresql* .
>>
>> I'm a little afraid about that. Does ovirt want pg to lies about it's
>> version ? It's a shared instance so what about other tools that access it ?
>> Is there some explanation about the meaning of those values ?
>
>
> engine-setup it's comparing the version of the local psql client with the
> version reported by the remote postgresql server as for:
> https://bugzilla.redhat.com/show_bug.cgi?id=1331168
>
> Currently it's a strict comparison; maybe we should be more flexibly
> regarding .z versions; Didi?

Is there a good reason to not have them exactly equal?
The main reason we require this is for pg_dump/pg_restore which are ran
during setup/rollback (if needed). pg_dump can't know for sure that all
the changes in the db were done using a client of its own version (that
is, current machine usually), and if indeed a newer client was used, it
might have used features that pg_dump of the lower version doesn't know
how to back up (and especially pg_restore does not know how to restore).
See also [1]. I seem to have tested there (can't remember anymore, see
comment 13) 9.2 client with 9.5 server and it didn't work. pg_dump(1)
manpage says:

       Because pg_dump is used to transfer data to newer versions of
       PostgreSQL, the output of pg_dump can be expected to load into
       PostgreSQL server versions newer than pg_dump's version.  pg_dump can
       also dump from PostgreSQL servers older than its own version.
       (Currently, servers back to version 7.0 are supported.) However,
       pg_dump cannot dump from PostgreSQL servers newer than its own major
       version; it will refuse to even try, rather than risk making an invalid
       dump. 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. Loading a dump file into an older
       server may require manual editing of the dump file to remove syntax not
       understood by the older server. Use of the --quote-all-identifiers
       option is recommended in cross-version cases, as it can prevent
       problems arising from varying reserved-word lists in different
       PostgreSQL versions.

So personally I'd keep things as they are, unless someone can present a
good reason to do a more delicate test. If someone indeed wants that,
please:

1. Open a bz and state what you want (make backup optional, use some
other less strict test on version numbers, something else?).
2. If you want more delicate tests, please verify that what you ask
for indeed works, and provide details. E.g., try this:
* setup an engine with 9.4.8 client and server (can be on same machine)
* pg_dump this engine's db with 9.4.8 to dump1
* pg_restore dump1 to a 9.4.11 server. Did this work?
* use pg_dump 9.4.8 to dump the db from the 9.4.11 server to dump2.
Did this work?
* use pg_restore 9.4.8 to restore dump2 to the 9.4.11 server.
Did this work?
* Compare dump1 and dump2. What are the differences?
It might make sense to do similar tests with the opposite - client is
newer than server. Also with "more far away" versions (say 9.4 and 9.5).
Also perhaps other tests, especially if you manage to find new features
in 9.4.11 compared to 9.4.8 (hopefully there aren't any) and in 9.5
compared to 9.4.

[1] https://bugzilla.redhat.com/1331168

>
> The other checks has been introduced for performance and scaling reasons.
>
>>
>>
>> And it was not in the release notes, it's not funny to get this warning
>> after starting the upgrade

This isn't a new test, see above bug.

Are you sure it's the first time you see it? Perhaps you upgraded your pg
server only after the last upgrade of the engine?

Best,
-- 
Didi


More information about the Users mailing list