cstore_fdw
cstore_fdw copied to clipboard
Drop statement leaves table in inconsistent state after rollback
Hello, I have ran into issue with dropping cstore table and then rollbacking the transaction. Rollback leaves the table in an inconsistent state as the table definition still exists (which is correct), but cstore data files are deleted and not rolled back with the rest of the transaction. Steps to reproduce:
-- create empty cstore table
create foreign table cstore_drop_test()
server cstore_server;
-- query without errors
select * from cstore_drop_test;
-- drop cstore table and then rollback
DO language plpgsql
$$
DECLARE
BEGIN
drop foreign table cstore_drop_test;
rollback;
END
$$;
-- query fails on 'could not open file "xxx.footer" for reading'
select * from cstore_drop_test;
yes, unfortunately this is a known issue that won't be fixed. It involves a file operation that can not be rolled back.
We have added a different storage mechanism that is pending release under develop
branch. This should solve the truncate issue you are having.
But it is not of release quality yet at this time