Upload
-
View
200
Download
4
Embed Size (px)
Citation preview
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
PostgreSQL 安定運用のレシピ マニュアルには書かれていないPostgreSQLの真実
篠田典良/ 日本ヒューレット・パッカード株式会社/ 2014年12月5日
PostgreSQL Conference 2014 Hands-On 2
DEMO
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
1. アーキテクチャとOS設定
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 3
プロセスの確認
DEMO
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 4
共有メモリーの確認
DEMO
Key = port * 1,000 + 1 = 5,432,001 = 0x52e2c1
System V Shared Memoryのサイズは56
バイト
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 5
データベース・クラスタと WAL の確認
DEMO
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 6
テーブルとファイルの関係確認
DEMO
テーブルとファイル名の対応を確認
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 7
テーブルとファイルの関係確認
DEMO
• セグメント・ファイル • Free Space Map • Visibility Map
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 8
ALTER SYSTEM 文
DEMO
ALTER SYSTEM 文の実行でインスタンスのパラメータ値が変更されるわけでは無い
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
2. 安定稼働のために必要な設定
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 10
ロケールとエンコーディング
DEMO
Locale=ja_JP
列 c1 と列 c2 は インデックスのオプション以外同一
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 11
ロケールとエンコーディング
DEMO
インデックスが使われない
インデックスが使われる
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 12
ロケールとエンコーディング
DEMO
インデックスが使われる
インデックスが使われない
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
4. 障害発生時の動作と対処
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 14
クラッシュとファイル削除(変更されていないテーブル)
DEMO
疑似クラッシュとファイル削除
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 15
クラッシュとファイル削除(変更されていないテーブル)
DEMO
ファイルが存在しないエラー
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 16
クラッシュとファイル削除(更新されたテーブル)
DEMO
10,000レコードのテーブルに 1,000レコード追加 1,000レコード分の WAL 出力
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 17
クラッシュとファイル削除(更新されたテーブル)
DEMO
疑似クラッシュとファイル削除
エラーは発生しない 10,000 レコードは喪失
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 18
クラッシュとファイル削除(更新されたテーブル)
DEMO
クラッシュ・リカバリが発生したことのみ記録。データ喪失は検知できない。
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Thank you
篠田 典良 テクノロジー事業統括 サービス統括本部 オープンソース部 シニアアーキテクト
[email protected] 日本ヒューレット・パッカード株式会社 本社 〒136-8711 東京都江東区大島2-2-1