.
スポンサーリンク

PostgreSQL9.6からPostgreSQL11.1へアップグレードしました。

投稿ツリー


このトピックの投稿一覧へ

kondo

なし PostgreSQL9.6からPostgreSQL11.1へアップグレードしました。

msg# 1
depth:
0
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2019/1/23 1:24 | 最終変更
kondo  管理人   投稿数: 104

mastodonで使用しているPostgreSQLをアップグレードしました。

最初にpostgresql-11をインストール&セットアップする。

postgresqlを停止する。
systemctl stop postgresql-9.6.service
systemctl stop postgresql-11.service

# アップグレードの整合性チェックする。

$ sudo su - postgres
bash-4.2 $ /usr/pgsql-11/bin/pg_upgrade -c -b /usr/pgsql-9.6/bin/ -B /usr/pgsql-11/bin/ -d /var/lib/pgsql/9.6/data -D /var/lib/pgsql/11/data

以下のエラーが起こる。
connection to database failed: fe_sendauth: no password supplied

could not connect to source postmaster started with the command:
"/usr/pgsql-9.6/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/9.6/data" -o "-p 50432 -b -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/lib/pgsql'" start
Failure, exiting

アクセスができないため以下のファイルの認証md5をtrustに変更する。
/var/lib/pgsql/9.6/data/pg_hba.conf
/var/lib/pgsql/11/data/pg_hba.conf

$ sudo su - postgres
bash-4.2$ /usr/pgsql-11/bin/pg_upgrade -c -b /usr/pgsql-9.6/bin/ -B /usr/pgsql-11/bin/ -d /var/lib/pgsql/9.6/data -D /var/lib/pgsql/11/data

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 invalid "unknown" user columns ok
Checking for hash indexes ok
Checking for presence of required libraries ok
Checking database user is the install user ok
Checking for prepared transactions ok

Clusters are compatible

bash-4.2$ /usr/pgsql-11/bin/pg_upgrade -b /usr/pgsql-9.6/bin/ -B /usr/pgsql-11/bin/ -d /var/lib/pgsql/9.6/data -D /var/lib/pgsql/11/data

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 invalid "unknown" 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_clog 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 ok
Sync data directory to disk ok
Creating script to analyze new cluster ok
Creating script to delete old cluster ok
Checking for hash indexes ok

Upgrade Complete


Optimizer statistics are not transferred by pg_upgrade so,
once you start the new server, consider running:
./analyze_new_cluster.sh

Running this script will delete the old cluster's data files:
./delete_old_cluster.sh

投票数:1 平均点:10.00
返信する

この投稿に返信する

題名
ゲスト名
投稿本文

  条件検索へ


検索

ページの一覧 索引

ログイン

ユーザー名:


パスワード:





パスワード紛失  |新規登録

メインメニュー

更新ページ

ad
スポンサーリンク

投稿一覧

オンライン状況
25 人のユーザが現在オンラインです。 (1 人のユーザが フォーラム を参照しています。)

登録ユーザ: 0
ゲスト: 25

もっと...