[GENERAL] Using a lock to avoid: could not open relation with OID

2010-01-11 Thread Francisco Reyes
I need to replace a table with a new one. Example.. I create a script that continously does selects like select count(*) from tmp_deleteme_francisco; enough selects to last the duration of second script select count(*) from tmp_deleteme_francisco; Another script then does begin; select *

Re: [GENERAL] Using a lock to avoid: could not open relation with OID

2010-01-11 Thread Craig Ringer
On 12/01/2010 2:04 AM, Francisco Reyes wrote: I need to replace a table with a new one. Example.. I create a script that continously does selects like select count(*) from tmp_deleteme_francisco; enough selects to last the duration of second script select count(*) from

Re: [GENERAL] Using a lock to avoid: could not open relation with OID

2010-01-11 Thread Francisco Reyes
Craig Ringer writes: Possible workaround: Instead of your table creation, renaming and dropping, use TRUNCATE. Have to support both 8.1 and 8.4. If I recall correctly 8.1 did not support truncate inside of a transaction. We are in the process of upgrading everything to 8.4, but until then..