Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby
Date: 2016-02-09 05:24:52
Message-ID: CAA4eK1+8Q4QgDBKW5u_XX9T24Ay9z8dVtnrbEzshoUOLpV4wDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Tue, Feb 9, 2016 at 5:37 AM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:
>
> On Mon, Feb 8, 2016 at 11:24 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:
> > On Mon, Feb 8, 2016 at 12:28 PM, Michael Paquier <
michael(dot)paquier(at)gmail(dot)com>
> > wrote:
> >>
> >>
> >> >> /*
> >> >> + * Fetch the progress position before taking any WAL insert
lock.
> >> >> This
> >> >> + * is normally an operation that does not take long, but
leaving
> >> >> this
> >> >> + * lookup out of the section taken an exclusive lock saves a
> >> >> couple
> >> >> + * of instructions.
> >> >> + */
> >> >> + progress_lsn = GetProgressRecPtr();
> >> >
> >> > too long for my taste. How about:
> >> > /* get progress, before acuiring insert locks to shorten locked
section
> >> > */
> >>
> >> Check.
> >>
> >
> > What is the need of holding locks one-by-one during checkpoint when
> > we anyway are going to take lock on all the insertion slots.
>
> A couple of records can slip in while scanning the progress LSN
> through all the locks.
>

Do you see any benefit in allowing checkpoints for such cases considering
bgwriter will anyway take care of logging standby snapshot for such
cases?
I don't think there is any reasonable benefit by improving the situation of
idle-system check for checkpoint other than just including
standbysnapshot WAL record. OTOH as checkpoint is not so seldom
operation, so allowing such a change should be okay, but I don't see
the need for same.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Valeriy A. 2016-02-09 09:01:24 Re: BUG #13920: pg_try_advisory_xact_lock bigint trouble
Previous Message Tom Lane 2016-02-09 04:46:38 Re: BUG #13919: Cast error when table is empty.

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2016-02-09 07:24:53 Re: pgbench stats per script & other stuff
Previous Message Pavel Stehule 2016-02-09 05:24:14 Re: [patch] Proposal for \crosstabview in psql