Re: Postgresql replication not starting after running pg_basebackup

From: Александр Кайданник <kaydannik(dot)a(at)gmail(dot)com>
To: "Jake O'brien Fagan" <jake(at)househappy(dot)org>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Postgresql replication not starting after running pg_basebackup
Date: 2014-09-19 12:59:27
Message-ID: CAD_EgNL-1LZUrKKMu4W=C13bJZfzsGtPYNhd23GMPfWjPfzUwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Check next things in your postgresql.conf
wal_keep_segments have to be big enough ( depends how fast you are
changing data in DB. In my case - 12 TB dataset - 16000 segments to be able
backup in time )
archive_mode = on - to store all WAL
archive_command - the way how to archive logs
wal_level = hot_standby
full_page_writes = on

During recovery be sure that slave have access to place where your archive
WAL logs is placed.
(check your recovery.conf)

2014-09-12 0:30 GMT+03:00 Jake O'brien Fagan <jake(at)househappy(dot)org>:

> Howdy,
>
> I am trying to create a hot_standby server, and I receive the following
> error after pg_basebackup completes. Can anyone give me some insight?
>
> My specs:
> Debian Wheezy 7.6
> Postgresql 9.3
> Database size: ~115GB
>
> postgres(at)database-master:/etc/postgresql/9.3/main$ sh replicator.sh
> Stopping PostgreSQL
> [ ok ] Stopping PostgreSQL 9.3 database server: main.
> Cleaning up old cluster directory
> Starting base backup as replicator
> Password:
>
> 113720266/113720266 kB (100%), 1/1 tablespace
>
> NOTICE: WAL archiving is not enabled; you must ensure that all required
> WAL segments are copied through other means to complete the backup
> pg_basebackup: base backup completed
> Starting Postgresql
> [....] Starting PostgreSQL 9.3 database server: main[....] The PostgreSQL
> server failed to start. Please check the log output: 2014-09-11 17:56:33
> UTC LOG: database system was interrupted; last known up at 2014-09-11
> 16:54:29 UTC 2014-09-11 17:56:33 UTC LOG: creating missing WAL directory
> "pg_xlog/archive_status" 2014-09-11 17:56:33 UTC LOG: incomplete startup
> packet 2014-09-11 17:56:33 UTC LOG: invalid checkpoint record 2014-09-11
> 17:56:33 UTC FATAL: could not locate required checkpoint record 2014-09-11
> 17:56:33 UTC HINT: If you are not restoring from a backup, try removing the
> file "/var/lib/p[FAILesql/9.3/main/backup_label". 2014-09-11 17:56:33 UTC
> LOG: startup process (PID 21972) exited with exit code 1 2014-09-11
> 17:56:33 UTC LOG: aborting startup due to startup process failure ...
> failed! failed!
>
> Thank you,
> Jake
> ------------------------------
>
> Jake O'Brien Fagan
>
> Ruby Engineer
> househappy.org <http://www.househappy.org/>
> Facebook <https://www.facebook.com/househappy.org> | Twitter
> <https://twitter.com/househappy> | Instagram
> <http://instagram.com/househappy>
>
>
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Kevin Struckhoff 2014-09-20 00:08:42 Unable to connect remotely to postgres server
Previous Message Sameer Kumar 2014-09-19 01:17:40 Re: Postgresql replication not starting after running pg_basebackup