19. Administering an AlloyDB Database
2024. 11. 27. 08:51ㆍ클라우드/GCP
Task 1. Examine a Database Flag
- 데이터베이스 플래그 검사
클릭
1.To add a database flag to your instance, expand Advanced Configuration Options and click on Add a Database Flag.
2.Browse the list of avaiable flags (inside Choose a flag) to get a sense of the supported options. You will not add an additional flag as part of this lab.
3.Click Cancel twice to exit the Edit Primary instance screen.
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
반응형
'클라우드 > GCP' 카테고리의 다른 글
18. Migrating to AlloyDB from PostgreSQL Using Database Migration Service (0) | 2024.11.26 |
---|---|
17. AlloyDB - Database Fundamentals (0) | 2024.11.25 |
16. Connect an App to a Cloud SQL for PostgreSQL Instance (0) | 2024.11.24 |
15. Migrate to Cloud SQL for PostgreSQL using Database Migration Service (0) | 2024.11.23 |
14. Cloud Composer: Copying BigQuery Tables Across Different Locations (0) | 2024.11.22 |