Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
-
NoMad136665y@IntrusionCM get one transaction to lock the damn table and do it's nasty without letting others read.
-
@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 -
@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.
Transaction isolation levels can suck a dick.
Also,
serialization
doesn't
fucking
work.
(╯°□°)╯︵ ┻━┻
rant
sql stuff