PostgreSQL 9 Administration Cookbook - Second Edition
Год издания: 2015
Автор: Simon Riggs, Gianni Ciolli, Hannu Krosing, Gabriele Bartolini
Издательство: Packt Publishing
ISBN: 9781849519069
Язык: Английский
Формат: ePub
Качество: Изначально компьютерное (eBook)
Интерактивное оглавление: Да
Количество страниц: 579
Описание: PostgreSQL is a powerful, open source, object-relational database system, fast becoming one of the world's most popular server databases with an enviable reputation for performance and stability and an enormous range of advanced features.
Starting with short and simple recipes to get you back up and running with an exploration of the ins and outs of your database, you will soon dive into core features such as configuration, server control, tables, and data. This is a practical guide aimed at giving sysadmins and database administrators the necessary toolkit to be able to set up, run, and extend powerful databases with PostgreSQL.
Примеры страниц Оглавление
1: First Steps
Getting PostgreSQL
Connecting to the PostgreSQL server
Enabling access for network/remote users
Using graphical administration tools
Using the psql query and scripting tool
Changing your password securely
Avoiding hardcoding your password
Using a connection service file
Troubleshooting a failed connection
2: Exploring the Database
What version is the server?
What is the server uptime?
Locating the database server files
Locating the database server's message log
Locating the database's system identifier
Listing databases on this database server
How many tables in a database?
How much disk space does a database use?
How much disk space does a table use?
Which are my biggest tables?
How many rows in a table?
Quickly estimating the number of rows in a table
Listing extensions in this database
Understanding object dependencies
3: Configuration
Reading The Fine Manual (RTFM)
Planning a new database
Changing parameters in your programs
Finding the current configuration settings
Which parameters are at nondefault settings?
Updating the parameter file
Setting parameters for particular groups of users
The basic server configuration checklist
Adding an external module to PostgreSQL
Using an installed module
Managing installed extensions
4: Server Control
Starting the database server manually
Stopping the server safely and quickly
Stopping the server in an emergency
Reloading the server configuration files
Restarting the server quickly
Preventing new connections
Restricting users to only one session each
Pushing users off the system
Deciding on a design for multitenancy
Using multiple schemas
Giving users their own private database
Running multiple servers on one system
Setting up a connection pool
Accessing multiple servers using the same host and port
5: Tables and Data
Choosing good names for database objects
Handling objects with quoted names
Enforcing the same name and definition for columns
Identifying and removing duplicates
Preventing duplicate rows
Finding a unique key for a set of data
Generating test data
Randomly sampling data
Loading data from a spreadsheet
Loading data from flat files
6: Security
The PostgreSQL superuser
Revoking user access to a table
Granting user access to a table
Creating a new user
Temporarily preventing a user from connecting
Removing a user without dropping their data
Checking whether all users have a secure password
Giving limited superuser powers to specific users
Auditing DDL changes
Auditing data changes
Always knowing which user is logged in
Integrating with LDAP
Connecting using SSL
Using SSL certificates to authenticate the client
Mapping external usernames to database roles
Encrypting sensitive data
7: Database Administration
Writing a script that either succeeds entirely or fails entirely
Writing a psql script that exits on the first error
Performing actions on many tables
Adding/removing columns on a table
Changing the data type of a column
Changing the definition of a data type
Adding/removing schemas
Moving objects between schemas
Adding/removing tablespaces
Moving objects between tablespaces
Accessing objects in other PostgreSQL databases
Accessing objects in other foreign databases
Updatable views
Using materialized views
8: Monitoring and Diagnosis
Checking whether a user is connected
Checking which queries are running
Checking which queries are active or blocked
Knowing who is blocking a query
Killing a specific session
Detecting an in-doubt prepared transaction
Knowing whether anybody is using a specific table
Knowing when a table was last used
Usage of disk space by temporary data
Understanding why queries slow down
Investigating and reporting a bug
Producing a daily summary of log file errors
Analyzing the real-time performance of your queries
9: Regular Maintenance
Controlling automatic database maintenance
Avoiding auto-freezing and page corruptions
Avoiding transaction wraparound
Removing old prepared transactions
Actions for heavy users of temporary tables
Identifying and fixing bloated tables and indexes
Maintaining indexes
Adding a constraint without checking existing rows
Finding unused indexes
Carefully removing unwanted indexes
Planning maintenance
10: Performance and Concurrency
Finding slow SQL statements
Collecting regular statistics from pg_stat* views
Finding out what makes SQL slow
Reducing the number of rows returned
Simplifying complex SQL queries
Speeding up queries without rewriting them
Why a query is not using an index
Forcing a query to use an index
Using optimistic locking
Reporting performance problems
11: Backup and Recovery
Understanding and controlling crash recovery
Planning backups
Hot logical backup of one database
Hot logical backup of all databases
Hot logical backup of all tables in a tablespace
Backup of database object definitions
Standalone hot physical database backup
Hot physical backup and continuous archiving
Recovery of all databases
Recovery to a point in time
Recovery of a dropped/damaged table
Recovery of a dropped/damaged tablespace
Recovery of a dropped/damaged database
Improving performance of backup/recovery
Incremental/differential backup and restore
Hot physical backups with Barman
Recovery with Barman
12: Replication and Upgrades
Replication best practices
Setting up file-based replication – deprecated
Setting up streaming replication
Setting up streaming replication security
Hot Standby and read scalability
Managing streaming replication
Using repmgr
Using Replication Slots
Monitoring replication
Performance and Synchronous Replication
Delaying, pausing, and synchronizing replication
Logical Replication
Bi-Directional Replication
Archiving transaction log data
Upgrading – minor releases
Major upgrades in-place
Major upgrades online

If you like the topic, please click share to help develop our site.

To download the file disable ad blocking, and reload the page.

disable adblock How to disable ad blocking?

Download by magnet link 1 MB Download Torrent

Login using:

Similar topics

Hans-Jürgen Schönig - Mastering PostgreSQL 10 [2018, PDF, ENG]
 2 MB   0 | 0   16-Aug-18 15:10   12

Current time is: 26-May 05:15 :: All times are UTC + 3