Skip to content

Commit

Permalink
Warn about possible glibc collation changes
Browse files Browse the repository at this point in the history
* bin/postgresql-setup.in: Print warning about possible glibc collation on
successful upgrade.
  • Loading branch information
panovotn authored and praiskup committed Feb 22, 2019
1 parent 4fad939 commit 75f8a83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

New in 8.3 version:

* postgresql-setup prints warning about possible glibc collation on
successful upgrade.

* postgresql-setup creates correct 'log_directory' based on PG version
(the default changed from $datadir/pg_log to $datadir/log in v10).

Expand Down
10 changes: 10 additions & 0 deletions bin/postgresql-setup.in
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ Environment:
PGSETUP_DEBUG Set to '1' if you want to see very verbose shell
debugging output."

# Warning about possible glibc collation changes BZ#1668301
GLIBC_COLLATION_WARN_STRING="\
WARNING: If you've just upgraded your database from a previous major
version of Fedora or RHEL, please run reindexdb against your databases.
Core library collation data may have changed and this will invalidate
database indexes. For example, in Fedora 28 and RHEL 8 there have been
extensive changes in glibc collations to support ISO 14651:2016 (Unicode
9.0.0 data) and your indexes may be affected: https://sourceware.org/ml/libc-announce/2018/msg00002.html"

print_version()
{
Expand Down Expand Up @@ -343,6 +351,8 @@ upgrade()
warn $"The configuration files were replaced by default configuration."
warn $"The previous configuration and data are stored in folder"
warn $pgdataold.
# Warn about possible glibc collation changes on success BZ#1668301
warn "$GLIBC_COLLATION_WARN_STRING"
else
# Clean up after failure.
$failure_cleanup && rm -rf "$pgdata"
Expand Down

0 comments on commit 75f8a83

Please sign in to comment.