Search Postgresql Archives

Re: Insert query hangs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 9, 2014 at 1:25 PM, M Tarkeshwar Rao
<m.tarkeshwar.rao@xxxxxxxxxxxx> wrote:
>
> I am sharing the table structure. When we removed the unique index it is working fine.
> And when created normal index(not unique) it is working fine.
>
> After removing unique index we tried to recreate it but it is giving following infinite logs :
>
> concurrent insert in progress within table "eventlogentry"
>
> caveat when building a unique index concurrently is that the uniqueness constraint

Hum, that is interesting.

So to sum up, your database works fine as long as the index isn't
present but you want to enforce this unique constraint. What version
of Postgres is this precisely (9.1.what?) Has it ever been upgraded
using pg_upgrade? Has it suffered a crash or been restored from
backups? What of Adrian Klaver's question about the database being
copied?

When you run create index you get this error? Please paste the actual
command and actual error messages. It should contain more information
than that. Try doing it with this set first:
 \set VERBOSITY 'verbose'

When you're getting these errors please run select * from
pg_stat_activity and paste that information -- remove any confidential
information but leave any INSERT, UPDATE, DELETEs on the table you're
indexing with just the confidential data removed.

Also, I don't think this is right but perhaps it could be a prepared
transaction? Try "select * from pg_prepared_xacts"?

If it's really corruption --which still seems a bit odd to me-- You
might find a simple vacuum or vacuum freeze on the table fixes up the
problem.

-- 
greg



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux