Search Postgresql Archives

Upgrade Process Says "The database server was not shut down cleanly" but it was

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm in the process to update my Postgres 10 to 12 (it's my first server
upgrade). I've shutdown my Postgres 10 using "systemctl stop
postgresql-10.service" and "systemctl status postgresql-10.service" says:
Active: inactive (dead) since Sun 2020-05-03 22:51:46 CEST;

After that I've started the upgrade process with:
/usr/pgsql-12/bin/pg_upgrade --old-bindir=/usr/pgsql-10/bin/
--new-bindir=/usr/pgsql-12/bin/ --old-datadir=/var/lib/pgsql/10/data
--new-datadir=/var/lib/pgsql/12/data --old-options '-c
config_file=/var/lib/pgsql/10/data/postgresql.conf' --new-options '-c
config_file=/var/lib/pgsql/12/data/postgresql.conf'

And the output is:
Performing Consistency Checks
-----------------------------
Checking cluster versions                                              ok
Checking database user is the install user                        ok
Checking database connection settings                           ok
Checking for prepared transactions                                 ok
Checking for reg* data types in user tables                      ok
Checking for contrib/isn with bigint-passing mismatch         ok
Checking for tables WITH OIDS                                      ok
Checking for invalid "sql_identifier" user columns                ok
Creating dump of global objects                                     ok
Creating dump of database schemas                              
                                                                              
ok
Checking for presence of required libraries                       ok
Checking database user is the install user                       ok
Checking for prepared transactions                                ok

If pg_upgrade fails after this point, you must re-initdb the
new cluster before continuing.

Performing Upgrade
------------------
Analyzing all rows in the new cluster                             ok
Freezing all rows in the new cluster                              ok
Deleting files from new pg_xact                                    ok
Copying old pg_xact to new server                               ok
Setting next transaction ID and epoch for new cluster     ok
Deleting files from new pg_multixact/offsets                   ok
Copying old pg_multixact/offsets to new server              ok
Deleting files from new pg_multixact/members                ok
Copying old pg_multixact/members to new server            ok
Setting next multixact ID and offset for new cluster        ok
Resetting WAL archives                                              ok
Setting frozenxid and minmxid counters in new cluster     ok
Restoring global objects in the new cluster                    ok
Restoring database schemas in the new cluster
                                                                            
ok
Copying user relation files
                                                                            
ok
Setting next OID for new cluster
*failure*

Consult the last few lines of "pg_upgrade_utility.log" for
the probable cause of the failure.
Failure, exiting

The pg_upgrade_utility.log shows:
command: "/usr/pgsql-12/bin/pg_resetwal" -o 1091293 "/var/lib/pgsql/12/data"
>> "pg_upgrade_utility.log" 2>&1
The database server was not shut down cleanly.
Resetting the write-ahead log might cause data to be lost.
If you want to proceed anyway, use -f to force reset

1. I did shutdown the server properly "systemctl stop
postgresql-10.service", is there a better way to do that?
2. Where do I set the "-f" flag if I choose to force reset?



--
Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux