Summary

PostgreSQL provides several locking mechanisms to increase concurrency and performance, including implicit locking via MVCC and explicit locking via table-level locks, row-level locks, and advisory locks.

The MVCC model is one of the biggest selling factors of PostgreSQL, since one can achieve high performance. In general, the MVCC model is suitable for most common database access patterns and it is better to use the MVCC model instead of explicit locking where possible. 

Using explicit locking via table-level or row-level locks enables the user to solve several data inconsistency issues. However, explicit locking, if not planned carefully, might increase the chances of having deadlocks. Finally, PostgreSQL provides advisory locks, which are used to emulate pessimistic locking strategies. 

The next chapter, covers the concepts of authentication and authorization. It describes PostgreSQL authentication methods and explains the structure of a PostgreSQL host-based authentication configuration file. It also discusses the permissions that can be granted to database building objects such as schemas, tables, views, indexes, and columns. Finally, it shows how sensitive data, such as passwords, can be protected using different techniques, including one-way and two-way encryption.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset