mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Move the check for whether walreceiver has authenticated as a superuser
from walsender.c, where it didn't really belong, to postinit.c where it does belong (and is essentially free, too).
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.16 2010/04/12 10:18:50 heikki Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.17 2010/04/21 00:51:56 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -47,13 +47,13 @@
|
||||
#include "replication/walsender.h"
|
||||
#include "storage/fd.h"
|
||||
#include "storage/ipc.h"
|
||||
#include "storage/lock.h"
|
||||
#include "storage/pmsignal.h"
|
||||
#include "tcop/tcopprot.h"
|
||||
#include "utils/guc.h"
|
||||
#include "utils/memutils.h"
|
||||
#include "utils/ps_status.h"
|
||||
|
||||
|
||||
/* Array of WalSnds in shared memory */
|
||||
WalSndCtlData *WalSndCtl = NULL;
|
||||
|
||||
@@ -114,11 +114,6 @@ WalSenderMain(void)
|
||||
{
|
||||
MemoryContext walsnd_context;
|
||||
|
||||
if (!superuser())
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
errmsg("must be superuser to start walsender")));
|
||||
|
||||
if (RecoveryInProgress())
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_CANNOT_CONNECT_NOW),
|
||||
|
||||
Reference in New Issue
Block a user