1、?08?8 PostgreSQL Greenplum Database Apache HAWQ Greenplum on HDFS 1.x 2.0?PostgreSQL?BGWriterWALWriterArchiver?1?Postmasterfork?StatsCollectorAutoVaccumSysLoggerPostgresServer?1?1?简?libpq?SQL?1MPP08?8?SQL?1?2?3?N?1?SEGMENT 1SEGMENT 0SLICE 3SLICE 3Gather MotionGather MotionHash JoinSELECT customer,am
2、ountFROM salesHash JoinJOIN customerUSING(cust_id)WHERE date=2008;HashRedistributionMotionRedistributionHashMotionTable ScanSLICE 2Table ScanSLICE 2SLICE1SLICE 1?1?1gangQE ProcessSlice 3ganggangQE ProcessSlice 2QE ProcessSlice 2QE ProcessSlice 1QE ProcessSlice 1Gang?N?2NGang11-gang2N-1n-gangTABLE 1T
3、ABLE 2TABLE 3TABLE N?4?1?11?11?1?Segment?8?1?1?Segment?0?4?1?8?1?1?塈InterconnectSegment?Segment?Segment?Segment?Segment?Segment?Segment?Segment?1?1?Segment?1?1?Segment?1?Segment?1?Segment?1?1?1?塈?塈?塈?1?Segment?Segment?8?1?1?塈InterconnectSegment?Segment?Segment?Segment?Segment?Segment?Segment?Segment
4、?1?1?Segment?1?1?Segment?1?Segment?1?Segment?1?1?1?塈?塈?塈?1?Segment?Segment?8?1?1?塈InterconnectSegment?Segment?Segment?Segment?Segment?Segment?Segment?Segment?1?1?Segment?1?1?Segment?1?Segment?1?Segment?1?1?1?塈?塈?塈Interconnect?Segment?8?1?1?Segment?塈InterconnectSegment?Segment?Segment?Segment?Segment
5、?Segment?Segment?Segment?1?1?Segment?1?1?Segment?1?Segment?1?Segment?1?1?1?塈?塈?塈?Segment?塈?1?8?1?1?塈InterconnectSegment?Segment?Segment?Segment?Segment?Segment?Segment?Segment?1?1?Segment?1?1?Segment?1?Segment?1?Segment?1?1?1?塈?塈?塈?8?Segment?8?Segment?Segment?8?1?1?塈InterconnectSegment?Segment?Segme
6、nt?Segment?Segment?Segment?Segment?Segment?1?1?Segment?1?1?Segment?1?Segment?1?Segment?1?1?1?塈?塈?塈?Segment?0Segment?1Segment?Segment?Segment 1(primary)Segment?Segment?Segment 3(primary)Segment 0(primary)Segment 2(primary)Master?Master?Segment?Segment 5(mirror)Segment?Segment 6(mirror)SegmentSegment
7、0(mirror)?SegmentSegment 7(mirror)?塈?塈?Segment?2Segment?3Segment?Segment?Segment 5(primary)Segment?Segment 6(primary)Segment?Segment 7(primary)Standby?Segment 4(primary)Standby?Segment?Segment 1(mirror)Segment?Segment 2(mirror)Segment?Segment 3(mirror)Segment?Segment 4(mirror)?塈?塈?Greenplum on HDFSM
8、aster?塈?Non-AO?AO?Segment?Segment?Segment?Segment?0Segment?1Segment?2/goh/seg0/goh/seg1/goh/seg2/DataNodeDataNodeDateNodeNameNodeHAWQ 1.x?塈?1?Segment?4?1?Master?4?Metadata DispatchHDFS TruncateMaster?4?1?1?AO?4EOFMaster?4?40?Non-AO?HDFS?Non-AO?AO?DDLHeap?libhdfs3?简HDFSC+?HDFS?简?SegmentMaster?Master?
9、3?Segment?3?Segment?Segment?Segment?AO?AO?AO?Segment?0Segment?1Segment?2/goh/seg0/goh/seg1/goh/seg2/DataNodeDataNodeDateNodeNameNode?1?OrderID43OrderDateOct 20 2005Oct 20 2005Oct 20 2005Oct 20 2005Oct 20 2005Oct 20 2005Oct 20 2005Oct 20 2005Oct 20 2005Oct 20 2005Oct 20 2005Oct 20 2005CustomerID12111
10、42644546647732481250345621315634410282535555?8?Master?Segment?Segment?Segment?seg0seg1seg2HDFS?8?Master?Segment?Segment?Segment?tbl0tbl1tbl2tbl3tbl4HDFS?1Master?Master?QDQDQDQDQDQDSegment?Segment?QE1Segment?Segment?Segment?QE1Segment?QE0QE0QE0QE0QE2QE2QE2QE0QE1QE1QE1QE0QE1tbl1tbl2tbl3seg0seg1seg2tbl0tbl4HDFSHDFS?&?a?1?8?1?MasterMasterMasterQDQDQDQD?SegmentSegmentQE1QE0QE1SegmentQE1QE3SegmentQE0QE2QE5SegmentSegmentQE1QE4QE0QE0?1?GreenplumDatabasePostgreSQL?塈?NEXT?Cloud DataWarehouseApacheHAWQ?1?