Re: PostgresSQL Halting System Boot

From: Matias Silva <matiassilva(at)gmail(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgresSQL Halting System Boot
Date: 2005-12-03 05:02:08
Message-ID: 439126D0.3000507@ihella.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Huxton wrote:
> Matias Silva wrote:
>> Hi everyone, I'm totally new here and I got a little issue.
>> I just got done installing PostgreSQL 8.1. I have configured PostgreSQL
>> to start automatically upon system start via an init script. Problem
>> is that when CentOS boots it halts on "Starting PostgeSQL". I have
>> to press the <Enter> key to resume the boot. It doesn't time out either.
>>
>> How do I fix this?
>>
>> I check the PostgreSQL logs and the only thing that stands out is
>> "Do you want to choose a different one? [n]Your default context is
>> user_u:system_r:unconfined_t.". However when I search Google, I find
>> nothing.
>
> This sounds like something to do with selinux, which Redhat build in to
> their more recent offerings. I'm afraid I don't know enough about it to
> give you specific advice, but you should be able to find out more by
> checking the archives and googling.
>

When logged in as root, I stop and start PostgreSQL by using the init script
and it doesn't halt on startup. So I decided switch to the postgres user
(su - postgres) and stat PostgreSQL (pg_ctl start -D ../data). Upon
start up it echos the log entry and waits for an enter key.

I notice the init script switches user.

start)
$ECHO_N "Starting PostgreSQL: "$ECHO_C
su - $PGUSER -c "$DAEMON -D '$PGDATA' &" >>$PGLOG 2>&1
echo "ok"
;;

Below is me switching user and starting the database and the blank
line is where I hit enter.

[root(at)CentOSVmware bin]# service postgresql stop
Stopping PostgreSQL: postmaster stopped
ok
[root(at)CentOSVmware bin]# su - postgres
-bash-3.00$ ./pg_ctl start -sD ../data
-bash-3.00$ LOG: database system was shut down at 2005-12-02 19:11:28 PST
LOG: checkpoint record is at 0/33B110
LOG: redo record is at 0/33B110; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 588; next OID: 16385
LOG: next MultiXactId: 1; next MultiXactOffset: 0
LOG: database system is ready
LOG: transaction ID wrap limit is 2147484146, limited by database "postgres"

-bash-3.00$ ./pg_ctl stop -sD ../data
LOG: received smart shutdown request
LOG: shutting down
LOG: database system is shut down
postmaster stopped
-bash-3.00$ exit

Now that I know whats causing it how do I stop it, I don't know enough stop it.

Thanks for your time,
Matt

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Qingqing Zhou 2005-12-03 06:03:49 Re: user_write_lock_oid questions
Previous Message Bruce Momjian 2005-12-03 04:25:23 Re: Numeric 508 datatype