2

There is no postgresql option in the autorun menu, but it starts when the system starts. Searches have failed. Can you help?

Swartex
  • 131
  • I disagree its being a duplicate because 1) OP doesn't know it's a service 2) If the answer is removed, the answers in the linked question aren't sufficient – Anwar May 24 '17 at 09:03
  • @Anwar if OP doesn't know it's a service, then any answer is simply guessing at a solution. – muru May 24 '17 at 10:27
  • @muru Guessing sometimes may not work. It worked here won't make it a duplicate. The service could be named as pg too! – Anwar May 24 '17 at 10:29
  • @Anwar it could, but is it? – muru May 24 '17 at 10:30
  • @muru Yes, only after you knew the answer. That's why it isn't a duplicate – Anwar May 24 '17 at 10:31
  • @Anwar no, I don't need the answer to know that, since a look at the package file listing of postgresql tells me that. I'm not sure why you think I VTC'd because of the answer, I don't care about it. The dupe is the canonical post on enabling and disabling services. If the question where about what the postgresql service is named, I wouldn't be VTCing. But it isn't. – muru May 24 '17 at 10:35
  • @muru It's OP that needed to know the answer. And I'm sure OP wouldn'be be helped if it was closed as a duplicate of that one. That one is a question about enabling and disabling process of services for different Ubuntu versions. It's not a canonical question for every process that starts and happen to be a service and needs disabling – Anwar May 24 '17 at 10:46
  • Eh? I'm not sure what distinction you're drawing there, but I'm not interested in continuing this discussion. I see the motivation and I'm not inclined to continue. – muru May 24 '17 at 10:48
  • @Anwar: Linking this question to muru's suggestion imho is equivalent to this: "How can I do X?" – "X is a special case of Y. Here's how you can do Y." – David Foerster May 24 '17 at 11:05

3 Answers3

2

postgresql starts as a systemd service. To stop autorun of it, simply execute this command in terminal

sudo systemctl disable postgresql

This should disable autorun of postgresql upon boot. If you want to re-enable it, use

sudo systemctl enable postgresql

command.

Anwar
  • 76,649
1

Since it is a service not a autorun program for your user you have to disable it via systemctl.

sudo systemctl disable postgresql.service

Ziazis
  • 2,174
0

Use sudo update-rc.d postgresql disable command to remove from autorun.

David Foerster
  • 36,264
  • 56
  • 94
  • 147