Fedora 20 PostgreSQL Modify Ports Tutorial

Source: Internet
Author: User
Tags postgresql

Service startup mode

# For example, if you are want to change the server's port number to 5433,
# Create a file named "/etc/systemd/system/postgresql.service" containing:
#. Include/lib/systemd/system/postgresql.service
# [Service]
# environment=pgport=5433
# This would override the setting appearing below.
sudo vim/etc/systemd/system/postgresql.service

According to this official explanation after the change, found that ....

It doesn't work at all. It started with 5432.

Just change it. Egg aches

sudo vim/lib/systemd/system/postgresql.service

Then reload

sudo systemctl daemon-reload

So....

It's not starting up.

Postgresql.service-postgresql Database Server
Loaded:loaded (/etc/systemd/system/postgresql.service; enabled)
Active:failed (Result:exit-code) since II 2015-03-03 19:06:19 CST; 9s ago
process:8305 execstop=/usr/bin/pg_ctl stop-d ${pgdata}-s-m Fast (code=exited, status=0/success)
process:8359 execstart=/usr/bin/pg_ctl start-d ${pgdata}-s-o-P ${pgport}-w-t (code=exited, Status=1/FAILURE)
process:8353 Execstartpre=/usr/bin/postgresql-check-db-dir ${pgdata} (code=exited, Status=0/SUCCESS)
Main pid:32289 (code=exited, status=0/success)

It's not a sore egg, it's a broken egg.

Change back, or start not. It is estimated that the files under/etc will be added again after the reload

Well, then I'll put/etc ... File port, change it back.

So it can be started. Nima!!

No, I'll start with the original way.


pg_ctl-d/var/lib/pgsql/data-p 5433-l logfile Start

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.