Github user paul-guo- commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1079#discussion_r95507983
  
    --- Diff: src/backend/tcop/postgres.c ---
    @@ -5314,6 +5336,24 @@ PostgresMain(int argc, char *argv[], const char 
*username)
        return 1;                                       /* keep compiler quiet 
*/
     }
     
    +static void
    +curl_finalize(int code, Datum arg __attribute__((unused)))
    +{
    +   if (curl_context.hasInited)
    +   {
    +           if (curl_context.response.buffer != NULL) {
    +                   pfree(curl_context.response.buffer);
    +           }
    +           /* cleanup curl stuff */
    +           if (curl_context.curl_handle) {
    +                   curl_easy_cleanup(curl_context.curl_handle);
    +           }
    +           /* we're done with libcurl, so clean it up */
    +           curl_global_cleanup();
    +           curl_context.hasInited = false;
    +           elog(LOG, "finalize the global struct for curl handle 
context.");
    --- End diff --
    
    I did not look into the where should be set as DEBUG*, but at least if the 
logs could be shown on our log files by default, they should 1) be accurate and 
helpful. 2) benefit not just developers 3) avoid potential flooding.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to