linux:postgresql

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
linux:postgresql [2019/01/28 16:28] – [DB に格納された暗号化パスワードで認証] ともやんlinux:postgresql [2024/01/24 21:12] (現在) – [データベース修復/最適化] ともやん
行 2: 行 2:
  
 ===== インストール ===== ===== インストール =====
-Fedoraでは、以下のようにパッケージをインストールする。(Fedora 10, 18 にて確認)+Fedoraでは、以下のようにパッケージをインストールする。(Fedora 10, 18, 29 にて確認)
 <code> <code>
 $ sudo dnf install postgresql postgresql-server postgresql-contrib pgadmin3 $ sudo dnf install postgresql postgresql-server postgresql-contrib pgadmin3
行 212: 行 212:
 <code> <code>
 $ createuser -a -d -U postgres -P username $ createuser -a -d -U postgres -P username
-Enter password for new role******** +新しいロールのためのパスワード
-Enter it again******** +もう一度入力してください:
-CREATE ROLE+
 </code> </code>
  
行 238: 行 237:
 options\\ options\\
 -a データのみをダンプ\\ -a データのみをダンプ\\
--b ラージオブジェクトもダンプする。注: デフォルトではダンプされません\\ +-b ラージオブジェクトもダンプする。(注: デフォルトではダンプされません)\\ 
--d INSERTコマンドにてダンプ通常はCOPYコマンド)\\+-d INSERTコマンドにてダンプ(通常はCOPYコマンド)\\
 -D カラム名を含めたINSERTコマンドにてダンプ\\ -D カラム名を含めたINSERTコマンドにてダンプ\\
 -s テーブルのみダンプ\\ -s テーブルのみダンプ\\
 -t 特定のテーブルのみダンプ\\ -t 特定のテーブルのみダンプ\\
--F アウトプットファイルの形式を指定cがカスタム、tがtar、pがテキスト)\\+-F アウトプットファイルの形式を指定(cがカスタム、tがtar、pがテキスト)\\ 
 +-v 冗長モードを指定(verbose - ダンプファイルに詳細なオブジェクトコメント、開始時刻、終了時刻、進行状況を出力、標準エラーにメッセージ出力)
 \\ \\
  
行 301: 行 301:
 # /etc/rc.d/init.d/postgresql start    <- サービス開始 # /etc/rc.d/init.d/postgresql start    <- サービス開始
 </code> </code>
 +
 +===== パッケージ更新後のデータベースアップグレード =====
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269"><u style="text-decoration-style:single">sudo</u></span> <span style="color:#26A269">postgresql-setup</span> <span style="color:#A347BA">--upgrade</span>
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 + * Upgrading database.
 + * Upgraded OK.
 +WARNING: The configuration files were replaced by default configuration.
 +WARNING: The previous configuration and data are stored in folder
 +WARNING: /var/lib/pgsql/data-old.
 +WARNING: If you&apos;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
 + * See /var/lib/pgsql/upgrade_postgresql.log for details.
 +</pre></html></WRAP>
 +</WRAP>
  
 ===== RedHatにおけるpostgresql.confの場所 ===== ===== RedHatにおけるpostgresql.confの場所 =====
  • linux/postgresql.1548660515.txt.gz
  • 最終更新: 2019/05/18 02:23
  • (外部編集)