Upload
mysqlops
View
3.632
Download
5
Embed Size (px)
DESCRIPTION
Greenplum管理实践
Citation preview
Practice
http://weibo.com/viadea
2011.07.24
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
All of these are my own opinion, not for any
company.
Feel free to correct me if I am wrong.
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Architecture – share nothing(MPP)
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Query Worker Processes
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Resource Queue
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Data Mirror
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Master Mirror
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Parallel Backup
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Non-Parallel Restore
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Non-Parallel Restore
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Q&A
• Before going further, here comes Q&A
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
1.Managing Roles and Privileges
• Role=User+Group
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
2. Configuring Client Authentication
• pg_hba.conf
local all gpadmin trust
host all gpadmin 127.0.0.1/32 password
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
3. Managing Workload and Resources
• Resource queue
CREATE RESOURCE QUEUE executive WITH (ACTIVE_STATEMENTS=3, PRIORITY=MAX);
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
4. Defining Database Objects
• Multi-level Partition DesignCheck constraint
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
5. Managing Data
• Vacuuming the Database
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
6. Loading and Unloading Data
• gploadYAML file
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
7. High Availability
• Segment failuregprecoverseg
• Master failuregpactivatestandby
• Standby master out of syncgpinitstandby
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
8. Backup and restore
• gp_dump and gp_restore• pg_dump
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
9. Expanding a Greenplum System
• gpexpand• To interactively create an expansion input file:• gpexpand -f hosts_file• To initialize segments and create expansion schema:• gpexpand -i input_file -D database_name• To redistribute tables:• gpexpand -d duration• To remove the expansion schema:• gpexpand -c
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Q&A
• Before going further and further, here comes Q&A
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Troubleshooting(1)
• SIGSEGVsgp_reraise_signal
If enabled, will attempt to dump core if a fatal server error occurs.
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Troubleshooting(2)
• Out of memorygp_vmem_protect_limit
Sets the amount of memory (in number of MBs) that all postgres processes of a segment instance can consume.
Work_mem
Specifies the amount of memory to be used by internal sort operations and hash tables before switching to temporary disk files.
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Troubleshooting(3)
• Hung querypg_locks
pg_stat_activity
pstack
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Troubleshooting(4)
• Orphan processIn version 4.1:
pg_locks. gp_segment_id
The Greenplum segment id (dbid) where the lock is held.
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Troubleshooting(5)
• Catalog problempg_stat_operations
The view pg_stat_operations shows details about the last operation performed on a database object (such as a table, index, view or database) or a global object (such as a role).
$GPHOME/bin/lib/gpcheckcat
Check the system catalog tables for inconsistencies.
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Q&A
• Before going further and further and further, here comes Q&A
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办
Let’s stop here for now
商业智能研讨沙龙-上海站 ITPUB ChinaUnix IXPUB 主办