Avoid segfault in logging queries

pull/2859/head
Philip Dubé 2019-07-30 00:00:56 +00:00
parent e88cb8335f
commit 064bd66a20
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 "