For a COPY FROM...ON SEGMENT command, the table distribution policy
is checked when data is copied into the table. By default, an error is returned if a
data row violates the table distribution policy. You can disable the distribution policy
@@ -378,7 +402,8 @@ COPY {table [(column [, ...])] | (query)}
COPY FROM...ON SEGMENT was run.
If you run COPY FROM...ON SEGMENTand the server configuration parameter
gp_enable_segment_copy_checking is false, manual
- redistribution of table data might be required.
+ redistribution of table data might be required. See the ALTER TABLE clause
+ WITH REORGANIZE.
When you specify the LOG ERRORS clause, Greenplum Database captures errors
that occur while reading the external table data. You can view and manage the captured error
log data.
@@ -583,12 +608,9 @@ COPY {table [(column [, ...])] | (query)}
isolation mode and log errors:
COPY sales FROM '/home/usr1/sql/sales_data' LOG ERRORS
SEGMENT REJECT LIMIT 10 ROWS;
- To copy segment data for later use, use the ON SEGMENT argument. Use of
- the COPY TO ON SEGMENT argument takes the form:
- COPY
- table TO
- '<SEG_DATA_DIR>/gpdumpname<SEGID>_suffix' ON
- SEGMENT;
+ To copy segment data for later use, use the ON SEGMENT clause. Use of the
+ COPY TO ON SEGMENT command takes the form:
+ COPY table TO '<SEG_DATA_DIR>/gpdumpname<SEGID>_suffix' ON SEGMENT;
The <SEGID> is required. However, you can substitute an absolute path
for the <SEG_DATA_DIR> string literal in the path.
When you pass in the string literal <SEG_DATA_DIR> and
@@ -597,14 +619,10 @@ COPY {table [(column [, ...])] | (query)}
For example, if you have mytable with the segments and mirror segments
like
this:contentid | dbid | file segment location
- 0 | 1 |/home/usr1/data1/gpsegdir0
-
+ 0 | 1 | /home/usr1/data1/gpsegdir0
0 | 3 | /home/usr1/data_mirror1/gpsegdir0
-
1 | 4 | /home/usr1/data2/gpsegdir1
-
- 1 | 2 | /home/usr1/data_mirror2/gpsegdir1
-running
+ 1 | 2 | /home/usr1/data_mirror2/gpsegdir1