pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #6450: PQexec stuck.
4+ messages / 3 participants
[nested] [flat]

* BUG #6450: PQexec stuck.
@ 2012-02-09 06:28 vipul.patel@elitecore.com
  2012-02-09 17:03 ` Re: BUG #6450: PQexec stuck. Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 1 reply; 4+ messages in thread

From: vipul.patel@elitecore.com @ 2012-02-09 06:28 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      6450
Logged by:          Vipul Patel
Email address:      vipul.patel@elitecore.com
PostgreSQL version: 8.4.5
Operating system:   linux
Description:        

hi,
    I am using the PostgreSQL 8.4.5, I wrote C programm which Create table,
and insert record in it. after some number of recored it will stop.
inserting record and make entry in to other table for used to other process
this table was processed and removed/droped by that process. my programm
create new table and start inserting recored in to that table.

now, some time call of create table is stuck which is called by PQexec. to
resolve this i have to kill that postgres process and i have to perform
vacuming and reindexing on the data base. till then i am not able to create
even a simple table in database (create table tbl1(cl1 int);). 

I know that PQexec is blocking call. but in this type of condition the
PQexec will return with failure error so we can handle it.

in current stat the PQexec will stuck till anyone not vacume and reindexing
the DB.




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #6450: PQexec stuck.
  2012-02-09 06:28 BUG #6450: PQexec stuck. vipul.patel@elitecore.com
@ 2012-02-09 17:03 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2012-02-10 08:24   ` Re: BUG #6450: PQexec stuck. Vipul Patel <vipul.patel@elitecore.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Kevin Grittner @ 2012-02-09 17:03 UTC (permalink / raw)
  To: vipul.patel@elitecore.com; pgsql-bugs

<vipul.patel@elitecore.com> wrote:
 
> some time call of create table is stuck which is called by PQexec.
 
What locks and blocking do you see when this happens?
 
http://wiki.postgresql.org/wiki/Lock_Monitoring';
 
Have you considered getting an explicit lock with NOWAIT at the
start of your transaction, to test whether you can currently acquire
the rights to proceed?
 
> in current stat the PQexec will stuck till anyone not vacume and
> reindexing the DB.
 
I've never seen such a situation.  Are you sure that's really
needed, as opposed to something that just takes long enough that the
issue has cleared by the time you're finished with these steps?
 
-Kevin



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #6450: PQexec stuck.
  2012-02-09 06:28 BUG #6450: PQexec stuck. vipul.patel@elitecore.com
  2012-02-09 17:03 ` Re: BUG #6450: PQexec stuck. Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2012-02-10 08:24   ` Vipul Patel <vipul.patel@elitecore.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Vipul Patel @ 2012-02-10 08:24 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-bugs

Hi,
             I don't understand why " CREATE TABLE " Need to lock. 
CREATE TABLE Statement gose Hang state, whether it is execute by any 
client using (PQexec) or Standard "psql".

Regards,
Vipul Patel.


On Thursday 09 February 2012 10:33 PM, Kevin Grittner wrote:
> <vipul.patel@elitecore.com>  wrote:
>
>> some time call of create table is stuck which is called by PQexec.
>
> What locks and blocking do you see when this happens?
>
> http://wiki.postgresql.org/wiki/Lock_Monitoring';
>
> Have you considered getting an explicit lock with NOWAIT at the
> start of your transaction, to test whether you can currently acquire
> the rights to proceed?
>
>> in current stat the PQexec will stuck till anyone not vacume and
>> reindexing the DB.
>
> I've never seen such a situation.  Are you sure that's really
> needed, as opposed to something that just takes long enough that the
> issue has cleared by the time you're finished with these steps?
>
> -Kevin
>
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #6450: PQexec stuck.
@ 2012-02-10 13:18 Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 0 replies; 4+ messages in thread

From: Kevin Grittner @ 2012-02-10 13:18 UTC (permalink / raw)
  To: vipul.patel@elitecore.com; +Cc: pgsql-bugs

[rearranged to avoid top-posting: http://idallen.com/topposting.html]
 
Vipul Patel  wrote:
> On Thursday 09 February 2012 10:33 PM, Kevin Grittner wrote:
>> What locks and blocking do you see when this happens?
>>
>> http://wiki.postgresql.org/wiki/Lock_Monitoring';
 
> I don't understand why " CREATE TABLE " Need to lock.
 
To protect the integrity of the system tables.
 
> CREATE TABLE Statement gose Hang state, whether it is execute by
> any client using (PQexec) or Standard "psql".
 
If you want suggestions on how to accomplish your goals in the
presence of this locking, we'll need more information.
 
-Kevin



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2012-02-10 13:18 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-02-09 06:28 BUG #6450: PQexec stuck. vipul.patel@elitecore.com
2012-02-09 17:03 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2012-02-10 08:24   ` Vipul Patel <vipul.patel@elitecore.com>
2012-02-10 13:18 Re: BUG #6450: PQexec stuck. Kevin Grittner <Kevin.Grittner@wicourts.gov>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox