@@ -488,7 +488,7 @@ bgw_main_concurrent_part(Datum main_arg)
488488 failures_count ++ ;
489489 ereport (LOG ,
490490 (errmsg ("%s: %s" , concurrent_part_bgw , error -> message ),
491- errdetail ("Attempt : %d/%d, sleep time: %s" ,
491+ errdetail ("attempt : %d/%d, sleep time: %s" ,
492492 failures_count ,
493493 PART_WORKER_MAX_ATTEMPTS ,
494494 sleep_time_str )));
@@ -507,9 +507,9 @@ bgw_main_concurrent_part(Datum main_arg)
507507 cps_set_status (part_slot , CPS_FREE );
508508
509509 elog (LOG ,
510- "Concurrent partitioning worker has canceled the task because "
511- "maximum amount of attempts (%d) had been exceeded. "
512- "See the error message below" ,
510+ "concurrent partitioning worker has canceled the task because "
511+ "maximum amount of attempts (%d) had been exceeded, "
512+ "see the error message below" ,
513513 PART_WORKER_MAX_ATTEMPTS );
514514
515515 return ; /* exit quickly */
@@ -573,11 +573,9 @@ bgw_main_concurrent_part(Datum main_arg)
573573Datum
574574partition_table_concurrently (PG_FUNCTION_ARGS )
575575{
576- #define tostr (str ) ( #str ) /* convert function's name to literal */
577-
578576 Oid relid = PG_GETARG_OID (0 );
579- int empty_slot_idx = -1 ; /* do we have a slot for BGWorker? */
580- int i ;
577+ int empty_slot_idx = -1 , /* do we have a slot for BGWorker? */
578+ i ;
581579
582580 /* Check if relation is a partitioned table */
583581 shout_if_prel_is_invalid (relid ,
@@ -617,7 +615,7 @@ partition_table_concurrently(PG_FUNCTION_ARGS)
617615 SpinLockRelease (& concurrent_part_slots [empty_slot_idx ].mutex );
618616
619617 elog (ERROR ,
620- "Table \"%s\" is already being partitioned" ,
618+ "table \"%s\" is already being partitioned" ,
621619 get_rel_name (relid ));
622620 }
623621
@@ -628,7 +626,7 @@ partition_table_concurrently(PG_FUNCTION_ARGS)
628626
629627 /* Looks like we could not find an empty slot */
630628 if (empty_slot_idx < 0 )
631- elog (ERROR , "No empty worker slots found" );
629+ elog (ERROR , "no empty worker slots found" );
632630 else
633631 {
634632 /* Initialize concurrent part slot */
@@ -648,9 +646,9 @@ partition_table_concurrently(PG_FUNCTION_ARGS)
648646
649647 /* Tell user everything's fine */
650648 elog (NOTICE ,
651- "Worker started. You can stop it "
649+ "worker started, you can stop it "
652650 "with the following command: select %s('%s');" ,
653- tostr (stop_concurrent_part_task ), /* convert function's name to literal */
651+ CppAsString (stop_concurrent_part_task ),
654652 get_rel_name (relid ));
655653
656654 PG_RETURN_VOID ();
@@ -785,7 +783,7 @@ stop_concurrent_part_task(PG_FUNCTION_ARGS)
785783 cur_slot -> relid == relid &&
786784 cur_slot -> dbid == MyDatabaseId )
787785 {
788- elog (NOTICE , "Worker will stop after it finishes current batch" );
786+ elog (NOTICE , "worker will stop after it finishes current batch" );
789787
790788 /* Change worker's state & set 'worker_found' */
791789 cur_slot -> worker_status = CPS_STOPPING ;
@@ -800,7 +798,7 @@ stop_concurrent_part_task(PG_FUNCTION_ARGS)
800798 PG_RETURN_BOOL (true);
801799 else
802800 {
803- elog (ERROR , "Cannot find worker for relation \"%s\"" ,
801+ elog (ERROR , "cannot find worker for relation \"%s\"" ,
804802 get_rel_name_or_relid (relid ));
805803
806804 PG_RETURN_BOOL (false); /* keep compiler happy */
0 commit comments