Our current PostgreSQL is a master-slave streaming replication mode, standby no external service, only as a hot spare. Machine Environment Description:Postgres version 10Topological relationship prior to switchover:master:10.0.20.25standby:10.0.20.26
PostgreSQL User management:Default User:Postgres when the installation is complete, a user named Postgres is automatically created in the operating system and the Postgres database, together with a database named Postgres.1. Group roles:A group role
PostgreSQL finally released the 10.0 official version! Download the compressed version of the updated version of the machine, and then open pgadmin always Error "The application server could not be contacted.", tried several methods on the web,
different from Oracle. PostgreSQL requires manual control of partition rule triggers.Step one: Create a partitionCREATE table table_partition_1 (CHECK partition_column criteria) inhenrits (table)Step Two: Create a PK and index for the partition
When learning hibernate, the database uses PostgreSQL, the first lesson is thrown wrong, user entity mapping is not alive or alive cannot export the table. Always prompt this sentence:Error:syntax ERROR at or near "User". Later found that if the
Windows x64 Pro 1703 installs the Postgresql-9.6.3-2-windows-x64.exe database in the following steps: First: Download the database installer for: https://www.postgresql.org/ download/Second: After the download is complete, double-click Execute Setup,
1. Create Postgres Users and Groups101501 -G dba-g root-d/usr/local/pgsql Postgres2. Add Postgres User Environment variablescat ~/. bash_profile#. bash_profile# Get the aliases and functionsifthen ~/. BASHRCfi# User specific environment and
COALESCE (EXPR1,EXPR2,EXPR3 ...)Until a non-null value is found, the right-hand expression does not participate in the operation, and if all is NULL, returns NULL.Eg: Determines whether the JSON contains a property, or, if none, takes the default
1. During the data initialization phase during PostgreSQL installation, a role named Postgres is created by default (and a database named Postgres is created).2. The ident authentication mechanism can be used to map the root user of the operating
1. Download Drive jar: https://jdbc.postgresql.org/download.html2. Importing the JAR PackageCreate a new Lib folder and drag the downloaded Jar driver package to the folder.Add the jar driver package to the libraries3. The program code is as follows:
I. Basic concepts:
SQL functions can contain any number of queries, but the function returns only the results of the last query (which must be select. In simple cases, the first row of the last query result is returned. If no row is returned for
A database contains one or more naming modes. The schema also contains tables. The schema also contains other named objects, including data types, functions, and operators. The same object name can be used in different modes without causing
Like anything that contains precious data, PostgreSQL databases should also be backed up frequently. Although this process is quite simple, we should still understand the skills and assumptions used to do this.There are three completely different
Logical backup and Restoration
Pg_dump.exe logical backup
Is a client Tool
Standard SQL files are generated.
You can select different output formats for packaging, compression, and custom formats.
Data Consistency, because
I. pg_tables:
This view provides access to useful information about each table in the database.
Name
Type
Reference
Description
Schemaname
Name
Pg_namespace.nspname
The schema name of the table.
1. Configure the YUM Repository
Modify the original yum repository Configuration:
Vim/etc/yum. repos. d/CentOS-Base.repo
Insert a row at the end of the [base] and [updates] sections (sections:
Exclude = postgresql *
Used to cancel the installation
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.