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.
>
Is any ORM in the picture (TOPLink, hybernate)? These can be set to
fire DDL automatically. Turn on sql-logging.
Alternatively, find the code that is supposed to populate it once, and
make sure it only gets called once. No Postgres feature is going to do
that accidentally.