Merge pull request #2859 from citusdata/no_null_percent_s

Avoid segfault in logging queries
pull/2858/head
Hadi Moshayedi 2019-08-01 09:36:52 -07:00 committed by GitHub
commit b81d5947e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -442,7 +442,7 @@ ExecuteQueryIntoDestReceiver(Query *query, ParamListInfo params, DestReceiver *d
/*
* ExecuteIntoDestReceiver plans and executes a query and sends results to the given
* ExecutePlanIntoDestReceiver executes a query plan and sends results to the given
* DestReceiver.
*/
void

View File

@ -111,6 +111,7 @@ RebuildQueryStrings(Query *originalQuery, List *taskList)
}
ereport(DEBUG4, (errmsg("query before rebuilding: %s",
task->queryString == NULL ? "(null)" :
ApplyLogRedaction(task->queryString))));
UpdateTaskQueryString(query, relationId, valuesRTE, task);

View File

@ -175,9 +175,8 @@ _PG_init(void)
* (thus as the innermost/last running hook) to be able to do our
* duties. For simplicity insist that all hooks are previously unused.
*/
if (planner_hook != NULL || ProcessUtility_hook != NULL || ExecutorStart_hook !=
NULL ||
ExecutorRun_hook != NULL)
if (planner_hook != NULL || ProcessUtility_hook != NULL ||
ExecutorStart_hook != NULL || ExecutorRun_hook != NULL)
{
ereport(ERROR, (errmsg("Citus has to be loaded first"),
errhint("Place citus at the beginning of "