Re: [PATCH] Remove unused #include's in src/backend/commands/*

Поиск
Список
Период
Сортировка
От Álvaro Herrera
Тема Re: [PATCH] Remove unused #include's in src/backend/commands/*
Дата
Msg-id 202510091340.za2liige7mbm@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: [PATCH] Remove unused #include's in src/backend/commands/*  (Aleksander Alekseev <aleksander@tigerdata.com>)
Ответы Re: [PATCH] Remove unused #include's in src/backend/commands/*
Список pgsql-hackers
On 2025-Oct-09, Aleksander Alekseev wrote:

> diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
> index bb7d90aa5d9..0a8d621a373 100644
> --- a/src/backend/backup/basebackup.c
> +++ b/src/backend/backup/basebackup.c
> @@ -36,7 +36,6 @@
>  #include "postmaster/syslogger.h"
>  #include "postmaster/walsummarizer.h"
>  #include "replication/slot.h"
> -#include "replication/walsender.h"
>  #include "replication/walsender_private.h"
>  #include "storage/bufpage.h"
>  #include "storage/checksum.h"

I wonder how many of these changes pass the compilation only because the
header you're removing is indirectly being included via another header.
In this particular case, it's because slot.h includes walreceiver.h
which includes walsender.h, so this removal has no effect.

Maybe play with the script here
https://postgr.es/m/202510021240.ptc2zl5cvwen@alvherre.pgsql
to see if your changes would have any effect.  The inclusion graphs in
https://doxygen.postgresql.org may also be useful.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"La virtud es el justo medio entre dos defectos" (Aristóteles)



В списке pgsql-hackers по дате отправления: