The PostgreSQL administration covers the most important PostgreSQL database server administration activities. We will discuss about roles and groups administration, databases creation, tablespaces management, databases backup and restore.
PostgreSQL Database and Schema Management
In this section, we will show you how to manage databases in PostgreSQL including creating databases, modifying existing database’s features and deleting databases. In addition, the schema management is covered.
- PostgreSQL Create Database – create new databases by using
CREATE DATABASEstatement. - PostgreSQL Alter Database – change features of an existing database using the
ALTER DATABASEstatement. - PostgreSQL Drop Database – remove databases using
DROPdatabase statement.
PostgreSQL Roles Administration
In PostgreSQL, a role is an account. A role that has login right is called a user. A role may be a member of other roles. The roles that contains other roles is known considered as a group. In this section, you will learn how to manage roles and groups effectively.
- PostgreSQL Roles Management: introduces you to PostgreSQL roles concept and shows you how to create user roles and group roles by using PostgreSQL
CREATE ROLEstatement.
PostgreSQL Backup and Restore Databases
This section shows you how to use various PostgreSQL backup and restore tools including pg_dump, pg_dumpall, psql, pg_restore and pgAdmin to backup and restore databases.
- PostgreSQL Backup – introduces you to practical ways to backup your databases by using PostgreSQL backup tool including
pg_dumpandpg_dumpall. - PostgreSQL Restore – shows you various ways to restore PostgreSQL databases by using
psqlandpg_restoretools.
Tablespace Management
PostgreSQL tablespaces allow you to control how data stored in the file system. The tablespaces are very useful in many cases such as managing large tables and improving database performance. In this section, we will show you how to manage tablespaces in PostgreSQL effectively.
- PostgreSQL Creating Tablespace – introduces you to PostgreSQL tablespace and shows you how to create tablespaces by using
CREATE TABLESPACEstatement. - PostgreSQL Changing Tablespace – shows you how to rename, change owner and set parameter for a tablespace by using
ALTER TABLESPACEstatement. - PostgreSQL Deleting Tablespaces – learns how to delete tablespaces by using PostgreSQL
DROP TABLESPACEstatement.
PostgreSQL Tips
- PostgreSQL Reset Password – shows you how to reset forgotten password of the
postgresuser. - psql Commands – gives you the most common psql command to help you query data from PostgreSQL faster and more effective.
- PostgreSQL Describe Table – gets information on a particular table.
- PostgreSQL Show Databases – lists all databases in the current database server
- PostgreSQL Show Tables – shows all tables in the current database.