Re: PostgresSQL Halting System Boot - Mailing list pgsql-general

From Matias Silva
Subject Re: PostgresSQL Halting System Boot
Date
Msg-id 439126D0.3000507@ihella.com
Whole thread Raw
In response to Re: PostgresSQL Halting System Boot  (Richard Huxton <dev@archonet.com>)
Responses Re: PostgresSQL Halting System Boot
List 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@CentOSVmware bin]# service postgresql stop
Stopping PostgreSQL: postmaster stopped
ok
[root@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

pgsql-general by date:

Previous
From: stig erikson
Date:
Subject: news.postgresql.org slow
Next
From: Tom Lane
Date:
Subject: Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits