27
NoMad
4y

Transaction isolation levels can suck a dick.

Also,
serialization
doesn't
fucking
work.
(╯°□°)╯︵ ┻━┻

Comments
  • 2
    @NoMad

    Transaction levels are nasty and tricky.

    Which DBMS / what do u try to achieve?
  • 2
    @IntrusionCM get one transaction to lock the damn table and do it's nasty without letting others read.
  • 2
    @NoMad don't do it via transaction levels. That will not work.

    Depending on DBMS:
    - issue a table lock
    - use FOR SHARE / UPDATE
    - maaaybe depending on what you do, transaction snapshots might do the trick
  • 2
    @IntrusionCM you do know that transaction locks are the safest here, right?
  • 2
    Like, I'm locking the table for 5ms in this.
  • 3
    @NoMad Yes.

    But you want a select statement to lock the whole table instead of locking only the rows affected by the transaction.

    Hence my comment - this won't work.

    You'll need to work either on an upper level (table wide lock) or - depending on what you want to achieve - work around it.

    All in all.... Locking a table is "a bad idea"… but might be necessary. If you would tell me what u try to achieve by the table level lock, I might be able to help.

    But transaction levels won't help ya here.
Add Comment