Databases

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • PostgresSQL Halting System Boot

    5 answers - 772 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    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 CS boots it halts on "Starting PostgeSQL". I have
    to press the <Enterkey 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.
    Thanks for your time,
    Matt
    (end of broadcast)
    TIP 4: Have you searched our list archives?
    http://archives.postgresql.org
  • No.1 | | 910 bytes | |

    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 CS boots it halts on "Starting PostgeSQL". I have
    to press the <Enterkey 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.
  • No.2 | | 852 bytes | |

    Matias Silva <matiassilva (AT) gmail (DOT) comwrites:

    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.

    Dunno the actual cause. Someone else will.

    , so if you start the server again after booting you're going to get
    prompted the same way. Try starting it with logging NT directed to a
    file.

    $ su - postgres
    $ pg_ctl start

    Should prompt you. Now see if redirecting the null file to stdin lets
    the server start without waiting.

    $ pg_ctl start </dev/null

    $ echo n | pg_ctl start

    If any of these workarounds suffice, edit them into your
    /etc/init.d/postgresql script.

    HTH
  • No.3 | | 2736 bytes | |

    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 CS boots it halts on "Starting PostgeSQL". I have
    >to press the <Enterkey 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)
    $ECHN "Starting PostgreSQL: "$ECHC
    su - $PGUSER -c "$DAEMN -D '$PGDATA' &" >>$PGLG 2>&1
    echo "ok"
    ;;

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

    [root@CSVmware bin]# service postgresql stop
    Stopping PostgreSQL: postmaster stopped
    ok
    [root@CSVmware bin]# su - postgres
    -bash-3.00$ ./pg_ctl start -sD /data
    -bash-3.00$ LG: database system was shut down at 2005-12-02 19:11:28 PST
    LG: checkpoint record is at 0/33B110
    LG: redo record is at 0/33B110; undo record is at 0/0; shutdown TRUE
    LG: next transaction ID: 588; next ID: 16385
    LG: next MultiXactId: 1; next MultiX: 0
    LG: database system is ready
    LG: transaction ID wrap limit is 2147484146, limited by database "postgres"
    -bash-3.00$ ./pg_ctl stop -sD /data
    LG: received smart shutdown request
    LG: shutting down
    LG: 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

    (end of broadcast)
    TIP 9: In versions below 8.0, the planner will ignore your desire to
    choose an index scan if your joining column's datatypes do not
    match
  • No.4 | | 1272 bytes | |

    Matias Silva <matiassilva (AT) gmail (DOT) comwrites:
    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 CS boots it halts on "Starting PostgeSQL". I have
    to press the <Enterkey to resume the boot. It doesn't time out either.

    I notice the init script switches user.

    start)
    $ECHN "Starting PostgreSQL: "$ECHC
    su - $PGUSER -c "$DAEMN -D '$PGDATA' &" >>$PGLG 2>&1
    echo "ok"
    ;;

    Hm, where did this init script come from? Last I heard, CS was a
    direct ripoff^H^H^H^H^H^Hrepackaging of Red Hat, but the RH initscript
    for Postgres doesn't look like that.

    In any case, the Postgres community isn't in a position to support other
    vendors' repackagings of Postgres. I suggest trying the initscript from
    the PGDG RPMs (if not the entire RPM package) that one we can at
    least answer questions about.

    regards, tom lane

    (end of broadcast)
    TIP 1: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
    message can get through to the mailing list cleanly
  • No.5 | | 1729 bytes | |

    Sat, Dec 03, 2005 at 12:38:16PM -0500, Tom Lane wrote:
    Matias Silva <matiassilva (AT) gmail (DOT) comwrites:
    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 CS boots it halts on "Starting PostgeSQL". I have
    to press the <Enterkey to resume the boot. It doesn't time out either.

    I notice the init script switches user.

    start)
    $ECHN "Starting PostgreSQL: "$ECHC
    su - $PGUSER -c "$DAEMN -D '$PGDATA' &" >>$PGLG 2>&1
    echo "ok"
    ;;

    Hm, where did this init script come from? Last I heard, CS was a
    direct ripoff^H^H^H^H^H^Hrepackaging of Red Hat, but the RH initscript
    for Postgres doesn't look like that.

    That is the init script distributed with postgresql -
    contrib/start-scripts/linux.

    That's the one I use in production and it works just fine.

    In any case, the Postgres community isn't in a position to support other
    vendors' repackagings of Postgres. I suggest trying the initscript from
    the PGDG RPMs (if not the entire RPM package) that one we can at
    least answer questions about.

    The original error smelled like an SELinux issue, rather than anything
    to do with the startup scripts, but I'm not that familiar with SELinux
    (I turn it off as part of the installation) so I can't say for sure.

    Cheers,
    Steve

    (end of broadcast)
    TIP 1: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
    message can get through to the mailing list cleanly

Re: PostgresSQL Halting System Boot


max 4000 letters.
Your nickname that display:
In order to stop the spam: 8 + 7 =
QUESTION ON "Databases"

EMSDN.COM