High database installation connection
1 background
Recently, the company is making a foreign object detection equipment for military airport runway, but due to the tension between countries, the military release requires our software to adapt a domestic database; After checking, we know that the kernel used by Henkel database is postgresql, and then we have made some modifications ...
Added by designbooks59 on Wed, 20 Oct 2021 23:50:58 +0300
Build a PostgreSQL cluster with automatic failover based on patroni+etcd
Author: Hangzhou meichuang Technology Co., Ltd
Thanks to the open source feature of PostgreSQL, more and more third-party cluster management software fills the ease of use and reliability of PostgreSQL in cluster. patroni+etcd provides a series of cluster management schemes. Etcd is responsible for storing cluster status information to contact ...
Added by inghamn on Fri, 15 Oct 2021 07:22:44 +0300
CTFHUB real exercises over the years
Test site
Boolean blind injection, SSRF
Tried the general login method and did not respond. Check the source code and find that the utilization point of sql injection is in the picture Blind injection script
import string
from requests import *
allstr = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()* ...
Added by phpfanphp on Tue, 12 Oct 2021 09:13:42 +0300
Research on fast inserting large amount of INSERT data into PostgreSQL database
background
In some application scenarios, you need to quickly load a large amount of data into the PostgreSQL database, such as database migration, SQL log analysis, etc. How many ways to quickly insert data on PG? What is the efficiency of each scheme? How can I tune for faster data loading?
Scene setting
SQL log analysis is a tool for coll ...
Added by alin19 on Tue, 12 Oct 2021 03:29:32 +0300
Postgre SQL file splices the queried fields
Postgresql has a lot of built-in practical functions. Here are the combination and cutting functionsEnvironment: PostgreSQL 9.1.2 CENTOS 5.7 final 1, Combined function1.concat a. Grammar introductionconcat(str "any" [, str "any" [, ...]])
Concatenate all but first arguments with separators.
The first parameter is used ...
Added by Joshv1288 on Wed, 01 Apr 2020 13:52:01 +0300
New features interpretation | 8.0 new DML statement (TABLE & VALUES)
Author: Yang Taotao
Senior database expert, specializing in MySQL for more than ten years. Good at mysql, PostgreSQL, MongoDB and other open-source database related backup and recovery, SQL tuning, monitoring operation and maintenance, high availability architecture design, etc. At present, he is working in aikesheng, providing MySQL related ...
Added by akop on Wed, 25 Mar 2020 11:15:53 +0200
When postgresql compiles source code, add configuration options in precompiled configure
Absrtact: This article mainly talks about how to add a configuration option for the auto precompiled script configure in the source code of Postgresql and find a simple example to illustrate. In the src/include/storage/proc.h header file, add an array of bytes occupied by the PGXACT structure.
1. First, take a look at a pic ...
Added by olsrey on Wed, 22 Jan 2020 17:46:30 +0200
Six uses of postgresql highly available repmgr 1 Primary + 1 Standby auto failover
os: ubunbu 16.04
postgresql: 9.6.8
repmgr: 4.1.1
192.168.56.101 node1
192.168.56.102 node2
Under the premise that the production environment ensures the stability of the network, the database can auto failover is the best state. For synchronous replication, it is recommended to configure two Slavs. For asynchronous replication, ...
Added by lasse48 on Wed, 25 Dec 2019 22:35:37 +0200
PostgreSQL-11.3-master-slave stream replication + manual master-slave switch
1 Summary
Use PostgreSQL 11.3 to create two nodes: node1 and node2; configure master-slave stream replication, and then make a manual switch (failover). To simplify the configuration process, two nodes are on the same physical machine.
First, the master-slave synchronous flow replication is established. At first, node1 is the Primary node and ...
Added by RedMaster on Tue, 19 Nov 2019 17:58:44 +0200
[PostgreSQL] prefix fuzzy query level optimization
Pre match blur
Using B-Tree to speed up matching fuzzy query before optimization
Tectonic data
Create a new product table and insert 10 million pieces of data.
create table goods(id int, name varchar);
insert into goods select generate_series(1,10000000),md5(random()::varchar);
Query the product name of "123%" when the index is not ...
Added by DaPrince on Thu, 31 Oct 2019 22:46:18 +0200