>>> On Sat, Jan 26, 2008 at 7:39 AM, in message <[EMAIL PROTECTED]>, "Scott Marlowe" <[EMAIL PROTECTED]> wrote: > On Jan 26, 2008 5:42 AM, growse <[EMAIL PROTECTED]> wrote: >> Scott Marlowe-2 wrote: >> > Can you import to another table then >> > >> > begin; >> > alter table realtable rename to garbage; >> > alter table loadtable rename to realtable; >> > commit; >> > >> > ? >> >> This is a possibility. My question on this is that would an ALTER TABLE real >> RENAME TO garbage be faster than a DROP TABLE real? > > I don't know. They're both pretty fast. I'd do a test, with parallel > contention on the table and see. We do something similar (using DROP TABLE) on a weekly cycle. We get occasional errors, even with the database transaction. I wonder whether we might dodge them by using the rename, and then dropping the old table after a brief delay. -Kevin
---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster