pgbench is tools that used to stress test database base on deferent scenarios you can define by simulating database traffic . pgbench can help use also now our database setup limitationsand also get clear understand how our configuration will be able to tackle live use . i personly use pgbench for two propose 1- in…
Postgresql Dba Guide
Using a Separate Data Directory for Your PostgreSQL Cluster
When installing PostgreSQL, it defaults to creating its data directory in /var/lib/postgresql. For better performance, reliability, and management, it is often recommended to relocate the PostgreSQL data directory to a dedicated disk or separate mount point. This can help with I/O performance, backup management, and isolation of database operations from the rest of the system. drop…
PostgreSql logical replication
deferent than stream replication , where the master will send wall log , there we send the actual command such (insert into t1 values (1,”’value” )) physical replication in physical replication , the replica is force to copy the whole database schema tables and so on from master server .physical replication in this case can not…
How to failover stream replication in PostgreSQl
verify the replication on slave server before we start the failover , we need to verified the syn between the master and slave in the slave run the below command and if its return 0 means no delay SELECT CASE WHEN pg_last_wal_receive_lsn() = pg_last_wal_replay_lsn() THEN 0 ELSE EXTRACT(EPOCH FROM now() – pg_last_xact_replay_timestamp()) END AS log_delay;…
PostgreSql master-slave replication
prerequisite : master slave hardware specs we will be implement master-slave streaming replication using two VMS running ubuntu 22 jammyboth node will have PostgreSQL 12 installed , and configured with ip in same subnetbelow are VM details .1.postgresqlDB01 : 10.10.10.772.postgresqlDB02 : 10.10.10.78 installing PostgreSQL first check if PostgreSQL 12 is available in Ubuntu repositories using…
PostgreSql Maintenance in PostgreSQL
type of backup 1. logical backup A logical backup refers to the process of converting the data in a database into a straightforward text format. This typically involves creating scripts of the database, table, or database cluster, which are then saved as SQL files. The scripts for tables and databases are composed of SQL statements….
PostgreSql backup and restore
${toc} type of backup 1. logical backup A logical backup refers to the process of converting the data in a database into a straightforward text format. This typically involves creating scripts of the database, table, or database cluster, which are then saved as SQL files. The scripts for tables and databases are composed of SQL…
PostgreSql table inheritance , table partion
table inheritance To convey the idea that child tables inherit all columns from the parent master table while also allowing child tables to have additional fields, with the ability to specify the “ONLY” keyword for queries on specific tables, you can rewrite the statement as follows: “We enable child tables to inherit all columns from…
Postgresql configuration files
postgresql.conf the file is located in data directory of the cluster default is located in /etc/postgresql/13/main/ check parameter of PostgreSQL inside pgSQL console the parameter you saw in the file can also be viewed in the psql console itselfto check and verified whether they enabled or not , and what is the parameter set for itfor…
PostgreSQL Directory layout
${toc} installation directory layout PostgreSQL is typicality installed to /usr/lib/postgresql/the same directory structure is the same both on windows and Linux.,now we will discussed the content of installation bin folder here you will find all PostgreSQL utility files such as initdb a& bg_ctl data the folder is located in default cluster and might change depend on if there multilabel…








