Skip to content

Commit 47a9f61

Browse files
committed
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
1 parent 44f4951 commit 47a9f61

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/backend/utils/time/snapmgr.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,12 +1848,9 @@ RestoreSnapshot(char *start_address)
18481848

18491849
/*
18501850
* Install a restored snapshot as the transaction snapshot.
1851-
*
1852-
* The second argument is of type void * so that snapmgr.h need not include
1853-
* the declaration for PGPROC.
18541851
*/
18551852
void
1856-
RestoreTransactionSnapshot(Snapshot snapshot, void *source_pgproc)
1853+
RestoreTransactionSnapshot(Snapshot snapshot, PGPROC *source_pgproc)
18571854
{
18581855
SetTransactionSnapshot(snapshot, NULL, InvalidPid, source_pgproc);
18591856
}

src/include/utils/snapmgr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ extern bool HistoricSnapshotActive(void);
120120
extern Size EstimateSnapshotSpace(Snapshot snapshot);
121121
extern void SerializeSnapshot(Snapshot snapshot, char *start_address);
122122
extern Snapshot RestoreSnapshot(char *start_address);
123-
extern void RestoreTransactionSnapshot(Snapshot snapshot, void *source_pgproc);
123+
struct PGPROC;
124+
extern void RestoreTransactionSnapshot(Snapshot snapshot, struct PGPROC *source_pgproc);
124125

125126
#endif /* SNAPMGR_H */

0 commit comments

Comments
 (0)