Re: A few patches to clarify snapshot management, part 2
| От | Heikki Linnakangas |
|---|---|
| Тема | Re: A few patches to clarify snapshot management, part 2 |
| Дата | |
| Msg-id | 8aa255b2-e061-4c09-a458-5ac755104695@iki.fi обсуждение исходный текст |
| Ответ на | Re: A few patches to clarify snapshot management, part 2 (Chao Li <li.evan.chao@gmail.com>) |
| Список | 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 по дате отправления: