Alter table command for renaming table is getting stuck.

From: Dhaval Rami <dhavalrami(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Alter table command for renaming table is getting stuck.
Date: 2009-04-28 10:10:22
Message-ID: 18e902e00904280310x3e123012k91def1da7210902@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi, I am working on a data warehousing project, our system is handling
huge amount of live data.
We get data in form of events.
Frequency of events goes up to 1000 events/second. average frequency is 200
events/second.
We are using libpg to connect pg-server and insert each event into database
tables.
As a part of data warehousing I am rotating table every 50000 records.
Also to reduce overhead I commit a transaction after inserting 1000 records.

Problem I am facing is as follows

While rotating (renaming) a table the "alter table" command is stuck and
whole system is blocked.
Blocking is also observed while "creating new table" after rename command is
finished.

No other process/query is accessing this table until rotation is done.

The problem occurs twice a day, rest of the time it is working fine.
I could not find the cause.

Please give me suggestions / solution

Thanks in advance.

--
Dhaval.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Paul Rogers 2009-04-28 12:27:58 Anyone tried storing software users as database users?
Previous Message Jan-Peter Seifert 2009-04-28 08:43:05 log_rotation_age