Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit afb5eae

Browse files
author
Vladimir Ershov
committed
fix app
1 parent fd0f452 commit afb5eae

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/pgpro_scheduler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ void parent_scheduler_main(Datum arg)
637637

638638
init_worker_mem_ctx("Parent scheduler context");
639639

640-
SetConfigOption("application_name", "pgp-s supervisor", PGC_USERSET, PGC_S_SESSION);
640+
SetConfigOption("application_name", "pgp-s supervisor", PGC_USERSET, PGC_S_OVERRIDE);
641641
pgstat_report_activity(STATE_RUNNING, "Initialize");
642642
pqsignal(SIGHUP, worker_spi_sighup);
643643
pqsignal(SIGTERM, worker_spi_sigterm);

src/scheduler_executor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void executor_worker_main(Datum arg)
120120
BackgroundWorkerInitializeConnection(shared->database, NULL);
121121

122122
parent = BackendPidGetProc(MyBgworkerEntry->bgw_notify_pid);
123-
SetConfigOption("application_name", "pgp-s executor", PGC_USERSET, PGC_S_SESSION);
123+
SetConfigOption("application_name", "pgp-s executor", PGC_USERSET, PGC_S_OVERRIDE);
124124
pgstat_report_activity(STATE_RUNNING, "initialize");
125125

126126
worker_jobs_limit = read_worker_job_limit();
@@ -710,7 +710,7 @@ void at_executor_worker_main(Datum arg)
710710
shared->start_at = GetCurrentTimestamp();
711711

712712
BackgroundWorkerInitializeConnection(shared->database, NULL);
713-
SetConfigOption("application_name", "pgp-s at executor", PGC_USERSET, PGC_S_SESSION);
713+
SetConfigOption("application_name", "pgp-s at executor", PGC_USERSET, PGC_S_OVERRIDE);
714714
pgstat_report_activity(STATE_RUNNING, "initialize");
715715
#ifdef _WITH_MTM
716716
/* need to connect to mtm nodes status struct */

src/scheduler_job.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ int set_at_job_done(job_t *job, char *error, int64 resubmit, char **set_error)
641641
values[4] = TimestampTzGetDatum(timestamp_add_seconds(0, resubmit));
642642
values[11] = Int64GetDatum(job->attempt + 1);
643643
n = 17;
644+
elog(LOG, "resubmit job %ld, %d", resubmit, job->attempt + 1);
644645
}
645646
else
646647
{

src/scheduler_manager.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ void manager_worker_main(Datum arg)
18841884
init_worker_mem_ctx("manager worker context");
18851885
shared->setbyparent = false;
18861886

1887-
SetConfigOption("application_name", "pgp-s manager", PGC_USERSET, PGC_S_SESSION);
1887+
SetConfigOption("application_name", "pgp-s manager", PGC_USERSET, PGC_S_OVERRIDE);
18881888
pgstat_report_activity(STATE_RUNNING, "initialize");
18891889

18901890
snprintf(database, NAMEDATALEN, "%s", MyBgworkerEntry->bgw_extra);
@@ -1897,7 +1897,7 @@ void manager_worker_main(Datum arg)
18971897

18981898
BackgroundWorkerInitializeConnection(database, NULL);
18991899
elog(LOG, "PGPRO_SCHEDULER: manager for '%s' connected", database);
1900-
SetConfigOption("application_name", buffer, PGC_USERSET, PGC_S_SESSION);
1900+
SetConfigOption("application_name", buffer, PGC_USERSET, PGC_S_OVERRIDE);
19011901

19021902
if(!checkSchedulerExtension())
19031903
{

0 commit comments

Comments
 (0)