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

Commit369b49d

Browse files
committed
clean code
1 parentf89f606 commit369b49d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

‎src/partition_creation.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ create_partitions_for_value(Oid relid, Datum value, Oid value_type)
271271
last_partition=create_partitions_for_value_internal(relid,
272272
value,
273273
value_type,
274-
false);
274+
false);/* backend */
275275
}
276276
}
277277
else
@@ -300,7 +300,8 @@ create_partitions_for_value(Oid relid, Datum value, Oid value_type)
300300
* use create_partitions_for_value() instead.
301301
*/
302302
Oid
303-
create_partitions_for_value_internal(Oidrelid,Datumvalue,Oidvalue_type,boolIsBgWorker)
303+
create_partitions_for_value_internal(Oidrelid,Datumvalue,Oidvalue_type,
304+
boolis_background_worker)
304305
{
305306
MemoryContextold_mcxt=CurrentMemoryContext;
306307
Oidpartid=InvalidOid;/* last created partition (or InvalidOid) */
@@ -406,7 +407,7 @@ create_partitions_for_value_internal(Oid relid, Datum value, Oid value_type, boo
406407
ErrorData*edata;
407408

408409
/* Simply rethrow ERROR if we're in backend */
409-
if (!IsBgWorker)
410+
if (!is_background_worker)
410411
PG_RE_THROW();
411412

412413
/* Switch to the original context & copy edata */

‎src/partition_creation.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424

2525
/* Create RANGE partitions to store some value */
2626
Oidcreate_partitions_for_value(Oidrelid,Datumvalue,Oidvalue_type);
27-
Oidcreate_partitions_for_value_internal(Oidrelid,Datumvalue,Oidvalue_type,boolIsBgWorker);
27+
Oidcreate_partitions_for_value_internal(Oidrelid,Datumvalue,Oidvalue_type,
28+
boolis_background_worker);
2829

2930

3031
/* Create one RANGE partition */

‎src/pathman_workers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ bgw_main_spawn_partitions(Datum main_arg)
393393
args->result=create_partitions_for_value_internal(args->partitioned_table,
394394
value,/* unpacked Datum */
395395
args->value_type,
396-
true);/*run underbackground woker */
396+
true);/* background woker */
397397

398398
/* Finish transaction in an appropriate way */
399399
if (args->result==InvalidOid)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp