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

Commit67ff4a8

Browse files
committed
Merge branch 'merge_concurrent' of github.com:postgrespro/pg_pathman into merge_concurrent
2 parentsfe96482 +ed154fc commit67ff4a8

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

‎src/init.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ pathman_config_contains_relation(Oid relid, Datum *values, bool *isnull,
623623

624624
/*
625625
* Loads additional pathman parameters like 'enable_parent' or 'auto'
626+
* from PATHMAN_CONFIG_PARAMS
626627
*/
627628
bool
628629
read_pathman_params(Oidrelid,Datum*values,bool*isnull)
@@ -632,7 +633,7 @@ read_pathman_params(Oid relid, Datum *values, bool *isnull)
632633
ScanKeyDatakey[1];
633634
Snapshotsnapshot;
634635
HeapTuplehtup;
635-
boolresult= false;
636+
boolrow_found= false;
636637

637638
ScanKeyInit(&key[0],
638639
Anum_pathman_config_params_partrel,
@@ -643,19 +644,20 @@ read_pathman_params(Oid relid, Datum *values, bool *isnull)
643644
snapshot=RegisterSnapshot(GetLatestSnapshot());
644645
scan=heap_beginscan(rel,snapshot,1,key);
645646

647+
/* There should be just 1 row */
646648
if ((htup=heap_getnext(scan,ForwardScanDirection))!=NULL)
647649
{
648650
/* Extract data if necessary */
649651
heap_deform_tuple(htup,RelationGetDescr(rel),values,isnull);
650-
result= true;
652+
row_found= true;
651653
}
652654

653655
/* Clean resources */
654656
heap_endscan(scan);
655657
UnregisterSnapshot(snapshot);
656658
heap_close(rel,AccessShareLock);
657659

658-
returnresult;
660+
returnrow_found;
659661
}
660662

661663
/*

‎src/relation_info.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,18 @@ refresh_pathman_relation_info(Oid relid,
160160

161161
pfree(prel_children);
162162

163-
/*
164-
* Read additional parameters ('enable_parent' and 'auto' at the moment)
165-
*/
163+
/* Read additional parameters ('enable_parent' and 'auto' at the moment) */
166164
if (read_pathman_params(relid,param_values,param_isnull))
167165
{
168166
prel->enable_parent=param_values[Anum_pathman_config_params_enable_parent-1];
169167
prel->auto_partition=param_values[Anum_pathman_config_params_auto-1];
170168
}
169+
/* Else set default values if they cannot be found */
170+
else
171+
{
172+
prel->enable_parent= false;
173+
prel->auto_partition= true;
174+
}
171175

172176
/* We've successfully built a cache entry */
173177
prel->valid= true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp