Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit18167f8

Browse files
committed
Check for PostgreSQL 9.5.4 ver, more comments
1 parent4e5e2fb commit18167f8

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

‎src/pathman.h

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,12 @@
2727
#include"parser/parsetree.h"
2828

2929

30-
/* Check PostgreSQL version */
31-
/*
32-
* TODO: a fix for WaitForBackgroundWorkerShutdown()
33-
* has been accepted, so we have to update this number.
34-
*/
35-
#ifPG_VERSION_NUM<90503
36-
#error "Cannot build pg_pathman with PostgreSQL version lower than 9.5.3"
30+
/* Check PostgreSQL version (9.5.4 contains an important fix for BGW) */
31+
#ifPG_VERSION_NUM<90504
32+
#error "Cannot build pg_pathman with PostgreSQL version lower than 9.5.4"
3733
#endif
3834

39-
/*Print Datum as CString to server log */
35+
/*Get CString representation of Datum (simple wrapper) */
4036
#ifdefUSE_ASSERT_CHECKING
4137
#include"utils.h"
4238
#defineDebugPrintDatum(datum,typid) ( datum_to_cstring((datum), (typid)) )
@@ -59,8 +55,14 @@
5955
/* type modifier (typmod) for 'range_interval' */
6056
#definePATHMAN_CONFIG_interval_typmod-1
6157

58+
/*
59+
* Cache current PATHMAN_CONFIG relid (set during load_config()).
60+
*/
6261
externOidpathman_config_relid;
6362

63+
/*
64+
* Just to clarify our intentions (returns pathman_config_relid).
65+
*/
6466
Oidget_pathman_config_relid(void);
6567

6668

@@ -72,10 +74,12 @@ typedef struct PathmanState
7274
LWLock*dsm_init_lock,
7375
*load_config_lock,
7476
*edit_partitions_lock;
75-
DsmArraydatabases;
7677
}PathmanState;
7778

7879

80+
/*
81+
* Result of search_range_partition_eq().
82+
*/
7983
typedefenum
8084
{
8185
SEARCH_RANGEREL_OUT_OF_RANGE=0,
@@ -115,7 +119,6 @@ extern PathmanState *pmstate;
115119
} while (0)
116120

117121

118-
/* utility functions */
119122
intappend_child_relation(PlannerInfo*root,RelOptInfo*rel,Indexrti,
120123
RangeTblEntry*rte,intindex,OidchildOID,List*wrappers);
121124

@@ -140,25 +143,22 @@ void set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, Index rti,
140143

141144
typedefstruct
142145
{
143-
constNode*orig;
144-
List*args;
145-
List*rangeset;
146-
boolfound_gap;
147-
doubleparamsel;
146+
constNode*orig;/* examined expression */
147+
List*args;/* extracted from 'orig' */
148+
List*rangeset;/* IndexRanges representing selected parts */
149+
boolfound_gap;/* were there any gaps? */
150+
doubleparamsel;/* estimated selectivity */
148151
}WrapperNode;
149152

150153
typedefstruct
151154
{
152-
/* Main partitioning structure */
153-
constPartRelationInfo*prel;
154-
155+
constPartRelationInfo*prel;/* main partitioning structure */
155156
ExprContext*econtext;/* for ExecEvalExpr() */
156-
157157
boolfor_insert;/* are we in PartitionFilter now? */
158158
}WalkerContext;
159159

160160
/*
161-
* Usual initialization procedure for WalkerContext
161+
* Usual initialization procedure for WalkerContext.
162162
*/
163163
#defineInitWalkerContext(context,prel_info,ecxt,for_ins) \
164164
do { \
@@ -184,6 +184,7 @@ void select_range_partitions(const Datum value,
184184
constintstrategy,
185185
WrapperNode*result);
186186

187+
/* Examine expression in order to select partitions. */
187188
WrapperNode*walk_expr_tree(Expr*expr,WalkerContext*context);
188189

189190
#endif/* PATHMAN_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp