From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | subham(at)cse(dot)iitb(dot)ac(dot)in |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Needs Suggestion |
Date: | 2010-09-22 08:22:28 |
Message-ID: | 4C99BCC4.20900@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 22/09/10 11:14, subham(at)cse(dot)iitb(dot)ac(dot)in wrote:
>
> How can I increase the stack depth limit ? Is it only by modifying the
> postgres.conf file, but there I cannot increase the stack depth beyond 4
> MB.
>
> Actually, my problem is that, when I set the stack base address of the
> child thread using the POSIX library function "pthread_setstackaddr()", I
> am unable to access the memory contents of its parent. The data-structures
> in the parent are either getting destroyed or unaccessible when moving to
> the context of the child thread.
It is not a good idea to use threads in server code. PostgreSQL server
code is not thread-safe, things will break.
Assuming that you're not actually doing that but using threads in the
client instead, max_stack_depth should have no effect on you as it only
affects the server.
But you really should find another way to communicate between threads.
Stacks should be treated as thread-private. Use malloc() or something
and global variables.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2010-09-22 08:25:33 | Re: BUG #5661: The character encoding in logfile is confusing. |
Previous Message | Markus Wanner | 2010-09-22 08:21:10 | Re: Configuring synchronous replication |