Skip to content

Commit fa17ffe

Browse files
author
Antonin Houska
committed
Removed useless field from WorkerTask.
The original plan was to implement specific functionality in individual functions, however now it seems that a single function rewrite_table() can handel all the use cases. Thus we don't need anything like task kind.
1 parent c9b622a commit fa17ffe

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

pg_rewrite.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,6 @@ rewrite_table(PG_FUNCTION_ARGS)
574574

575575
task = get_task(&task_idx, rv_src->schemaname, rv_src->relname);
576576
Assert(task_idx < MAX_TASKS);
577-
task->kind = WORKER_TASK_PARTITION;
578577

579578
/* Fill-in the partitioning specific fields. */
580579
if (rv_dst->schemaname)
@@ -673,7 +672,6 @@ rewrite_worker_main(Datum main_arg)
673672
StartTransactionCommand();
674673
PG_TRY();
675674
{
676-
Assert(MyWorkerTask->kind == WORKER_TASK_PARTITION);
677675
rewrite_table_impl(relschema, relname, relname_new, relschema_dst,
678676
relname_dst);
679677
CommitTransactionCommand();

pg_rewrite.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,6 @@ typedef struct TaskProgress
200200
int64 del;
201201
} TaskProgress;
202202

203-
/* TODO Remove */
204-
typedef enum WorkerTaskKind
205-
{
206-
WORKER_TASK_PARTITION
207-
} WorkerTaskKind;
208-
209203
/*
210204
* The new implementation, which delegates the execution to a background
211205
* worker (as opposed to the PG executor).
@@ -215,8 +209,6 @@ typedef enum WorkerTaskKind
215209
*/
216210
typedef struct WorkerTask
217211
{
218-
WorkerTaskKind kind;
219-
220212
/* Connection info. */
221213
Oid dbid;
222214
Oid roleid;

0 commit comments

Comments
 (0)