From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Deniz Atak <denizatak(at)gmail(dot)com> |
Subject: | Re: Table dublicates values |
Date: | 2011-07-16 16:55:35 |
Message-ID: | 201107160955.36133.adrian.klaver@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Saturday, July 16, 2011 1:47:50 am Deniz Atak wrote:
> Hi all,
>
> I am using postgresql on Glassfish server. When I restart the server for
> some reason, one of my databases' tables duplicates the values. For example
> aTable is from aDatabase:
>
> select * from aTable
> col1 | col2
> -----------------------+---------
> text/html | 1672
> text/javascript | 374
> text/css | 94
> text/xml | 21
> text/plain | 14
> text/html | 1672
> text/javascript | 374
> text/css | 94
> text/xml | 21
> text/plain | 14
>
> Do you have any opinion why this is happening? I can write a workaround
> code to handle this situtation but I want to learn the reason for this. If
> someone has any opinion about this issue it will be highly appreciated.
> Thanks in advance.
If it is possible, put a unique index on the (col1,col2) combination and check
the logs for the action that trips the index. My wild guess is that the
application is caching values that are then flushed to the server on restart.
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Nolan | 2011-07-16 17:40:41 | Re: Slow query with sub-select |
Previous Message | cesitarps | 2011-07-16 16:14:35 | pass XML as an argument and INSERT (key/value pairs) in postgresql |