pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby
Date: Fri, 6 Nov 2015 17:52:35 +0100
Message-ID: <20151106165235.GB21749@awork2.anarazel.de> (raw)
In-Reply-To: <CA+TgmobZ8J4zW-j4Kh6O+H=GceCDmANvRyZ09K69BJG8mJf_vw@mail.gmail.com>
References: <20151102055841.2561.61366.pgcf@coridan.postgresql.org>
	<CA+TgmoZm1ecn8Qv1Hv0wTmJJJE0QobrWVE4bpBdpca_BJkW4Ww@mail.gmail.com>
	<20151103154300.GY11897@awork2.anarazel.de>
	<CAB7nPqSA9=n+GumHRjp-OJs4J8ScNn1cSV5xmw7mr3EGs9+Ydg@mail.gmail.com>
	<741137DB-35AF-450B-9746-7FE55A8729C3@anarazel.de>
	<CAB7nPqRB7OU4N7B0otR3BY+pQ0PU5w9QxUy6D_q4YXiAXiB=OQ@mail.gmail.com>
	<20151104103351.GB29170@awork2.anarazel.de>
	<CAB7nPqT81wuVzo1-rOFXTcagLviyX_rhqDPb1XkhfnQ9tTiPRA@mail.gmail.com>
	<CAB7nPqRUTRQvBYiDY-rC04+FOg0vUKCOAvAFZViw7fw8CnJjWA@mail.gmail.com>
	<CA+TgmobZ8J4zW-j4Kh6O+H=GceCDmANvRyZ09K69BJG8mJf_vw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2015-11-06 11:42:56 -0500, Robert Haas wrote:
> On Fri, Nov 6, 2015 at 2:47 AM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
> > I have as well thought a bit about adding a space-related constraint
> > on the standby snapshot generated by the bgwriter, so as to not rely
> > entirely on the interval of 15s. I finished with the attached that
> > uses a check based on CheckPointSegments / 8 to be sure that at least
> > this number of segments has been generated since the last checkpoint
> > before logging a new snapshot. I guess that's less brittle than the
> > last patch. Thoughts?
> 
> I can't see why that would be a good idea.  My understanding is that
> the logical decoding code needs to get those messages pretty
> regularly, and I don't see why that need would be reduced on systems
> where CheckPointSegments is large.

Precisely.


What I'm thinking of right now is a marker somewhere in shared memory,
that tells whether anything worthwhile has happened since the last
determination of the redo pointer. Where standby snapshots don't
count. That seems like it'd be to maintain going forward than doing
precise size calculations like CreateCheckPoint() already does, and
would additionally need to handle its own standby snapshot, not to speak
of the background ones.

Seems like it'd be doable in ReserveXLogInsertLocation().

Whether it's actually worthwhile I'm not all that sure tho.

Andres


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (87+ messages)  latest in thread

Message-ID: <20151106165235.GB21749@awork2.anarazel.de>
Permalink:  ../20151106165235.GB21749@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20151106165235.GB21749@awork2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, robertmhaas@gmail.com, michael.paquier@gmail.com, jeff.janes@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby
  In-Reply-To: <20151106165235.GB21749@awork2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox