Looks like you've a date in ymd column which falls outside the defined
range for the two partitions.
You can define a partition which can hold all the data which falls
before 20150101
with something like below:
...partition pre2015 end ('20150101'::date)...
Regards,
Gagan Brahmi
On May 14, 2016 08:34, "[email protected]" <[email protected]> wrote:
> Hi,all:
> I am using hawq 1.1.0,When I using gpload there is a problem:
>
> [gpadmin@stars71 ~]$ psql -d postgres
> postgres=# create table stocks
> postgres-# (
> postgres(# storeno bigint,
> postgres(# itemno bigint,
> postgres(# itemname text,
> postgres(# spec text,
> postgres(# itemseq bigint,
> postgres(# stocks bigint,
> postgres(# unit text,
> postgres(# ymd date
> postgres(# )
> postgres-# distributed by (itemno)
> postgres-# partition by range(ymd)
> postgres-# (
> postgres(# partition p2015 start ('20150101'::date) end ('20160101'::date),
> postgres(# partition p2016 start ('20160101'::date) end ('20170101'::date)
> postgres(# );
>
> NOTICE: CREATE TABLE will create partition "stocks_1_prt_p2015" for table
> "stocks"
>
> NOTICE: CREATE TABLE will create partition "stocks_1_prt_p2016" for table
> "stocks"
> CREATE TABLE
> postgres=# \q
>
> [gpadmin@stars71
> ctl]$ gpfdist -d /data/data/ -p 8081 -l /home/gpadmin/log &
> [gpadmin@stars71 ctl]$ cat stocks.ctl
> ---
> VERSION: 1.0.0.1
> DATABASE: postgres
> USER: gpadmin
> HOST: stars71
> PORT: 5432
> GPLOAD:
> INPUT:
> - SOURCE:
> LOCAL_HOSTNAME:
> - stars71
> PORT: 8081
> FILE:
> - /data/data/*
> - COLUMNS:
> - storeno: bigint
> - itemno: bigint
> - itemname: text
> - spec: text
> - itemseq: bigint
> - stocks: bigint
> - unit: text
> - ymd: date
> - FORMAT: text
> - DELIMITER: E'\t'
> - ERROR_LIMIT: 25
> - ERROR_TABLE: stocks_err
> OUTPUT:
> - TABLE: stocks
> - MODE: INSERT
> [gpadmin@stars71 ctl]$ gpload -f stocks.ctl
> 2016-05-14 23:24:19|INFO|gpload session started 2016-05-14 23:24:19
> 2016-05-14 23:24:19|INFO|setting schema 'public' for table 'stocks'
>
> 2016-05-14 23:24:20|INFO|started gpfdist -p 8081 -P 8082 -f "/data/data/*" -t
> 30
>
> 2016-05-14 23:24:20|WARN|A gpload control file processing warning occurred. A
> delimiter must have a length of one. Special characters must be quoted.
> gpload will assume this is a sql escape character sequence.
> 2016-05-14 23:24:20|ERROR|ERROR: *no partition for partitioning key*
> (seg5 localhost:40000 pid=14591)
>
> encountered while running INSERT INTO public."stocks"
> ("storeno","itemno","itemname","spec","itemseq","stocks","unit","ymd") SELECT
> "storeno","itemno","itemname","spec","itemseq","stocks","unit","ymd" FROM
> ext_gpload20160514_232419_14569
> 2016-05-14 23:24:20|INFO|rows Inserted = 0
> 2016-05-14 23:24:20|INFO|rows Updated = 0
> 2016-05-14 23:24:20|INFO|data formatting errors = 0
> 2016-05-14 23:24:20|INFO|gpload failed
>
> It was failed,even if there is only one line.
>
> ------------------------------
> [email protected]
>