Skip to content

Commit

Permalink
Keep cron.job table locks on heap_close
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoslot committed Aug 21, 2017
1 parent 6786e97 commit 39d467e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/job_metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ cron_schedule(PG_FUNCTION_ARGS)
CommandCounterIncrement();

/* close relation and invalidate previous cache entry */
heap_close(cronJobsTable, RowExclusiveLock);
heap_close(cronJobsTable, NoLock);

InvalidateJobCache();

Expand Down Expand Up @@ -376,7 +376,7 @@ cron_unschedule(PG_FUNCTION_ARGS)
simple_heap_delete(cronJobsTable, &heapTuple->t_self);

systable_endscan(scanDescriptor);
heap_close(cronJobsTable, RowExclusiveLock);
heap_close(cronJobsTable, NoLock);

CommandCounterIncrement();
InvalidateJobCache();
Expand Down

0 comments on commit 39d467e

Please sign in to comment.