PostgreSQL Source Code  git master
sharedtuplestore.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * sharedtuplestore.h
4  * Simple mechanism for sharing tuples between backends.
5  *
6  * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/utils/sharedtuplestore.h
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef SHAREDTUPLESTORE_H
14 #define SHAREDTUPLESTORE_H
15 
16 #include "access/htup.h"
17 #include "storage/fd.h"
18 #include "storage/sharedfileset.h"
19 
20 struct SharedTuplestore;
22 
25 
26 /*
27  * A flag indicating that the tuplestore will only be scanned once, so backing
28  * files can be unlinked early.
29  */
30 #define SHARED_TUPLESTORE_SINGLE_PASS 0x01
31 
32 extern size_t sts_estimate(int participants);
33 
35  int participants,
36  int my_participant_number,
37  size_t meta_data_size,
38  int flags,
40  const char *name);
41 
43  int my_participant_number,
45 
46 extern void sts_end_write(SharedTuplestoreAccessor *accessor);
47 
48 extern void sts_reinitialize(SharedTuplestoreAccessor *accessor);
49 
51 
52 extern void sts_end_parallel_scan(SharedTuplestoreAccessor *accessor);
53 
54 extern void sts_puttuple(SharedTuplestoreAccessor *accessor,
55  void *meta_data,
56  MinimalTuple tuple);
57 
59  void *meta_data);
60 
61 #endif /* SHAREDTUPLESTORE_H */
void sts_end_write(SharedTuplestoreAccessor *accessor)
void sts_end_parallel_scan(SharedTuplestoreAccessor *accessor)
void sts_puttuple(SharedTuplestoreAccessor *accessor, void *meta_data, MinimalTuple tuple)
SharedTuplestoreAccessor * sts_attach(SharedTuplestore *sts, int my_participant_number, SharedFileSet *fileset)
SharedTuplestore * sts
size_t sts_estimate(int participants)
void sts_reinitialize(SharedTuplestoreAccessor *accessor)
const char * name
Definition: encode.c:521
MinimalTuple sts_parallel_scan_next(SharedTuplestoreAccessor *accessor, void *meta_data)
void sts_begin_parallel_scan(SharedTuplestoreAccessor *accessor)
SharedTuplestoreAccessor * sts_initialize(SharedTuplestore *sts, int participants, int my_participant_number, size_t meta_data_size, int flags, SharedFileSet *fileset, const char *name)