pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <tmunro@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.
Date: Mon, 12 Jul 2021 20:30:48 -0400
Message-ID: <3187588.1626136248@sss.pgh.pa.us> (raw)
In-Reply-To: <E1m35jw-0006Gi-Qg@gemulon.postgresql.org>
References: <E1m35jw-0006Gi-Qg@gemulon.postgresql.org>

Thomas Munro <tmunro@postgresql.org> writes:
> To make \watch react quickly when the user quits the pager or presses
> ^C, and also to increase the accuracy of its timing and decrease the
> rate of useless context switches, change the main loop of the \watch
> command to use sigwait() rather than a sleeping/polling loop, on Unix.

I think this is going to fall over on gaur, which doesn't have POSIX-style
sigwait.  We've escaped dealing with that so far because our only existing
use of sigwait is hidden under

#if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32)

Perhaps the easiest answer is to make the #if conditional for this
code look like that too.

			regards, tom lane





view thread (15+ messages)  latest in thread

Message-ID: <3187588.1626136248@sss.pgh.pa.us>
Permalink:  ../3187588.1626136248@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3187588.1626136248@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, tmunro@postgresql.org
  Subject: Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.
  In-Reply-To: <3187588.1626136248@sss.pgh.pa.us>
  References: <E1m35jw-0006Gi-Qg@gemulon.postgresql.org> <3187588.1626136248@sss.pgh.pa.us>

* 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