pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Move interrupt-handling code into subroutines.
3+ messages / 3 participants
[nested] [flat]
Commits from this thread:
2019-12-17 b1cc572f12 Add missing "void" to prototypes.
* pgsql: Move interrupt-handling code into subroutines.
@ 2019-12-17 17:59 Robert Haas <rhaas@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Robert Haas @ 2019-12-17 17:59 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Move interrupt-handling code into subroutines.
Some auxiliary processes, as well as the autovacuum launcher,
have interrupt handling code directly in their main loops.
Try to abstract things a little better by moving it into
separate functions.
This doesn't make any functional difference, and leaves
in place relatively large differences among processes in how
interrupts are handled, but hopefully it at least makes it
easier to see the commonalities and differences across
process types.
Patch by me, reviewed by Andres Freund and Daniel Gustafsson.
Discussion: http://postgr.es/m/CA+TgmoZwDk=BguVDVa+qdA6SBKef=PKbaKDQALTC_9qoz1mJqg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5910d6c7e311f0b14e3d3cb9ce3597c01d3a3cde
Modified Files
--------------
src/backend/postmaster/autovacuum.c | 72 ++++++++++++++++++++++-------------
src/backend/postmaster/bgwriter.c | 42 ++++++++++++--------
src/backend/postmaster/checkpointer.c | 71 +++++++++++++++++++---------------
src/backend/postmaster/walwriter.c | 34 ++++++++++-------
4 files changed, 133 insertions(+), 86 deletions(-)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Move interrupt-handling code into subroutines.
@ 2019-12-17 18:43 Andrew Gierth <andrew@tao11.riddles.org.uk>
parent: Robert Haas <rhaas@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Gierth @ 2019-12-17 18:43 UTC (permalink / raw)
To: Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org
>>>>> "Robert" == Robert Haas <rhaas@postgresql.org> writes:
Robert> Move interrupt-handling code into subroutines.
This is eliciting compiler warnings from gcc, which apparently doesn't
count "static void foo();" as being a prototype (quite reasonably, since
it's not).
Needs this fix (in autovacuum.c and checkpointer.c):
-static void AutoVacLauncherShutdown() pg_attribute_noreturn();
+static void AutoVacLauncherShutdown(void) pg_attribute_noreturn();
-static void HandleCheckpointerInterrupts();
+static void HandleCheckpointerInterrupts(void);
--
Andrew (irc:RhodiumToad)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Move interrupt-handling code into subroutines.
@ 2019-12-17 18:59 Robert Haas <robertmhaas@gmail.com>
parent: Andrew Gierth <andrew@tao11.riddles.org.uk>
0 siblings, 0 replies; 3+ messages in thread
From: Robert Haas @ 2019-12-17 18:59 UTC (permalink / raw)
To: Andrew Gierth <andrew@tao11.riddles.org.uk>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
On Tue, Dec 17, 2019 at 1:43 PM Andrew Gierth
<andrew@tao11.riddles.org.uk> wrote:
> >>>>> "Robert" == Robert Haas <rhaas@postgresql.org> writes:
>
> Robert> Move interrupt-handling code into subroutines.
>
> This is eliciting compiler warnings from gcc, which apparently doesn't
> count "static void foo();" as being a prototype (quite reasonably, since
> it's not).
>
> Needs this fix (in autovacuum.c and checkpointer.c):
>
> -static void AutoVacLauncherShutdown() pg_attribute_noreturn();
> +static void AutoVacLauncherShutdown(void) pg_attribute_noreturn();
>
> -static void HandleCheckpointerInterrupts();
> +static void HandleCheckpointerInterrupts(void);
Sorry about that. Fix pushed.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2019-12-17 18:59 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 17:59 pgsql: Move interrupt-handling code into subroutines. Robert Haas <rhaas@postgresql.org>
2019-12-17 18:43 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2019-12-17 18:59 ` Robert Haas <robertmhaas@gmail.com>
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