Does selecting data from heap (table without clustered index) with nolock block writers?

All we need is an easy explanation of the problem, so here it is. I tried replicating the scenario given here: https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-bulk_operation-lock-during-a-heap-nolock-scan/ Created 2 tables - table1 with clustered index,…

Continue ReadingDoes selecting data from heap (table without clustered index) with nolock block writers?

ALTER TABLE … ADD COLUMN on a small table takes forever, pg_stat_activity doesn't show any queries on this table

All we need is an easy explanation of the problem, so here it is. So this is the query that hangs forever: ALTER TABLE tasks ADD COLUMN in_progress BOOLEAN NOT…

Continue ReadingALTER TABLE … ADD COLUMN on a small table takes forever, pg_stat_activity doesn't show any queries on this table