From: | Michael H <michael(at)wemoto(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [CentOS] persistent change of max_stack_depth |
Date: | 2015-08-18 09:00:05 |
Message-ID: | 55D2F415.8070203@wemoto.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi All,
I've asked recently about amending the stack depth for system services
in centos7, namely LimitSTACK for increasing max_stack_depth parameter.
Below is the answer to my question provided on the CentOS mailing list,
I'm posting here to share the information.
On 17/08/15 19:07, Gordon Messmer wrote:
> On 08/17/2015 03:34 AM, Michael H wrote:
>> the [Service] section -
>> [Service]
>> LimitSTACK=12288
> ...
>> By the errors I will assume that it should be in the [Service] section.
>> I couldn't find confirmation of this online...
>
> Yes, it belongs in the [Service] section.
>
> $ man systemd.exec
> ...
> "The execution specific configuration options are configured in the
> [Service], [Socket], [Mount], or [Swap] sections, depending on the unit
> type."
>
> However, I assume that you are confused because "ulimit" in a bash shell
> returns a value in KiB, but LimitSTACK and setrlimit accept a value in
> bytes. That is, you've decreased the stack size to 12KiB, which is why
> PostgreSQL segfaults immediately.
>
Here is the gotcha! I had previously calculated my LimitSTACK in KB not
bytes.
> # cat /etc/systemd/system/postgresql.service
> .include /lib/systemd/system/postgresql.service
> [Service]
> LimitSTACK=12582912
>
> # grep stack /var/lib/pgsql/data/postgresql.conf
> max_stack_depth = 10MB # min 100kB
>
> # systemctl daemon-reload
> # systemctl restart postgresql
> _______________________________________________
> CentOS mailing list
> CentOS(at)centos(dot)org
> http://lists.centos.org/mailman/listinfo/centos
I hope this helps somebody in the future,
Thanks
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Peter J. Holzer | 2015-08-18 09:06:15 | Upgrade from postgresql-9.5alpha1 to postgresql-9.5alpha2 (Debian packages) |
Previous Message | Mikhail | 2015-08-18 08:43:01 | How to get cursor query |