Skip to content

Commit

Permalink
shmem
Browse files Browse the repository at this point in the history
  • Loading branch information
RekGRpth committed Nov 25, 2023
1 parent 293c26f commit 0452f11
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static void conf_free(Work *w) {
pfree(w);
}

static void conf_proc_exit(int code, Datum arg) {
static void conf_shmem_exit(int code, Datum arg) {
elog(DEBUG1, "code = %i", code);
}

Expand Down Expand Up @@ -125,7 +125,7 @@ void conf_main(Datum arg) {
dlist_mutable_iter iter;
Portal portal;
StringInfoData src;
on_proc_exit(conf_proc_exit, (Datum)NULL);
on_shmem_exit(conf_shmem_exit, (Datum)NULL);
BackgroundWorkerUnblockSignals();
BackgroundWorkerInitializeConnectionMy("postgres", NULL);
MemoryContextSwitchTo(TopMemoryContext);
Expand Down
4 changes: 2 additions & 2 deletions task.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static void task_execute(void) {
if (IsTransactionState()) ereport(ERROR, (errcode(ERRCODE_ACTIVE_SQL_TRANSACTION), errmsg("still active sql transaction")));
}

static void task_proc_exit(int code, Datum arg) {
static void task_shmem_exit(int code, Datum arg) {
elog(DEBUG1, "code = %i", code);
LWLockAcquire(BackgroundWorkerLock, LW_EXCLUSIVE);
MemSet(&taskshared[DatumGetInt32(arg)], 0, sizeof(*taskshared));
Expand Down Expand Up @@ -375,7 +375,7 @@ void task_main(Datum arg) {
elog(DEBUG1, "arg = %i", DatumGetInt32(arg));
task.shared = &taskshared[DatumGetInt32(arg)];
work.shared = &workshared[task.shared->slot];
on_proc_exit(task_proc_exit, arg);
on_shmem_exit(task_shmem_exit, arg);
BackgroundWorkerUnblockSignals();
work.data = quote_identifier(work.shared->data);
work.schema = quote_identifier(work.shared->schema);
Expand Down
4 changes: 2 additions & 2 deletions work.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ static void work_connect(Task *t) {
}
}

static void work_proc_exit(int code, Datum arg) {
static void work_shmem_exit(int code, Datum arg) {
dlist_mutable_iter iter;
elog(DEBUG1, "code = %i", code);
if (!code) {
Expand Down Expand Up @@ -859,7 +859,7 @@ void work_main(Datum arg) {
Gp_session_role = GP_ROLE_DISPATCH;
#endif
#endif
on_proc_exit(work_proc_exit, arg);
on_shmem_exit(work_shmem_exit, arg);
pqsignal(SIGHUP, SignalHandlerForConfigReload);
pqsignal(SIGINT, work_idle);
BackgroundWorkerUnblockSignals();
Expand Down

0 comments on commit 0452f11

Please sign in to comment.