Postgres 9 slave lagging - Mailing list pgsql-performance

From Saurabh Agrawal
Subject Postgres 9 slave lagging
Date
Msg-id BANLkTi=7ui8yRQHkFg2jMCP6+OqSknc-FA@mail.gmail.com
Whole thread Raw
Responses Re: Postgres 9 slave lagging
List pgsql-performance
Hi All,

I have setup postgres 9 master slave streaming replication but
experiencing slave lagging sometimes by 50 min to 60 min. I am not
getting exact reason for slave lag delay. Below are the details:

1. Master table contains partition tables with frequent updates.
2. Slave is used for report generation so long running queries hit slave.
3. ANALYZE runs every hour on partition table on master.
4. postgresql.conf:
archive_timeout = 900
checkpoint_segments = 500
checkpoint_timeout = 30min
checkpoint_warning = 2000s
max_standby_archive_delay = -1

I noticed that whenever long running query executes on slave, slave
starts lagging by master and as soon as query completes log files get
applied immediately. Please help how can I avoid slave lag.

Thanks

Regards
Saurabh Agrawal

pgsql-performance by date:

Previous
From: Glyn Astill
Date:
Subject: Re: Linux: more cores = less concurrency.
Next
From: Steve Clark
Date:
Subject: Re: Linux: more cores = less concurrency.