19. Administering an AlloyDB Database
Task 1. Examine a Database Flag
- 데이터베이스 플래그 검사
클릭
Task 2. Setup a Database Extension
- 데이터베이스 확장 설정
export ALLOYDB=ALLOYDB_ADDRESS |
echo $ALLOYDB > alloydbip.txt |
psql -h $ALLOYDB -U postgres |
\c postgres |
CREATE EXTENSION IF NOT EXISTS PGAUDIT; |
select extname, extversion from pg_extension where extname = 'pgaudit'; |
Task 3. Create a Read Pool Instance for an Existing Cluster
- 기존 클러스터에 대한 읽기 풀 인스턴스 생성
Task 4. Setup Backups
- 백업 설정
Task 5. Examine Monitoring in the AlloyDB Console
export ALLOYDB=$(cat alloydbip.txt) |
pgbench -h $ALLOYDB -U postgres -i -s 50 -F 90 -n postgres |
psql -h $ALLOYDB -U postgres |
select count (*) from pgbench_accounts; |
Run the following pgbench operation to simulate a workload against lab-instance. The operation corresponds to a load of fifty (50) clients, across two (2) threads, polling every thirty (30) seconds, over the course of three (3) minutes. You will be prompted for the postgres user's password which is Change3Me.
pgbench -h $ALLOYDB -U postgres -c 50 -j 2 -P 30 -T 180 postgres |
- AlloyDB 콘솔에서 모니터링 검토
참고: https://www.cloudskillsboost.google/focuses/100851?parent=catalog
Administering an AlloyDB Database | Google Cloud Skills Boost
In this lab, you perform administrative tasks that are essential to the optimal use of an AlloyDB for PostgreSQL database.
www.cloudskillsboost.google