pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
problems about updating a table and cluster this table at the same time
2+ messages / 2 participants
[nested] [flat]

* problems about updating a table and cluster this table at the same time
@ 2005-08-15 17:03 jing han <jing_han_66@yahoo.com>
  2005-08-15 18:26 ` Re: problems about updating a table and cluster this table at the same time Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: jing han @ 2005-08-15 17:03 UTC (permalink / raw)
  To: pgsql-interfaces

Hello,

I work on a large database. I make use of cron job to
cluster certain database table periodically.

I found when updating a table and clusterdb cron job
happens to run at exactly the same time clustering
that table, then both updating and clustering stuck.
Database server hault. This cause my system hault.

I tried to lock that table using 'lock tableName'
command before updating that table, I run 'clusterdb
-t tableName dbName', I found clusterdb ignore the
fact that the table is locked and go ahead finishing
cluster job.

So how can I protect the table when I update it to
avoid cluster cron job interrupt the update?

Any suggestion will be greatly appreciated!


jing


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 



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

* Re: problems about updating a table and cluster this table at the same time
  2005-08-15 17:03 problems about updating a table and cluster this table at the same time jing han <jing_han_66@yahoo.com>
@ 2005-08-15 18:26 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2005-08-15 18:26 UTC (permalink / raw)
  To: jing han <jing_han_66@yahoo.com>; +Cc: pgsql-interfaces

jing han <jing_han_66@yahoo.com> writes:
> I found when updating a table and clusterdb cron job
> happens to run at exactly the same time clustering
> that table, then both updating and clustering stuck.
> Database server hault. This cause my system hault.

This is really hard to believe.  Can you give us a repeatable test case?

			regards, tom lane



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


end of thread, other threads:[~2005-08-15 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-15 17:03 problems about updating a table and cluster this table at the same time jing han <jing_han_66@yahoo.com>
2005-08-15 18:26 ` Tom Lane <tgl@sss.pgh.pa.us>

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