Developer Perspective
Building
Q: Report error: "'openssl/ssl.h' file not found" when building hawq on Mac.
A: The problem can be:
- openssl haven't been installed, so we need to install it using "
brew
install openssl
" - or even installed, but it doesn't override the system default setting (setting env variable path) . This problem often occurs after we updated software using "brew update", the default option for brew is to install without option '–force', so we need to run "brew link openssl --force" to link it to system lib path.
Debugging & Fixing
Q: How to get all tuples with all MVCC versions in catalog table?
Need to set guc before running SELECT statement: set gp_select_invisible=true;
Q: How to set fixed virtual segment number to run query?
Need to set enforce_virtual_segment_number for random table or default_hash_table_bucket_number for hash table.
User Perspective
Configuration
Optimization
Q: How to vacuum all catalog talbels?
You can run below bash file:
#!/bin/bash
DBNAME="ddata"
VCOMMAND="VACUUM ANALYZE"
psql -tc "select '$VCOMMAND' || ' pg_catalog.' || relname || ';' from pg_class a,pg_namespace b where a.relnamespace=b.oid and b.nspname= 'pg_catalog' and a.relkind='r'" $DBNAME | psql -a $DBNAME