pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Noah Misch <noah@leadboat.com>
Cc: Jeff Davis <jdavis@postgresql.org>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgsql: Add contrib/pg_walinspect.
Date: Sat, 30 Apr 2022 09:24:02 -0700
Message-ID: <c094bde0d6a984e21535fc66d31dc0f0b4ff4d6a.camel@j-davis.com> (raw)
In-Reply-To: <CALj2ACWmf5YE4VvJ3b-n8MkygXudVLfweuCz5ZVvkUq7gzcnOg@mail.gmail.com>
References: <E1ncj1z-000rJo-Kh@gemulon.postgresql.org>
	<Ymd/e5eeZMNAkrXo@paquier.xyz>
	<171769.1650950714@sss.pgh.pa.us>
	<YmeExX6ACB/Et9Ww@paquier.xyz>
	<CA+hUKGLtswFk9ZO3WMOqnDkGs6dK5kCdQK9gxJm0N8gip5cpiA@mail.gmail.com>
	<287795.1651019129@sss.pgh.pa.us>
	<CA+hUKG+H_VEBdtK4CVb7uRLaAKbufNOMy-djUsptcqhLxONMmA@mail.gmail.com>
	<295868.1651024073@sss.pgh.pa.us>
	<CA+hUKG+By4isKdbDkCaLkPq4V4ECWW=d+RhcLjQXTQ3KAJLobg@mail.gmail.com>
	<CA+hUKGJAULJ_NtszwEdnSgrpRiQiRjsf62DG9_1B9x0Vzoex5g@mail.gmail.com>
	<298689.1651025716@sss.pgh.pa.us>
	<304865.1651029340@sss.pgh.pa.us>
	<CALj2ACVDYTeiWF8pKv9iz1kbTajunS96pWwLtyaRq_rxwAHrKg@mail.gmail.com>
	<CALj2ACW7_d2RZzq-K8ZLv+uWqrstpW9omo2Lc-jbD2K5XoFMGQ@mail.gmail.com>
	<CALj2ACWLV+g=a7ojcLo-R52HeAUZtGdG6XPG6nTFoo7S7e17fw@mail.gmail.com>
	<CA+hUKG+VXatd-_ykFdnQoGrBb9NuNz8-YMGiWMMtNEPp9rU3Vw@mail.gmail.com>
	<e1daec9ffebb441773bb10b54f3d3170d54f16a5.camel@j-davis.com>
	<CALj2ACWmf5YE4VvJ3b-n8MkygXudVLfweuCz5ZVvkUq7gzcnOg@mail.gmail.com>

On Fri, 2022-04-29 at 10:46 +0530, Bharath Rupireddy wrote:
> It's not just the flush ptr, without no wait mode, the functions
> would
> wait if start/input lsn is, say current flush lsn - 1 or 2 or more
> (before the previous record) bytes. If the functions were to wait, by
> how much time should they wait? a timeout? forever?

I see, you're talking about the case of XLogFindNextRecord(), not
XLogReadRecord().

XLogFindNextRecord() is the only way to align the user-provided start
LSN on a valid record, but that calls XLogReadRecord(), which may wait
indefinitely. If there were a different entry point that just did the
alignment and skipped past continuation records, we could prevent it
from trying to read the next record if we are already at the flush
pointer. But without some tweak to that API, nowait is still needed.

Committed your v3 patch with minor modifications.

Regards,
	Jeff Davis







view thread (22+ messages)

Message-ID: <c094bde0d6a984e21535fc66d31dc0f0b4ff4d6a.camel@j-davis.com>
Permalink:  ../c094bde0d6a984e21535fc66d31dc0f0b4ff4d6a.camel@j-davis.com/
Also on:    postgresql.org/message-id/c094bde0d6a984e21535fc66d31dc0f0b4ff4d6a.camel@j-davis.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: pgsql@j-davis.com, bharath.rupireddyforpostgres@gmail.com, thomas.munro@gmail.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, noah@leadboat.com, jdavis@postgresql.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Add contrib/pg_walinspect.
  In-Reply-To: <c094bde0d6a984e21535fc66d31dc0f0b4ff4d6a.camel@j-davis.com>
  References: <E1ncj1z-000rJo-Kh@gemulon.postgresql.org> <171769.1650950714@sss.pgh.pa.us> <YmeExX6ACB/Et9Ww@paquier.xyz> <CA+hUKGLtswFk9ZO3WMOqnDkGs6dK5kCdQK9gxJm0N8gip5cpiA@mail.gmail.com> <287795.1651019129@sss.pgh.pa.us> <CA+hUKG+H_VEBdtK4CVb7uRLaAKbufNOMy-djUsptcqhLxONMmA@mail.gmail.com> <295868.1651024073@sss.pgh.pa.us> <CA+hUKG+By4isKdbDkCaLkPq4V4ECWW=d+RhcLjQXTQ3KAJLobg@mail.gmail.com> <CA+hUKGJAULJ_NtszwEdnSgrpRiQiRjsf62DG9_1B9x0Vzoex5g@mail.gmail.com> <298689.1651025716@sss.pgh.pa.us> <304865.1651029340@sss.pgh.pa.us> <CALj2ACVDYTeiWF8pKv9iz1kbTajunS96pWwLtyaRq_rxwAHrKg@mail.gmail.com> <CALj2ACW7_d2RZzq-K8ZLv+uWqrstpW9omo2Lc-jbD2K5XoFMGQ@mail.gmail.com> <CALj2ACWLV+g=a7ojcLo-R52HeAUZtGdG6XPG6nTFoo7S7e17fw@mail.gmail.com> <CA+hUKG+VXatd-_ykFdnQoGrBb9NuNz8-YMGiWMMtNEPp9rU3Vw@mail.gmail.com> <e1daec9ffebb441773bb10b54f3d3170d54f16a5.camel@j-davis.com> <CALj2ACWmf5YE4VvJ3b-n8MkygXudVLfweuCz5ZVvkUq7gzcnOg@mail.gmail.com> <c094bde0d6a984e21535fc66d31dc0f0b4ff4d6a.camel@j-davis.com>

* 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