DELETE and INSERT - is this simple query statement sufficient to preserve atomicity?
Yes you can use transactions.

And yes if one of transaction statements fails all of it will rollback. Meaning : Nothing will happen or everything will be done.


  Your code :


BEGIN;
DELETE FROM table_one WHERE some_id = 1;
INSERT INTO table_one(col1, col2, col3) VALUES (val1, val2, val3), (val4, val5, val6), ...
COMMIT;


See following link for more information about transactions: Transactions in PostgreSql