On 19/12/2025 07:15, Chao Li wrote:
On Dec 19, 2025, at 07:30, Heikki Linnakangas <[email protected]> wrote:
Patch 0001: Use a proper type for RestoreTransactionSnapshot's PGPROC arg
Minor cleanup, independent of the rest of the patches
Looks like this cleanup should have done earlier. The old comments says that
only reason to use void * is to avoid include a header file. But in snapmgr.h,
there already has a usage of “struct HTAB” from 12 years ago.
Maybe we can also do:
```
typedef struct PGPROC PGPROC;
extern void RestoreTransactionSnapshot(MVCCSnapshot snapshot, PGPROC
*source_pgproc);
```
So the function declaration looks neater. snapmgr.h line 101 has done in this
way. If not pretty much burden, we can update HTAB as well.
Yeah, we're not very consistent about that. I followed the example of
HTAB and went with "struct PGPROC" for now.
I believe 0001 is an independent self-contained commit that can be pushed first.
Pushed 0001, thanks for the review!
- Heikki