DB シャードグループの操作
Aurora PostgreSQL Limitless Database の DB シャードグループを追加および管理するには、次のタスクを実行します。
トピック
Aurora PostgreSQL Limitless Database DB クラスターへの接続
Aurora PostgreSQL Limitless Database を操作するには、クラスターライターまたはリーダーエンドポイントに接続します。psql
または PostgreSQL で動作するその他の接続ユーティリティを使用できます。
$
psql -hDB_cluster_endpoint
-pport_number
-Udatabase_username
-d postgres_limitless
次の例では、CLI で作成した DB クラスターの エンドポイントを使用します。
$
psql -h my-limitless-cluster.cluster-ckifpdyyyxxx.us-east-1.rds.amazonaws.com -p 5432 -U postgres -d postgres_limitless
注記
Aurora PostgreSQL Limitless Database の DB シャードグループのデフォルトのデータベースは postgres_limitless
です。
Limitless 接続プラグインの使用
Aurora PostgreSQL Limitless Database に接続する際、クライアントはクラスターエンドポイントを使用して接続し、Amazon Route 53 によってトランザクションルーターにルーティングされます。ただし、Route 53 の負荷分散機能には制限があり、トランザクションルーターのワークロードが不均等になる可能性があります。AWS JDBC ドライバー
DB シャードグループ内のルーターとシャードの数を確認する
次のクエリを使用して、ルーターとシャードの数を確認できます。
SELECT * FROM rds_aurora.limitless_subclusters; subcluster_id | subcluster_type ---------------+----------------- 1 | router 2 | router 3 | shard 4 | shard 5 | shard 6 | shard
DB シャードグループの記述
describe-db-shard-groups
の AWS CLI コマンドを使用して DB シャードグループを記述します。次のパラメータはオプションです。
-
--db-shard-group-identifier
– DB シャードグループの名前。
次の例では、特定の DB シャードグループを記述します。
aws rds describe-db-shard-groups --db-shard-group-identifier
my-db-shard-group
出力は以下の例のようになります。
{ "DBShardGroups": [ { "DBShardGroupResourceId": "shardgroup-8986d309a93c4da1b1455add17abcdef", "DBShardGroupIdentifier": "my-shard-group", "DBClusterIdentifier": "my-limitless-cluster", "MaxACU": 1000.0, "ComputeRedundancy": 0, "Status": "available", "PubliclyAccessible": false, "Endpoint": "my-limitless-cluster.limitless-ccetp2abcdef.us-east-1.rds.amazonaws.com" } ] }
DB シャードグループの再起動
最大容量の変更により max_connections
パラメータが変更された場合など、DB シャードグループを再起動する必要があることがあります。
AWS Management Console または AWS CLI を使用して、DB シャードグループの容量を変更できます。
次の手順に従ってください。
AWS Management Console にサインインし、Amazon RDS コンソール (https://console.aws.amazon.com/rds/
-
[データベース] ページに移動します。
-
再起動する DB シャードグループを選択します。
-
[アクション] で、[再起動] を選択します。
-
[確認] を選択してください。
DB パラメータグループを再起動するには、reboot-db-shard-group
の AWS CLI コマンドを使用して、次のパラメータを指定します。
-
--db-shard-group-identifier
– DB シャードグループの名前。
次の の例では、DB シャードグループを再起動します。
aws rds reboot-db-shard-group --db-shard-group-identifier
my-db-shard-group