How to lock entire Postgres table but allow reads Sorry for the noob question, but what is the correct table level lock mode to allow reading from a table but not writing to it?

The scenario that I have is that I want to prevent two tables from being written to while a third table is receiving an update. As soon as that update completes it's okay for the other two tables to unlock and receive additional updates.

If it isn't possible to prevent those tables from being written to while still allowing them to be read from then I could also just lock them entirely so they can't be written to or read from during the lock.

Here is the documentation page, I just don't understand what it's saying: https://www.postgresql.org/docs/current/explicit-locking.html
Don't do that. Explicitly locking tables is almost always the wrong thing to do. If you describe the use case in more detail, I am confident that a better solution can be found.

Locking tables frequently will keep autovacuum from doing its important work on the table, and eventually an anti-wraparound autovacuum job will come along and block you, bringing processing to a standstill.