PostgreSQL 16 Administration Cookbook Solve Real-World Database Administration Challenges with 180+ Practical Recipes and Best Practices

Written by a team of well-known PostgreSQL experts, this new edition will cover all the latest updates of PostgreSQL 16 including 12+ new and improved recipes on logging, monitoring, security and high-performance Purchase of the print or Kindle book includes a free PDF eBook Key Features Skill-up as...

Descripción completa

Detalles Bibliográficos
Otros Autores: Ciolli, Gianni, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham, England : Packt Publishing, Limited [2023]
Edición:First edition
Colección:Expert insight.
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009786738006719
Tabla de Contenidos:
  • Cover
  • Copyright
  • Contributors
  • Table of Contents
  • Preface
  • Chapter 1: First Steps
  • Introducing PostgreSQL 16
  • What makes PostgreSQL different?
  • Robustness
  • Security
  • Ease of use
  • Extensibility
  • Performance and concurrency
  • Scalability
  • SQL and NoSQL data models
  • Popularity
  • Commercial support
  • Research and development funding
  • How to get PostgreSQL
  • How to do it...
  • How it works...
  • There's more…
  • Connecting to the PostgreSQL server
  • Getting ready
  • How to do it...
  • How it works…
  • There's more…
  • See also
  • Enabling access for network/remote users
  • How to do it…
  • How it works…
  • There's more…
  • See also
  • Using the pgAdmin 4 GUI tool
  • How to do it…
  • How it works…
  • See also
  • Using the psql query and scripting tool
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • See also
  • Changing your password securely
  • How to do it…
  • How it works…
  • Avoiding hardcoding your password
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Using a connection service file
  • How to do it…
  • How it works…
  • There's more...
  • Troubleshooting a failed connection
  • How to do it…
  • There's more…
  • PostgreSQL in the cloud
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • PostgreSQL with Kubernetes
  • Getting ready
  • How to do it...
  • How it works…
  • There's more...
  • PostgreSQL with TPA
  • Getting ready
  • How to do it...
  • There's more
  • Chapter 2: Exploring the Database
  • What type of server is this?
  • How to do it…
  • There's more...
  • What version is the server?
  • How to do it…
  • How it works…
  • There's more…
  • What is the server uptime?
  • How to do it…
  • How it works…
  • See also
  • Locating the database server files
  • Getting ready
  • How to do it...
  • How it works...
  • There's more….
  • Locating the database server's message log
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Locating the database's system identifier
  • Getting ready
  • How to do it…
  • How it works…
  • Listing databases on the database server
  • How to do it…
  • How it works...
  • There's more...
  • How many tables are there in a database?
  • How to do it...
  • How it works…
  • There's more…
  • How much disk space does a database use?
  • How to do it...
  • How it works...
  • How much memory does a database currently use?
  • How to do it…
  • How it works…
  • How much disk space does a table use?
  • How to do it…
  • How it works…
  • There's more…
  • Which are my biggest tables?
  • How to do it...
  • How it works…
  • How many rows are there in a table?
  • How to do it…
  • How it works...
  • Quickly estimating the number of rows in a table
  • How to do it…
  • How it works…
  • There's more…
  • Listing extensions in this database
  • How to do it…
  • How it works…
  • There's more…
  • See also
  • Understanding object dependencies
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Chapter 3: Server Configuration
  • Read the fine manual (RTFM)
  • How to do it…
  • How it works…
  • There's more…
  • Planning a new database
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Setting the configuration parameters for the database server
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Setting the configuration parameters in your programs
  • How to do it…
  • How it works…
  • There's more…
  • Finding the configuration settings for your session
  • How to do it…
  • How it works…
  • Finding parameters with non-default settings
  • How to do it…
  • How it works...
  • There's more...
  • Setting parameters for particular groups of users
  • How to do it…
  • How it works….
  • A basic server configuration checklist
  • Getting ready
  • How to do it…
  • There's more…
  • Adding an external module to PostgreSQL
  • Getting ready
  • How to do it…
  • Installing modules using a software installer
  • Installing modules from PGXN
  • Installing modules from source code
  • How it works...
  • Using an installed module/extension
  • Getting ready
  • How to do it…
  • How it works...
  • Managing installed extensions
  • How to do it…
  • How it works…
  • There's more…
  • Chapter 4: Server Control
  • An overview of controlling the database server
  • Starting the database server manually
  • Getting ready
  • How to do it…
  • How it works…
  • Stopping the server safely and quickly
  • How to do it…
  • How it works…
  • See also
  • Stopping the server in an emergency
  • How to do it…
  • How it works…
  • Reloading server configuration files
  • How to do it…
  • How it works…
  • There's more…
  • Restarting the server quickly
  • How to do it…
  • There's more…
  • Preventing new connections
  • How to do it…
  • How it works…
  • Restricting users to only one session each
  • How to do it…
  • How it works…
  • Pushing users off the system
  • How to do it…
  • How it works…
  • Deciding on a design for multitenancy
  • How to do it…
  • How it works…
  • Using multiple schemas
  • Getting ready
  • How to do it…
  • How it works…
  • Giving users their own private databases
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • See also
  • Running multiple servers on one system
  • Getting ready
  • How to do it…
  • How it works…
  • Setting up a connection pool
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Accessing multiple servers using the same host and port
  • Getting ready
  • How to do it…
  • There's more…
  • Running multiple PgBouncer on the same port to leverage multiple cores
  • Getting ready
  • How to do it….
  • How it works…
  • Chapter 5: Tables and Data
  • Choosing good names for database objects
  • Getting ready
  • How to do it…
  • There's more…
  • Handling objects with quoted names
  • Getting ready
  • How to do it...
  • How it works…
  • There's more…
  • Identifying and removing duplicates
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Preventing duplicate rows
  • Getting ready
  • How to do it…
  • How it works…
  • There's more...
  • Duplicate indexes
  • Uniqueness without indexes
  • A real-world example - IP address range allocation
  • A real-world example - a range of time
  • Finding a unique key for a set of data
  • Getting ready
  • How to do it…
  • How it works…
  • Generating test data
  • How to do it...
  • How it works…
  • There's more…
  • See also
  • Randomly sampling data
  • How to do it…
  • How it works...
  • Loading data from a spreadsheet
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Loading data from flat files
  • Getting ready
  • How to do it...
  • How it works…
  • There's more…
  • Making bulk data changes using server-side procedures with transactions
  • Getting ready
  • How to do it…
  • There's more…
  • Dealing with large tables with table partitioning
  • How to do it…
  • How it works…
  • There's more…
  • Finding good candidates for partition keys
  • Getting ready
  • How to do it…
  • There's more…
  • Consolidating data with MERGE
  • Getting ready
  • How to do it…
  • There's more...
  • Deciding when to use JSON data types
  • Getting ready
  • How to do it…
  • Example: moving sparse columns to JSON
  • Example: expose JSON data using a view
  • There's more…
  • Chapter 6: Security
  • An overview of PostgreSQL security
  • Typical user roles
  • The PostgreSQL superuser
  • How to do it…
  • How it works…
  • There's more…
  • Other superuser-like attributes
  • See also.
  • Revoking user access to tables
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Database creation scripts
  • Default search path
  • Securing views
  • Granting user access to a table
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Granting user access to specific columns
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Granting user access to specific rows
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Creating a new user
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Temporarily preventing a user from connecting
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Limiting the number of concurrent connections by a user
  • Revoking a user's database access
  • How it works…
  • Forcing NOLOGIN users to disconnect
  • Removing a user without dropping their data
  • Getting ready
  • How to do it…
  • How it works…
  • Checking whether all users have a secure password
  • How to do it…
  • How it works…
  • Giving limited superuser powers to specific users
  • Getting ready
  • How to do it…
  • Assigning backup privileges to a user
  • How it works…
  • There's more…
  • Auditing database access
  • Getting ready
  • Auditing access
  • Auditing SQL statements
  • Auditing table access
  • Managing the audit log
  • Auditing data changes
  • Always knowing which user is logged in
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Not inheriting user attributes
  • Integrating with LDAP
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Setting up the client to use LDAP
  • Replacement for the User Name Map feature
  • See also
  • Connecting using encryption (SSL / GSSAPI)
  • Getting ready
  • How to do it…
  • How it works…
  • There's more…
  • Getting the SSL key and certificate.
  • Setting up a client to use SSL.