Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 453eb27

Browse files
committed
restore lazy loading in read_pathman_config()
1 parent 6a1f3a5 commit 453eb27

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/init.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -751,8 +751,7 @@ read_pathman_config(void)
751751
while((htup = heap_getnext(scan, ForwardScanDirection)) != NULL)
752752
{
753753
Datum values[Natts_pathman_config];
754-
bool upd_expr,
755-
isnull[Natts_pathman_config];
754+
bool isnull[Natts_pathman_config];
756755
Oid relid; /* partitioned table */
757756

758757
/* Extract Datums from tuple 'htup' */
@@ -765,7 +764,6 @@ read_pathman_config(void)
765764

766765
/* Extract values from Datums */
767766
relid = DatumGetObjectId(values[Anum_pathman_config_partrel - 1]);
768-
upd_expr = isnull[Anum_pathman_config_expression_p - 1];
769767

770768
/* Check that relation 'relid' exists */
771769
if (get_rel_type_id(relid) == InvalidOid)
@@ -777,12 +775,8 @@ read_pathman_config(void)
777775
errhint(INIT_ERROR_HINT)));
778776
}
779777

780-
if (upd_expr)
781-
invalidate_pathman_relation_info(relid, NULL);
782-
else
783-
refresh_pathman_relation_info(relid,
784-
values,
785-
true); /* allow lazy prel loading */
778+
/* get_pathman_relation_info() will refresh this entry */
779+
invalidate_pathman_relation_info(relid, NULL);
786780
}
787781

788782
/* Clean resources */

src/relation_info.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ refresh_pathman_relation_info(Oid relid,
139139

140140
AssertTemporaryContext();
141141
prel = invalidate_pathman_relation_info(relid, NULL);
142+
Assert(prel);
142143

143144
/* Try locking parent, exit fast if 'allow_incomplete' */
144145
if (allow_incomplete)

0 commit comments

Comments
 (0)