Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > ExecuteTruncate...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 9488 of 10965
Post > Topic >>

ExecuteTruncate quirk: expects a unique list of relations

by nikkhils@[EMAIL PROTECTED] (Nikhils) Jun 5, 2008 at 08:21 PM

------=_Part_2851_27612703.1212677481561
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

Consider this simple case:

postgres=# TRUNCATE foo, foo;
ERROR:  cannot TRUNCATE "foo" because it is being used by active queries
in
this session

The above occurs because the ExecuteTruncate() function invokes
truncate_check_rel() in a loop. Since the same table name appears twice,
the
rd_refcnt for table "foo" is bumped up to 2, causing the above failure.

We might want to add a step to ExecuteTruncate(), or whatever calls it, to
make the list unique.

Regards,
Nikhils
-- 
EnterpriseDB http://www.enterprisedb.com

------=_Part_2851_27612703.1212677481561
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi, <br><br>Consider this simple case:<br><br>postgres=# TRUNCATE foo,
foo;
<br>ERROR:&nbsp; cannot TRUNCATE &quot;foo&quot; because it is being used
by active queries 
in this session
<br>
<br>The above occurs because the ExecuteTruncate() function invokes
truncate_check_rel() in a loop. Since the same table name appears twice,
the rd_refcnt for table &quot;foo&quot; is bumped up to 2, causing the
above failure.<br>
<br clear="all">We might want to add a 
step to ExecuteTruncate(), or whatever calls it, to make the list 
unique.<br><br>Regards,<br>Nikhils<br>-- <br>EnterpriseDB <a
href="http://www.enterprisedb.com">http://www.enterprisedb.com</a>

------=_Part_2851_27612703.1212677481561--
 




 2 Posts in Topic:
ExecuteTruncate quirk: expects a unique list of relations
nikkhils@[EMAIL PROTECTED  2008-06-05 20:21:21 
Re: ExecuteTruncate quirk: expects a unique list of
bruce@[EMAIL PROTECTED]   2008-07-16 12:55:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 9:17:17 CST 2008.