[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slony1-general
Subject:    Re: [Slony1-general] timestamp in unique key
From:       Steve Singer <steve () ssinger ! info>
Date:       2012-01-27 1:34:13
Message-ID: BLU0-SMTP47EF2C5A44F0B2E207FC50DC8E0 () phx ! gbl
[Download RAW message or body]

On Wed, 25 Jan 2012, Sergey Suleymanov wrote:

If my memory serves me right,

Postgresql stores more bits of precision for timestamps than get printed as 
text.  So a timestamp converted to text and added back into the database 
might not always return true on the equal operator.

I can't think of a work around for slony that doesn't involve adding another 
column to your table.

Steve


>
>       Hello everybody, I need help.
>
>  let's to say, there is a table:
>
> \d molot.sens_data
> ...
> device_id  | integer                  | not null
> time_stamp | timestamp with time zone | not null
> ...
> Indexes:
>    "sens_data_device_id_key" UNIQUE, btree (device_id, time_stamp)
>
>  slonik script:
>
> create set (id=3, origin=1);
> set add table ( set id=3, origin=1, id=32,
>                fully qualified name = 'molot.sens_data',
>                key = 'sens_data_device_id_key');
> subscribe set ...
>
>  Everything is ok, copy_set went well, replication has begun. Inserts are
>  successfully, but updates and deletes are not.
>
>  Append "serial primary key" column really don't want as long (table is
>  about 250 mil records). Is there any other way?
>
>
>  slony1 - 1.2.21, Pg - 8.4.9
>
> --
>  Sergey Suleymanov
> _______________________________________________
> Slony1-general mailing list
> Slony1-general@lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general
>

_______________________________________________
Slony1-general mailing list
Slony1-general@lists.slony.info
http://lists.slony.info/mailman/listinfo/slony1-general
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic