From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Thomas Munro <tmunro(at)postgresql(dot)org>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command. |
Date: | 2021-07-13 01:03:51 |
Message-ID: | CA+hUKGLpSgVmD1jMpBcsjnXun3jNxG+6dYzpocxOz3R6Z8n9rA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Tue, Jul 13, 2021 at 12:30 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Thomas Munro <tmunro(at)postgresql(dot)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.
Oh, thanks for the advance warning. Wouldn't HAVE_SIGWAIT be better? Like so.
Attachment | Content-Type | Size |
---|---|---|
0001-Add-configure-check-for-sigwait-3.patch | text/x-patch | 4.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-07-13 01:09:51 | Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command. |
Previous Message | David Rowley | 2021-07-13 00:48:42 | Re: pgsql: Fix theoretical bug in tuplesort |