Skip to content

Commit

Permalink
Merge pull request #26 from reshke/patch-1
Browse files Browse the repository at this point in the history
Error out when not loaded via shared preload libs
  • Loading branch information
munakoiso authored Apr 26, 2024
2 parents 76ef74b + 81244e1 commit 6d83fd7
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 6d83fd7

Please sign in to comment.