PostgreSQL 9 Administration Cookbook: LITE Edition
By Simon Riggs
3/5
()
About this ebook
Read more from Simon Riggs
PostgreSQL 11 Administration Cookbook: Over 175 recipes for database administrators to manage enterprise databases Rating: 0 out of 5 stars0 ratingsPostgreSQL 9 Administration Cookbook - Second Edition Rating: 0 out of 5 stars0 ratingsPostgreSQL Administration Cookbook, 9.5/9.6 Edition Rating: 0 out of 5 stars0 ratingsPostgreSQL 9 Administration Cookbook LITE: Configuration, Monitoring and Maintenance Rating: 3 out of 5 stars3/5
Related to PostgreSQL 9 Administration Cookbook
Related ebooks
PostgreSQL Server Programming Rating: 0 out of 5 stars0 ratingsLearning Azure DocumentDB Rating: 0 out of 5 stars0 ratingsMonitoring Docker Rating: 0 out of 5 stars0 ratingsInstant Pentaho Data Integration Kitchen Rating: 0 out of 5 stars0 ratingsDesigning Microservices with Django: An Overview of Tools and Practices Rating: 0 out of 5 stars0 ratingsMySQL Admin Cookbook LITE: Replication and Indexing Rating: 4 out of 5 stars4/5PHPEclipse: A User Guide Rating: 3 out of 5 stars3/5PostgreSQL Administration Essentials Rating: 0 out of 5 stars0 ratingsMySQL Admin Cookbook LITE: Configuration, Server Monitoring, Managing Users Rating: 4 out of 5 stars4/5Monitoring Hadoop Rating: 0 out of 5 stars0 ratingsInstant StyleCop Code Analysis How-to Rating: 0 out of 5 stars0 ratingsPractical OneOps Rating: 0 out of 5 stars0 ratingsGit Best Practices Guide Rating: 0 out of 5 stars0 ratingsInstant PostgreSQL Backup and Restore How-to Rating: 0 out of 5 stars0 ratingsMastering Scala Machine Learning Rating: 0 out of 5 stars0 ratingsPostgreSQL Development Essentials Rating: 5 out of 5 stars5/5Instant Redis Optimization How-to Rating: 0 out of 5 stars0 ratingsLearning PHP Data Objects Rating: 5 out of 5 stars5/5Getting Started with Grunt: The JavaScript Task Runner Rating: 3 out of 5 stars3/5Learning Elasticsearch 7.x: Index, Analyze, Search and Aggregate Your Data Using Elasticsearch (English Edition) Rating: 0 out of 5 stars0 ratingsPowerShell Essential Guide: Master the fundamentals of PowerShell scripting and automation (English Edition) Rating: 0 out of 5 stars0 ratingsPractical API Architecture and Development with Azure and AWS: Design and Implementation of APIs for the Cloud Rating: 0 out of 5 stars0 ratingsPostgreSQL 9 High Availability Cookbook Rating: 5 out of 5 stars5/5MySQL Administrator's Bible Rating: 5 out of 5 stars5/5Building REST APIs with Flask: Create Python Web Services with MySQL Rating: 0 out of 5 stars0 ratingsAdvanced Platform Development with Kubernetes: Enabling Data Management, the Internet of Things, Blockchain, and Machine Learning Rating: 0 out of 5 stars0 ratingsMongoDB Recipes: With Data Modeling and Query Building Strategies Rating: 0 out of 5 stars0 ratingsMastering Postman: A Comprehensive Guide to Building End-to-End APIs with Testing, Integration and Automation Rating: 0 out of 5 stars0 ratingsBeginning SQL Server Reporting Services Rating: 0 out of 5 stars0 ratingsCassandra Design Patterns - Second Edition Rating: 0 out of 5 stars0 ratings
Information Technology For You
How To Use Chatgpt: Using Chatgpt To Make Money Online Has Never Been This Simple Rating: 0 out of 5 stars0 ratingsComputer Science: A Concise Introduction Rating: 4 out of 5 stars4/5Summary of Super-Intelligence From Nick Bostrom Rating: 5 out of 5 stars5/5Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Supercommunicator: Explaining the Complicated So Anyone Can Understand Rating: 3 out of 5 stars3/5Practical Ethical Hacking from Scratch Rating: 5 out of 5 stars5/5ChatGPT: The Future of Intelligent Conversation Rating: 4 out of 5 stars4/5Linux Command Line and Shell Scripting Bible Rating: 3 out of 5 stars3/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5Computer Organization and Design: The Hardware / Software Interface Rating: 4 out of 5 stars4/5Data Governance For Dummies Rating: 0 out of 5 stars0 ratingsAWS Certified Cloud Practitioner: Study Guide with Practice Questions and Labs Rating: 5 out of 5 stars5/5Hacking Essentials - The Beginner's Guide To Ethical Hacking And Penetration Testing Rating: 3 out of 5 stars3/5Cybersecurity for Beginners : Learn the Fundamentals of Cybersecurity in an Easy, Step-by-Step Guide: 1 Rating: 0 out of 5 stars0 ratingsCompTIA A+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Core 1 Exam 220-1101 Rating: 0 out of 5 stars0 ratingsHandbook of Digital Forensics and Investigation Rating: 4 out of 5 stars4/5Health Informatics: Practical Guide Rating: 0 out of 5 stars0 ratingsThe Basics of Hacking and Penetration Testing: Ethical Hacking and Penetration Testing Made Easy Rating: 4 out of 5 stars4/520 Windows Tools Every SysAdmin Should Know Rating: 5 out of 5 stars5/5Micro Niches Rating: 0 out of 5 stars0 ratingsCompTIA Network+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam N10-008 Rating: 0 out of 5 stars0 ratingsWindows Registry Forensics: Advanced Digital Forensic Analysis of the Windows Registry Rating: 4 out of 5 stars4/5Cyber Security Consultants Playbook Rating: 0 out of 5 stars0 ratingsHow to Find a Wolf in Siberia (or, How to Troubleshoot Almost Anything) Rating: 0 out of 5 stars0 ratingsInkscape Beginner’s Guide Rating: 5 out of 5 stars5/5An Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5
Reviews for PostgreSQL 9 Administration Cookbook
1 rating0 reviews
Book preview
PostgreSQL 9 Administration Cookbook - Simon Riggs
Table of Contents
PostgreSQL Administration Cookbook: LITE
Credits
About the Authors
About the Reviewers
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. First Steps
Introduction
Introducing PostgreSQL 9
What makes PostgreSQL different?
Getting PostgreSQL
How to do it...
How it works...
There's more...
Connecting to PostgreSQL server
Getting ready
How to do it...
How it works...
Inspecting your connection information
See also
Enabling access for network/remote users
How to do it...
How it works...
There's more...
See also
Using graphical administration tools
How to do it...
How it works...
There's more...
See also
Using 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...
Troubleshooting a failed connection
How to do it...
There's more...
2. Exploring the Database
Introduction
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...
Locate the database server files
Getting ready
How to do it...
How it works...
There's more...
Locate the database server message log
Getting ready
How to do it...
How it works...
Getting ready
How to do it...
How it works...
There's more...
List databases on this database server?
How to do it...
How it works...
There's more...
How many tables 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 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 many rows in a table?
How to do it...
How it works...
Quick estimate of the number of rows in a table
How to do it...
How it works...
There's more...
Function 1
Function 2
Understanding object dependencies
Getting ready
How to do it...
How it works...
There's more...
3. Database Administration
Introduction
Writing a script that either all succeeds or all fails
How to do it...
How it works...
There's more...
Writing a psql script that exits on first error
Getting ready
How to do it...
How it works...
There's more...
Performing actions on many tables
Getting ready
How to do it...
How it works...
There's more...
Using pg_batch to run tasks in parallel
Adding/Removing the columns of a table
How to do it...
How it works...
There's more...
Changing datatype of a column
Getting ready
How to do it...
How it works...
There's more...
Adding/Removing schemas
How to do it...
There's more...
Schema-level privileges
Moving objects between schemas
How to do it...
How it works...
There's more...
Adding/Removing tablespaces
Getting ready
How to do it...
How it works...
There's more...
Putting pg_xlog on a separate device
Tablespace-level tuning
Moving objects between tablespaces
Getting ready
How to do it...
How it works...
There's more...
Accessing objects in other PostgreSQL databases
Getting ready
How to do it...
How it works...
There's more...
See also
Making views updateable
Getting ready
How to do it...
How it works...
There's more...
Index
PostgreSQL Administration Cookbook: LITE
PostgreSQL Administration Cookbook: LITE
Copyright © 2011 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2011
Production Reference: 1130411
Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK.
ISBN 978-1-849516-20-4
www.packtpub.com
Cover Image by John M. Quick ( <john.m.quick@gmail.com> )
Credits
Authors
Simon Riggs
Hannu Krosing
Reviewers
Gabriele Bartolini
Dimitri Fontaine
Acquisition Editor
Sarah Cullington
Technical Editor
Hithesh Uchil
Indexer
Hemangini Bari
Production Coordinator
Kruthika Bangera
Cover Work
Kruthika Bangera
About the Authors
Simon Riggs is a major developer and one of the few committers on the PostgreSQL database project, as well as CTO of 2ndQuadrant, providing 24x7 support and services to PostgreSQL users worldwide.
Simon works actively as a database architect and support troubleshooter, skills which drive and shape his contributions to the development of operational features for PostgreSQL. Feature credits include Point in Time Recovery, Warm Standby replication, Hot Standby, Asynchronous Commit, Partitioning and many other performance and tuning features. His designs and solutions can be found throughout the PostgreSQL code and documentation.
Simon has also previously worked with Oracle, Teradata, and DB2 and holds multiple certifications. His previous experience covers management and senior technical roles in the banking, telecommunications, and software industries. Simon's early research work has been published by the Royal Society.
Hannu Krosing is a principal consultant at 2ndQuadrant and a Technical Advisor at Ambient Sound Investments. As the original database architect at Skype Technologies, Hannu was responsible for designing the Skytools suite of replication and scalability technologies. Hannu has more than 12 years experience working with and contributing to the PostgreSQL project.
About the Reviewers
Gabriele Bartolini is a long time open-source programmer, writing Linux/Unix applications in C and C++ for over 10 years, specializing in search engines and web analytics with large databases.
Gabriele has a degree in Statistics from the University of Florence. His areas of expertise are data mining and data warehousing, having worked on web traffic analysis in Australia and Italy.
Gabriele is a consultant with 2ndQuadrant and an active member of the international PostgreSQL community.
Gabriele currently lives in Prato, a small but vibrant city located in the northern part of Tuscany, Italy. His second home is Melbourne, Australia, where he has studied at Monash University and worked in the ICT sector.
His hobbies include calcio
(football or soccer, depending on which part of the world you come from) and playing his Fender Stratocaster electric guitar.
Thanks to my family, in particular Cathy who encourages me by saying there is always something new to learn.
Dimitri Fontaine is part of the PostgreSQL community and has been contributing to open source for more than 10 years. He is the lead developer of enterprise ready solutions such as pgloader (ETL), PostgreSQL prefix indexing (telephony routing), pg_staging (development environment maintenance from production backups), preprepare (allow easy usage of prepare statements behind a connection pooler), and some backports of recent PostgreSQL features
He also contributed to Skytools and the Londiste replication system and, authored a PHP layer for the PGQ event handler, allowing for robust asynchronous processing and code reuse.
Dimitri's passion is system architecture & design, with the goals of reduced maintenance time and very high availability
Professional experience, community involvement, and PostgreSQL expertise have led Dimitri to now work as a principal consultant at 2ndQuadrant, France.
Preface
PostgreSQL is an advanced SQL