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

Commita3ef3ed

Browse files
committed
load PATHMAN_CONFIG lazily
1 parentbcf8e7b commita3ef3ed

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

‎src/init.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -830,9 +830,7 @@ read_pathman_config(void)
830830
{
831831
Datumvalues[Natts_pathman_config];
832832
boolisnull[Natts_pathman_config];
833-
Oidrelid;/* partitioned table */
834-
PartTypeparttype;/* partitioning type */
835-
text*attname;/* partitioned column name */
833+
Oidrelid;/* partitioned table */
836834

837835
/* Extract Datums from tuple 'htup' */
838836
heap_deform_tuple(htup,RelationGetDescr(rel),values,isnull);
@@ -844,8 +842,6 @@ read_pathman_config(void)
844842

845843
/* Extract values from Datums */
846844
relid=DatumGetObjectId(values[Anum_pathman_config_partrel-1]);
847-
parttype=DatumGetPartType(values[Anum_pathman_config_parttype-1]);
848-
attname=DatumGetTextP(values[Anum_pathman_config_attname-1]);
849845

850846
/* Check that relation 'relid' exists */
851847
if (get_rel_type_id(relid)==InvalidOid)
@@ -857,10 +853,8 @@ read_pathman_config(void)
857853
errhint(INIT_ERROR_HINT)));
858854
}
859855

860-
/* Create or update PartRelationInfo for this partitioned table */
861-
refresh_pathman_relation_info(relid,parttype,
862-
text_to_cstring(attname),
863-
true);/* allow lazy prel loading */
856+
/* get_pathman_relation_info() will refresh this entry */
857+
invalidate_pathman_relation_info(relid,NULL);
864858
}
865859

866860
/* Clean resources */

‎src/pg_pathman.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ append_child_relation(PlannerInfo *root, Relation parent_relation,
225225
*child_rowmark;
226226
Node*childqual;
227227
List*childquals;
228-
ListCell*lc,
228+
ListCell*lc1,
229229
*lc2;
230230

231231
parent_rel=root->simple_rel_array[parent_rti];
@@ -288,9 +288,9 @@ append_child_relation(PlannerInfo *root, Relation parent_relation,
288288
{
289289
childquals=NIL;
290290

291-
forboth(lc,wrappers,lc2,parent_rel->baserestrictinfo)
291+
forboth(lc1,wrappers,lc2,parent_rel->baserestrictinfo)
292292
{
293-
WrapperNode*wrap= (WrapperNode*)lfirst(lc);
293+
WrapperNode*wrap= (WrapperNode*)lfirst(lc1);
294294
Node*new_clause;
295295
boolalways_true;
296296

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp