3 ms·
> I also really appreciate the transactional TRUNCATE - I pretty much never use it but at least in Postgres I never have to worry about someone else trying to r
by takeda 7y ago
> I also really appreciate the transactional TRUNCATE - I pretty much never use it but at least in Postgres I never have to worry about someone else trying to run one and wiping state unexpectedly.
as long as auto commit is not enabled.
These goodies are possible, because of PostgreSQL's MVCC which requires running vacuum. Nothing is for free unfortunately.
- ants_a 7y agoI don't think undo vs. heap based MVCC choice has any big impact with regards to transactional truncate, nor transactional DDL in general. You are likely to see proof of that within a couple of years.
- jsmith45 7y agoInterestingly even though MSSQL server uses an extremely different implementation of MVCC, it internally has a vacuum equivalent. (Which is required even when all MVCC support is disabled! It is used to enable efficient implementation of deletes, without having to use absurdly coarse locks). MSSQL just handles doing that cleanup silently in the background while exposing basically no no configuration except a trace flag that can turn it off.
- deleted 7y ago[deleted]