Tag Info

New answers tagged

2

There is more than one possibility here. One is what Peter Eisentraut suggested in the post you linked, using a writable CTE which deletes the rows from the table which will be processed or inserted elsewhere in the same query. This approach may be viable with small datasets. However, there are chances that some table bloat will occur with time, or ...


0

This Truncate process held highest level lock on tables, so no other query can run on the table in parallel with the truncate. So, if You do : truncate table a and after that, You do : insert into table a values (....) What happen in the postgres is : insert will run only after truncate finish. So no new data will get lost. And in contrary, if You ...



Top 50 recent answers are included