Search Postgresql Archives

Locking a table read-only temporarilty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

  I've been looking up locking, and perhaps I'm being dense, but I'm struggling to figure out how to create a lock to make a table read-only for a short period of time.

  I want to set a table to be read-only, so that any other clients that try to UPDATE or INSERT will hold until the lock is released. I've been reading;

https://www.postgresql.org/docs/10/explicit-locking.html

  But I'm not sure which lock would be what I want, and I don't see how to release the lock when finished. Could someone hit me with a clue-stick?

Thanks!

-- 
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of Einstein’s brain than in the near certainty that people of equal talent have lived and died in cotton fields and sweatshops." - Stephen Jay Gould

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux