Hi Sergio,

Please have a look to the following thread and see if it helps:

http://www.mail-archive.com/[email protected]/msg01545.html

It might be the case as i guess you are all set for 5 minutes time-bins
('sql_history: 5m', 'sql_refresh_time: 300') but i see very "unaligned"
stamp_updated in the queries below, ie. 2010-05-20 08:23:39, 2010-05-20
08:33:43, etc.

Cheers,
Paolo


On Thu, May 20, 2010 at 08:45:30AM -0300, Sergio Charpinel Jr. wrote:
> Hi,
> 
> I'm getting duplicated entrys in PostgreSQL:
> CONTEXTO:  COPY acct_2010_05, linha 8: "2010-05-20 08:23:39,2010-05-20
> 08:20:00,200.137.65.109,66.220.153.19,53559,80,16,6,1,40,1"
> ERRO:  duplicar chave viola a restri??o de unicidade "acct_2010_05_pk"
> CONTEXTO:  COPY acct_2010_05, linha 50: "2010-05-20 08:25:01,2010-05-20
> 08:20:00,201.17.106.35,200.137.68.39,43196,51413,0,17,1,58,1"
> ERRO:  duplicar chave viola a restri??o de unicidade "acct_2010_05_pk"
> CONTEXTO:  COPY acct_2010_05, linha 36: "2010-05-20 08:28:52,2010-05-20
> 08:25:00,200.137.65.102,64.233.163.152,44063,80,20,6,1,40,1"
> ERRO:  duplicar chave viola a restri??o de unicidade "acct_2010_05_pk"
> CONTEXTO:  COPY acct_2010_05, linha 6: "2010-05-20 08:30:01,2010-05-20
> 08:25:00,200.137.65.102,188.126.64.2,16871,80,0,17,3,296,3"
> ERRO:  duplicar chave viola a restri??o de unicidade "acct_2010_05_pk"
> CONTEXTO:  COPY acct_2010_05, linha 3: "2010-05-20 08:33:43,2010-05-20
> 08:30:00,200.137.65.109,64.233.163.104,48418,80,20,6,1,40,1"
> ERRO:  duplicar chave viola a restri??o de unicidade "acct_2010_05_pk"
> CONTEXTO:  COPY acct_2010_05, linha 20: "2010-05-20 08:35:01,2010-05-20
> 08:30:00,95.34.206.145,200.137.65.102,0,0,0,1,1,56,1"
> 
> Here is my table:
> 
> pmacct=> \d acct_2010_05
>                                              Tabela "public.acct_2010_05"
>      Coluna     |            Tipo             |
> Modificadores
> ----------------+-----------------------------+------------------------------------------------------------------------
>  ip_src         | inet                        | not null default
> '0.0.0.0'::inet
>  ip_dst         | inet                        | not null default
> '0.0.0.0'::inet
>  as_src         | bigint                      | not null default 0
>  as_dst         | bigint                      | not null default 0
>  port_src       | integer                     | not null default 0
>  port_dst       | integer                     | not null default 0
>  tcp_flags      | smallint                    | not null default 0
>  ip_proto       | smallint                    | not null default 0
>  packets        | integer                     | not null
>  flows          | integer                     | not null default 0
>  bytes          | bigint                      | not null
>  stamp_inserted | timestamp without time zone | not null default '0001-01-01
> 00:00:00 BC'::timestamp without time zone
>  stamp_updated  | timestamp without time zone |
> ?ndices:
>     "acct_2010_05_pk" PRIMARY KEY, btree (stamp_inserted, ip_src, ip_dst,
> port_src, port_dst, ip_proto)
>     "ibytes_acct_2010_05" btree (bytes)
> 
> 
> What am I doing wrong?
> 
> Thanks in advance.
> 
> Cheers.
> 
> -- 
> Sergio Roberto Charpinel Jr.

> _______________________________________________
> pmacct-discussion mailing list
> http://www.pmacct.net/#mailinglists

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to