Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying PostgreSQL 10 Administration Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
PostgreSQL 10 Administration Cookbook

PostgreSQL 10 Administration Cookbook

close
close
PostgreSQL 10 Administration Cookbook

PostgreSQL 10 Administration Cookbook

Overview of this book

PostgreSQL is a powerful, open source database management system with an enviable reputation for high performance and stability. With many new features in its arsenal, PostgreSQL 10 allows users to scale up their PostgreSQL infrastructure. This book takes a step-by-step, recipe-based approach to effective PostgreSQL administration. Throughout this book, you will be introduced to these new features such as logical replication, native table partitioning, additional query parallelism, and much more. You will learn how to tackle a variety of problems that are basically the pain points for any database administrator - from creating tables to managing views, from improving performance to securing your database. More importantly, the book pays special attention to topics such as monitoring roles, backup, and recovery of your PostgreSQL 10 database, ensuring high availability, concurrency, and replication. By the end of this book, you will know everything you need to know to be the go-to PostgreSQL expert in your organization.
Table of Contents (19 chapters)
close
close
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Hot logical backups of one database


Logical backup makes a copy of the data in the database by dumping the content of each table as well as object definitions for that same database (such as schemas, tables, indexes, views, privileges, triggers, constraints, and so on).

How to do it…

The command to do this is simple. The following is an example using a database called pgbench:

pg_dump -F c pgbench > dumpfile

Or, you can use the following command:

pg_dump -F c -f dumpfile pgbench

You can also do this through pgAdmin 4, as shown in the following screenshot:

How it works…

The pg_dump utility produces a single output file. This output file can use the split command to separate the file into multiple pieces, if required.

The pg_dump archive file, also known as the custom format, is lightly compressed by default. Compression can be removed or made more aggressive.

Note

Even though, by default, pg_dump writes an SQL script directly to standard output, it is recommended to use the archive file instead,...

Limited Time Offer

$10p/m for 3 months

Get online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech and supported with AI assistants
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon

Create a Note

Modal Close icon
You need to login to use this feature.

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note