PGPostgreSQL Schema

Table of Contents 1 Concept of Schema Relationship between database schema tables The reason for introducing schema Create Schema View Schema Delete Schema 2Public Schema 3 Schema’s Rope Path 4 Schema and permissions 5 System Catalog Schema 6 How to use it (best practices) 7 Portability The concept of 1 Schema A PostgreSQL database cluster […]

PostgreSQL Replication Slot Analysis and Research

PostgreSQL 9.4 begins to support the new feature of Replication Slot. Regarding Replication Slot, there is not much introduction in the document, and it is difficult to understand what it does at first glance. In fact, the emergence of Replication Slot mainly paves the way for the eventual realization of logical replication and bidirectional replication […]

PGPostgreSQL database management

Table of Contents Database concepts View existing database Create database template database Database configuration Delete database table space concept Table space advantages Notice View tablespace Create tablespace Create a table in the specified tablespace temp_tablespaces Default tablespace Drop tablespace Database Concept A small number of objects, such as roles, databases, and tablespace names, are defined […]

4.7.5.4-Testing_PostgreSQL

Testing PostgreSQL Summary In this section, some SQL Injection techniques for PostgreSQL will be discussed. These techniques have the following characteristics: PHP Connector allows multiple statements to be executed by using ; as a statement separator SQL Statements can be truncated by appending the comment char: –. LIMIT and OFFSET can be used in a […]

Django: Automatically clean PostgreSQL data

1. Write in front In the actual project development process, it is sometimes necessary to consider the size of the database or table to avoid a large amount of data such as log records, which will cause the database to become bloated. This article takes the PostgreSQL database as an example to briefly demonstrate how […]

Docker deploys postgresql-11 and master-slave configuration

Docker deploys postgresql-11 and master-slave configuration 1. Docker deployment postgresql-11 (simple version) 1. Pull the image 2. Start the command script 3. Give the script write permission: 4. Execute the startup script: 5. Check the log and start the error: 6. Install Chinese encoding in the container: 7. Restart the docker container: 2. [Most Complete] […]

PostgreSQL trigger monitors whether there is a delay in table data falling time

PostgreSQL trigger monitors whether there is a delay in table data falling into the table scene description 1. Create a large account (etl_tzq) to monitor the table (tzq_log_t) data of the ordinary account (tzq). 2. Create monitoring data table: tzq_monitor_data_t 3. Create a trigger function: tzq_change_data_trigger() 4. Create a trigger: tri_data_tzq_log_t to monitor the addition, […]

PostgreSQL logical backup and recovery

PostgreSQL logical backup and recovery Logical backup: pg_dump backup database backup table Backup Schema Logical backup: pg_dumpall Logical recovery: psql and pg_restore Restore database recovery table Restore Schema The official tools for PostgreSQL logical backup recovery are pg_dump, pg_dumpall, and pg_restore. pg_dump: Supports backup of databases or tables. The exported file can be a SQL […]

postgresql master-slave setup

Original link: http://www.duozhi.online/2023/10/20/postgresql master-slave construction/ Ansible installation reference: http://www.duozhi.online/2023/10/19/ansible installation in centos7/ 1. Node information 192.168.0.205 192.168.0.206 hosts configuration on ansible [root@MES-203 ansible]# cat hosts [k8s] 192.168.0.203 ansible_ssh_user=root ansible_ssh_pass=admin@6129 192.168.0.204 ansible_ssh_user=root ansible_ssh_pass=admin@6129 [pg] 192.168.0.205 ansible_ssh_user=root ansible_ssh_pass=admin@6129 192.168.0.206 ansible_ssh_user=root ansible_ssh_pass=admin@6129 2. Turn off the firewall I operated through ansible on 203 [root@MES-203 ansible]# ansible pg -m […]

oracle accesses PostgreSQL database through dblink

The bottom layer of Oracle dblink connects to PostgreSQL through ODBC. You need to install unixODBC and PostgreSQL ODBC drivers (their configuration files are: odbcinst.ini and odbc.ini), and you also need to configure the Oracle network to use this driver. This experiment requires that Oracle and PostgreSQL databases be installed first. The following operations are […]