build failed for postgresql-15.3
I didn't try 15.1 or 15.2, but it was failing for 15.3:
pg_tm_aux.c:48:49: error: ‘ThisTimeLineID’ undeclared (first use in this function); did you mean ‘TimeLineID’?
48 | List *timelineHistory = readTimeLineHistory(ThisTimeLineID);
For 14.x, ThisTimeLineID could be found in access/xlog.h:extern PGDLLIMPORT TimeLineID ThisTimeLineID; /* current TLI */
It is no longer in 15.3 access/xlog.h.
Since I'm not familiar with the PG code, couldn't resolve it. Would appreciate it much if this could be made to work with PG 15. Thanks.
Just found out that in 15, GetWALInsertionTimeLine() replaces the global ThisTimeLineID, as I guess this name is also used as a field in structures. FYI.
So I added the following lines before using ThisTimeLineID in pg_tm_aux:
#if (PG_VERSION_NUM >= 150000)
TimeLineID ThisTimeLineID = GetWALInsertionTimeLine();
#endif
Build succeeded now. Thx.
Hi! Thanks for letting me know. Can you plz send a pull request?
Thanks Andrey. https://github.com/x4m/pg_tm_aux/pull/10