Re: Remove useless pointer advance in StatsShmemInit()

2025-08-18 Thread Michael Paquier
On Mon, Aug 18, 2025 at 09:31:14AM +, Bertrand Drouvot wrote: > Yeah, that's probably just a matter of taste, but I also prefer keeping the > pointer over just doing: > > ctl->raw_dsa_area = (char *) ctl + MAXALIGN(sizeof(PgStat_ShmemControl)); Done as you have suggested. -- Michael signatu

Re: Remove useless pointer advance in StatsShmemInit()

2025-08-18 Thread Bertrand Drouvot
Hi, On Mon, Aug 18, 2025 at 06:13:05PM +0900, Michael Paquier wrote: > On Mon, Aug 18, 2025 at 09:04:59AM +, Bertrand Drouvot wrote: > > As StatsShmemInit() is existing code, let's fix it: the pointer is not used > > after > > its last advance, so that advance is unnecessary and can be remove

Re: Remove useless pointer advance in StatsShmemInit()

2025-08-18 Thread Michael Paquier
On Mon, Aug 18, 2025 at 09:04:59AM +, Bertrand Drouvot wrote: > As StatsShmemInit() is existing code, let's fix it: the pointer is not used > after > its last advance, so that advance is unnecessary and can be removed. > @@ -180,7 +180,6 @@ StatsShmemInit(void) * provides a small ef

Remove useless pointer advance in StatsShmemInit()

2025-08-18 Thread Bertrand Drouvot
001 From: Bertrand Drouvot Date: Mon, 18 Aug 2025 08:22:27 + Subject: [PATCH v1] Remove useless pointer advance in StatsShmemInit() A pointer is not used after its last advance, so that advance is unnecessary and can be removed. --- src/backend/utils/activity/pgstat_shmem.c | 1 - 1 file ch