Skip to content

Commit

Permalink
Error out when not loaded via shared preload libs
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke authored Apr 25, 2024
1 parent 76ef74b commit 81244e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion logerrors.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,9 @@ pg_slow_log_stats(PG_FUNCTION_ARGS)

/* Shmem structs not ready yet */
if (global_variables == NULL) {
return (Datum) 0;
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("logerrors must be loaded via shared_preload_libraries")));
}
/* check to see if caller supports us returning a tuplestore */
if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
Expand Down

0 comments on commit 81244e1

Please sign in to comment.