On May 3, 2008, at 9:29 PM, Patrick TJ McPhee wrote:
How about something along the lines of BEGIN; ALTER TABLE log RENAME to log_old; CREATE TABLE log(...); COMMIT; BEGIN; LOCK table log_old; COPY log_old TO 'filename-path'; DROP TABLE log_old; COMMIT;I believe this will keep the writers writing while keeping the efficiencyof truncating.
Brilliant.