From: Andres Freund Date: Tue, 28 Jan 2014 20:15:34 +0000 (+0100) Subject: minor cleanups X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=8dd332177b182d1b8e56af2a8ff044a5a2a9030a;p=users%2Frhaas%2Fpostgres.git minor cleanups --- diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c index e89903ec62..cc4c49eba1 100644 --- a/src/backend/replication/slotfuncs.c +++ b/src/backend/replication/slotfuncs.c @@ -8,7 +8,7 @@ * Copyright (c) 2012-2013, PostgreSQL Global Development Group * * IDENTIFICATION - * src/backend/replication/logicalfuncs.c + * src/backend/replication/slotfuncs.c * */ @@ -19,14 +19,10 @@ #include "access/htup_details.h" -#include "nodes/makefuncs.h" - #include "utils/builtins.h" #include "replication/slot.h" -#include "storage/fd.h" - Datum create_physical_replication_slot(PG_FUNCTION_ARGS); Datum drop_replication_slot(PG_FUNCTION_ARGS); @@ -122,7 +118,11 @@ pg_get_replication_slots(PG_FUNCTION_ARGS) if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) elog(ERROR, "return type must be a row type"); - /* FIXME: what permissions do we require? */ + /* + * We don't require any special permission to see this function's data + * because nothing should be sensitive. The most critical being the slot + * name, which shouldn't contain anything particularly sensitive. + */ per_query_ctx = rsinfo->econtext->ecxt_per_query_memory; oldcontext = MemoryContextSwitchTo(per_query_ctx);