Remove useless pointer update in StatsShmemInit()
authorMichael Paquier <[email protected]>
Tue, 19 Aug 2025 00:54:18 +0000 (09:54 +0900)
committerMichael Paquier <[email protected]>
Tue, 19 Aug 2025 00:54:18 +0000 (09:54 +0900)
This pointer was not used after its last update.  This variable
assignment was most likely a vestige artifact of the earlier versions of
the patch set that have led to 5891c7a8ed8f.

This pointer update is useless, so let's remove it.  It removes one call
to pgstat_dsa_init_size(), making the code slightly easier to grasp.

Author: Bertrand Drouvot <[email protected]>
Discussion: https://postgr.es/m/[email protected]

src/backend/utils/activity/pgstat_shmem.c

index cca4277f2343aa2d515b749f554c8ddf9b3a1c84..62de3474453652ffb2fa775331454e3cc7381b2a 100644 (file)
@@ -180,7 +180,6 @@ StatsShmemInit(void)
         * provides a small efficiency win.
         */
        ctl->raw_dsa_area = p;
-       p += MAXALIGN(pgstat_dsa_init_size());
        dsa = dsa_create_in_place(ctl->raw_dsa_area,
                                  pgstat_dsa_init_size(),
                                  LWTRANCHE_PGSTATS_DSA, NULL);