Re: Running pg_dump from a slave server

From: Sameer Kumar <sameer(dot)kumar(at)ashnik(dot)com>
To: Patrick B <patrickbakerbr(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Running pg_dump from a slave server
Date: 2016-08-17 04:13:44
Message-ID: CADp-Sm6e9OS8NEAhXJrY_xmM9aKy+-dPoQB1sME_sGA+6NpRPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 17, 2016 at 11:51 AM Patrick B <patrickbakerbr(at)gmail(dot)com> wrote:

>
>>
>> But do you have statements which causes Exclusive Locks? Ignoring them in
>> OLTP won't make your life any easier.
>>
>> (Keeping avoiding to get into 'recovery conflict' as your sole goal) If
>> you decide to run pg_dump from master, it would block such statements
>> which have Exclusive locking. This would cause delays, deadlocks, livelocks
>> etc and it might take a while for your before you can figure out what is
>> going on.
>>
>> I would say try to find out who is and why is someone creating Exclusive
>> locks.
>>
>
>
> Yeah! The pg_dump was already running on the master... it's been running
> for months.. I just wanted to change now to use the slave, but it seems I
> can't right?
>
>
Not unless you find what is causing the conflict or you are ready to live
with delay in promotion when master goes down.

> Exclusive locking - I probably have statements that causes this. Is there
> any way I could "track" them?
>

Do you have-

1. DML operations changing large portions of a table at once - it might
lead a page level lock which might conflict with SELECT/share locks on
standby
2. Any REINDEX operations
3. DDL operation
4. VACUUM FULL

--
--
Best Regards
Sameer Kumar | DB Solution Architect
*ASHNIK PTE. LTD.*

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350

Skype: sameer.ashnik | www.ashnik.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Venkata B Nagothi 2016-08-17 04:37:32 Re: Running pg_dump from a slave server
Previous Message Sameer Kumar 2016-08-17 04:09:46 Re: Running pg_dump from a slave server