Remove preprocessor guards from injection points
authorDaniel Gustafsson <[email protected]>
Thu, 25 Sep 2025 13:27:33 +0000 (15:27 +0200)
committerDaniel Gustafsson <[email protected]>
Thu, 25 Sep 2025 13:27:33 +0000 (15:27 +0200)
When defining an injection point there is no need to wrap the definition
with USE_INJECTION_POINT guards, the INJECTION_POINT macro is available
in all builds.  Remove to make the code consistent.

Author: Hayato Kuroda <[email protected]>
Reviewed-by: Michael Paquier <[email protected]>
Reviewed-by: Daniel Gustafsson <[email protected]>
Discussion: https://postgr.es/m/OSCPR01MB14966C8015DEB05ABEF2CE077F51FA@OSCPR01MB14966.jpnprd01.prod.outlook.com
Backpatch-through: 17

src/backend/access/transam/xlog.c

index eac1de75ed0adfac238dff3da22587b8e7341730..109713315c0700ca2b3fb4a30d395b1e10ad6dd7 100644 (file)
@@ -7354,9 +7354,7 @@ CreateCheckPoint(int flags)
    if (PriorRedoPtr != InvalidXLogRecPtr)
        UpdateCheckPointDistanceEstimate(RedoRecPtr - PriorRedoPtr);
 
-#ifdef USE_INJECTION_POINTS
    INJECTION_POINT("checkpoint-before-old-wal-removal", NULL);
-#endif
 
    /*
     * Delete old log files, those no longer needed for last checkpoint to