Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learn PostgreSQL

You're reading from  Learn PostgreSQL

Product type Book
Published in Oct 2020
Publisher Packt
ISBN-13 9781838985288
Pages 650 pages
Edition 1st Edition
Languages
Concepts
Authors (2):
Luca Ferrari Luca Ferrari
Profile icon Luca Ferrari
Enrico Pirozzi Enrico Pirozzi
Profile icon Enrico Pirozzi
View More author details

Table of Contents (27) Chapters

Preface 1. Section 1: Getting Started
2. Introduction to PostgreSQL 3. Getting to Know Your Cluster 4. Managing Users and Connections 5. Section 2: Interacting with the Database
6. Basic Statements 7. Advanced Statements 8. Window Functions 9. Server-Side Programming 10. Triggers and Rules 11. Partitioning 12. Section 3: Administering the Cluster
13. Users, Roles, and Database Security 14. Transactions, MVCC, WALs, and Checkpoints 15. Extending the Database - the Extension Ecosystem 16. Indexes and Performance Optimization 17. Logging and Auditing 18. Backup and Restore 19. Configuration and Monitoring 20. Section 4: Replication
21. Physical Replication 22. Logical Replication 23. Section 5: The PostegreSQL Ecosystem
24. Useful Tools and Extensions 25. Toward PostgreSQL 13 26. Other Books You May Enjoy

Role password encryption

The passwords associated with roles are always stored in an encrypted form, even if the role is created without the ENCRYPTED PASSWORD property. PostgreSQL determines the algorithm to use in order to encrypt the password via the password_encryption option in the postgresql.conf configuration file. By default, the value of the option is set to md5, which means that the password is computed as MD5 hashes. The only other option available since PostgreSQL 10 is scram-sha-256, which will make the encryption much more robust.

You can quickly check the configuration from the operating system command line:

$ sudo -u postgres grep password_encryption $PGDATA/postgresql.conf
password_encryption = scram-sha-256 # md5 or scram-sha-256

Alternatively, you can inspect the pg_settings system catalog:

forumdb=# SELECT name, setting, enumvals 
FROM pg_settings
WHERE name = 'password_encryption';

name | setting | enumvals
--...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}