Question installing PostgreSQL in an Apple Mac
macOS 10.13.2 High Sierra
I had installed PostgreSQL a few days before but not really used it yet. I've just this moment upgraded to Apple Mac High Sierra 10.13.2 and I noticed a couple of things. Firstly my Apple Mac booted up with an extra PostgreSQL user, that I haven't investigated yet. Also when I started Firefox, it refreshed a download page with the PostgreSQL installer, and this time (!) I thought I might read the README. It talks about Shared Memory settings and the need to edit a file `/etc/sysctl.conf`. I do not have such a file. I also ran `sysctl -a` whihc gave me a whole host of settings. It quotes a number of settings of which the equivalent on my machine are:
kern.sysv.shmmax: 4194304 kern.sysv.shmall: 1024 kern.sysv.shmmin: 1 kern.sysv.shmmni: 32 kern.sysv.shmseg: 8 kern.maxprocperuid: 2837 kern.maxproc: 4256
My machine is an ancient Apple Mac Pro which has had the firmware upgraded from 4.1 to 5.1 thus enabling me to upgrade the OS to the latest High Sierra without any hassles. My machine has a generous 32 Gb of RAM on board so presumably will be able to cope with any demands that PostgreSQL can throw at it.
The question is do I need to change any settings to do with memory before I complete the reinstallation?
and do I need to worry about the second user account called PostgreSQL on my machine?
Thanks in advance,
Effective March 31st, we will no longer engage on PostgresRocks.
How to engage with us further?
- Thought Leadership: EDB Blogs
- Tips and Tricks: Postgres Tutorials
- Customer Support: Create a Case Please note: Only customers with an active EDB support subscription and support portal authorization can create support ticket
- Engage on Stackoverflow While engaging on Stackoverflow tag the question with EDB or EnterpriseDB.
Re: Question installing PostgreSQL in an Apple Mac
Hope you are doing good !
Incase if systctl.conf file is not exist then in that case you need to create the file named /etc/sysctl.conf.
The recommended method for configuring shared memory in macOS is to create a file named /etc/sysctl.conf, containing variable assignments such as:
You can check below link for more information about setting for MacOs,
Also regarding your questions,
>>> The question is do I need to change any settings to do with memory before I complete the reinstallation?
A fresh postgres installation on a development/testing machine will probably be fine for most apps with default settings. However, when playing with big data, doing heavy aggregations as we do at adjust.io (even in development) can produce completely different performance than on a production server.
Postgres comes with rather conservative/minimal defaults settings on your machine. If you want to get the most out of your local postgres on MacOS you need to tune your postgresql.conf, typically found at,
There are a lot of settings but here are a few of the most important:
Please check below link for more information,
>>> and do I need to worry about the second user account called PostgreSQL on my machine?
PostgreSQL will create the default "Postgres" service account. As with any other server daemon that is accessible to the outside world, it is advisable to run PostgreSQL under a separate user account. This user account should only own the data that is managed by the server, and should not be shared with other daemons. (For example, using the user nobody is a bad idea.) It is not advisable to install executables owned by this user because compromised systems could then modify their own binaries.