Re: Insert query hangs

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Insert query hangs
Дата
Msg-id CAM-w4HOa7ABvq=ncTuwP_nxZpYFHrSHOzoPh2ODKiMB-ym1S2g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Insert query hangs  (M Tarkeshwar Rao <m.tarkeshwar.rao@ericsson.com>)
Список pgsql-general
On Wed, Jul 9, 2014 at 1:25 PM, M Tarkeshwar Rao
<m.tarkeshwar.rao@ericsson.com> 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


В списке pgsql-general по дате отправления:

Предыдущее
От: "Edson F. Lidorio"
Дата:
Сообщение: Download Postgresql 9.4 beta for Windows is not available.
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Download Postgresql 9.4 beta for Windows is not available.