Re: A few patches to clarify snapshot management, part 2 - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: A few patches to clarify snapshot management, part 2
Date
Msg-id 8aa255b2-e061-4c09-a458-5ac755104695@iki.fi
Whole thread Raw
In response to Re: A few patches to clarify snapshot management, part 2  (Chao Li <li.evan.chao@gmail.com>)
List pgsql-hackers
On 19/12/2025 07:15, Chao Li wrote:
>> On Dec 19, 2025, at 07:30, Heikki Linnakangas <hlinnaka@iki.fi> 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
includea 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
updateHTAB 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




pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Logical Replication of sequences
Next
From: Heikki Linnakangas
Date:
Subject: Re: A few patches to clarify snapshot management, part 2