Skip to content

Commit c521f58

Browse files
committed
remove useless check from bgw_main_spawn_partitions()
1 parent 7804c9b commit c521f58

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

Diff for: src/pathman_workers.c

-12
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "pathman_workers.h"
1919
#include "relation_info.h"
2020
#include "utils.h"
21-
#include "xact_handling.h"
2221

2322
#include "access/htup_details.h"
2423
#include "access/xact.h"
@@ -360,17 +359,6 @@ bgw_main_spawn_partitions(Datum main_arg)
360359
DebugPrintDatum(value, args->value_type), MyProcPid);
361360
#endif
362361

363-
/* Check again if there's a conflicting lock */
364-
if (xact_bgw_conflicting_lock_exists(args->partitioned_table))
365-
{
366-
elog(LOG, "%s: there's a conflicting lock on relation \"%s\"",
367-
spawn_partitions_bgw,
368-
get_rel_name_or_relid(args->partitioned_table));
369-
370-
dsm_detach(segment);
371-
return; /* exit quickly */
372-
}
373-
374362
/* Create partitions and save the Oid of the last one */
375363
args->result = create_partitions_internal(args->partitioned_table,
376364
value, /* unpacked Datum */

Diff for: src/xact_handling.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ do_we_hold_the_lock(Oid relid, LOCKMODE lockmode)
168168
return false;
169169

170170
default:
171-
return false; /* should not happen */
171+
return false;
172172
}
173173
}
174174

0 commit comments

Comments
 (0)