RE: Synchronizing slots from primary to standby

From: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: RE: Synchronizing slots from primary to standby
Date: 2024-02-10 03:37:57
Message-ID: OS0PR01MB57168834D5A0FE580AE959E2944A2@OS0PR01MB5716.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Friday, February 9, 2024 4:13 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> FYI -- I checked patch v81-0001 to find which of the #includes are strictly needed.

Thanks!

>
> 1.
> ...
>
> Many of these #includes seem unnecessary. e.g. I was able to remove
> all those that are commented-out below, and the file still compiles OK
> with no warnings:

Removed.

>
>
> ======
> src/backend/replication/slot.c
>
>
>
> 2.
> #include "pgstat.h"
> +#include "replication/slotsync.h"
> #include "replication/slot.h"
> +#include "replication/walsender.h"
> #include "storage/fd.h"
>
> The #include "replication/walsender.h" seems to be unnecessary.

Removed.

>
> ======
> src/backend/replication/walsender.c
>
> 3.
> #include "replication/logical.h"
> +#include "replication/slotsync.h"
> #include "replication/slot.h"
>
> The #include "replication/slotsync.h" is needed, but only for Assert code:
> Assert(am_cascading_walsender || IsSyncingReplicationSlots());
>
> So you could #ifdef around that #include if you wish to.

I am not sure if it's necessary and didn't find similar coding, so
didn't change.

Best Regards,
Hou zj

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-02-10 04:33:23 Re: Popcount optimization using AVX512
Previous Message Zhijie Hou (Fujitsu) 2024-02-10 03:37:48 RE: Synchronizing slots from primary to standby