1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-19 17:02:53 +03:00

Use proper type for RestoreTransactionSnapshot's PGPROC arg

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/08cbaeb5-aaaf-47b6-9ed8-4f7455b0bc4b@iki.fi
This commit is contained in:
Heikki Linnakangas
2025-12-19 13:40:02 +02:00
parent 44f49511b7
commit 47a9f61fca
2 changed files with 3 additions and 5 deletions

View File

@@ -1848,12 +1848,9 @@ RestoreSnapshot(char *start_address)
/* /*
* Install a restored snapshot as the transaction snapshot. * Install a restored snapshot as the transaction snapshot.
*
* The second argument is of type void * so that snapmgr.h need not include
* the declaration for PGPROC.
*/ */
void void
RestoreTransactionSnapshot(Snapshot snapshot, void *source_pgproc) RestoreTransactionSnapshot(Snapshot snapshot, PGPROC *source_pgproc)
{ {
SetTransactionSnapshot(snapshot, NULL, InvalidPid, source_pgproc); SetTransactionSnapshot(snapshot, NULL, InvalidPid, source_pgproc);
} }

View File

@@ -120,6 +120,7 @@ extern bool HistoricSnapshotActive(void);
extern Size EstimateSnapshotSpace(Snapshot snapshot); extern Size EstimateSnapshotSpace(Snapshot snapshot);
extern void SerializeSnapshot(Snapshot snapshot, char *start_address); extern void SerializeSnapshot(Snapshot snapshot, char *start_address);
extern Snapshot RestoreSnapshot(char *start_address); extern Snapshot RestoreSnapshot(char *start_address);
extern void RestoreTransactionSnapshot(Snapshot snapshot, void *source_pgproc); struct PGPROC;
extern void RestoreTransactionSnapshot(Snapshot snapshot, struct PGPROC *source_pgproc);
#endif /* SNAPMGR_H */ #endif /* SNAPMGR_H */