Overview

Background

When a database is initialized using gs_initdb, a database directory is created, a system catalog is generated, and a default database and a template database are created.

System Catalogs

A large number of system catalogs and views are generated when a database is initialized, many of which allow access from any database user.

NOTE: Permissions on pg_user_status and pg_auth_history system catalogs are granted only to initialization users and sysadmin users.

Generated Databases

  • template1: A template database. When you create a database, all content in the template1 database is copied. The settings of template1 are determined by the parameters of gs_initdb.
  • template0: The most initial backup database provided by openGauss. template0 can be used to generate an empty database if necessary.
  • postgres: A default database provided for users, tools, and third-party applications.
Feedback
编组 3备份
    openGauss 2025-06-26 22:43:36
    cancel