Posts

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Postgres Streaming Replication Configuration

Primary - Existing Test Server:
=======
Hostname: nijam-1
IP Address: 53.99.198.11

Secodary - New Test Server
========
Hostname: nijam-2
IP Address: 53.99.198.12

=====================================================
Step 1. stop the slave server
/optt/10.5/bin/pg_ctl -D /DATA stop
Step 2. move the slave data directory to backup location:
mv /DATA/* /tmp/backup
Step 3. change below parameter on master postgresql.conf & pg_hba.conf files .
listen_addresses = 'localhost,53.99.198.11' wal_level = replica # minimal, replica, or logical archive_mode = on archive_command = 'cp %p /ARCHIVES/%f' max_wal_senders = 10 wal_keep_segments = 25
On pg_hba.conf:
host replication postgres 53.99.198.12/24 trust host replication postgres 53.99.198.11/24 trust
Step 4. Restart the master server:
/optt/10.5/bin/pg_ctl -D /DATA restart
Step 5. taking consistancy backup:
psql -c "select pg_start_backup('initial_backup&#…

How to fix xlog / wal log disk full issue in postgres database ?

if archive is full means you can use old log moving script , it will compress & remove the old archives.

if wal log disk full or postgres DB is down due to wal log disk full means you have to perform below steps .


i given  sample  issue for your knowledge which am faced in my environment and given solution for those.

Below is our master and slave xlog information  PRIMARY / MASTER: ================ postgres@tutorialdba_1:> ps -ef|grep postgres postgres 4436 1 0 Jun25 ? 00:05:04 /opt/10.6/bin/postgres -D /data postgres 4437 4436 0 Jun25 ? 00:00:00 postgres: logger process postgres 4439 4436 0 Jun25 ? 00:10:19 postgres: checkpointer process postgres 4440 4436 0 Jun25 ? 00:00:40 postgres: writer process postgres 4441 4436 0 Jun25 ? 00:04:55 postgres: wal writer process postgres 4442 4436 0 Jun25 ? 00:01:31 postgres: autovacuum launcher process postgres 4443 4436 0 Jun25 ? 00:00:27 postgres: archiver pr…

Ora2PG - Oracle/MySQL to Postgres DB migration Version 20.0

Ora2Pg is a free tool used to migrate an Oracle or MySQL database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into your PostgreSQL database.
ora2pg version 20.0 software :
ora2pg-20.0.tarora2pg-20.0  https://github.com/darold/ora2pg/releases/tag/v20.0Some Blogs about DB Migration :
https://2ndquadrant.in/postgresmigration/oracle-to-postgresql-migration/https://2ndquadrant.in/database-migration-from-oracle-to-postgres/ INSTALLATION All Perl modules can always be found at CPAN (http://search.cpan.org/). Just type the full name of the module (ex: DBD::Oracle) into the search input box, it will brings you the page for download.
Releases of Ora2Pg stay at SF.net (https://sourceforge.net/projects/ora2pg/).
Under Windows you should install Strawberry Perl (http://strawberryperl.com/) and the OSes corresponding Oracle clients. It seems that compiling DBD::Oracle fro…