Skip to content

Commit

Permalink
add backwards compat on old GUC names
Browse files Browse the repository at this point in the history
  • Loading branch information
pramsey committed Dec 6, 2024
1 parent 07494a1 commit 98b608f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions http.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,40 @@ http_guc_init_opt(http_curlopt *opt)
pfree(opt_name_lower);
pfree(opt_name);
pfree(opt_url);

/*
* Backwards compatibility, retain the old GUC
* http.keepalive name for now.
*/
if (opt->curlopt == CURLOPT_TCP_KEEPALIVE)
{
DefineCustomStringVariable(
"http.keepalive",
guc_strdup(ERROR, "https://curl.se/libcurl/c/CURLOPT_TCP_KEEPALIVE.html"),
NULL,
&(opt->curlopt_val),
NULL,
opt->superuser_only ? PGC_SUSET : PGC_USERSET,
0, NULL, NULL, NULL
);
}

/*
* Backwards compatibility, retain the old GUC
* http.timeout_msec name for now.
*/
if (opt->curlopt == CURLOPT_TIMEOUT_MS)
{
DefineCustomStringVariable(
"http.timeout_msec",
guc_strdup(ERROR, "https://curl.se/libcurl/c/CURLOPT_TIMEOUT_MS.html"),
NULL,
&(opt->curlopt_val),
NULL,
opt->superuser_only ? PGC_SUSET : PGC_USERSET,
0, NULL, NULL, NULL
);
}
}

static void
Expand Down

0 comments on commit 98b608f

Please # to comment.