Thread: SV: 7.1 devel and initdb core dumps

SV: 7.1 devel and initdb core dumps

From
"Jarmo Paavilainen"
Date:
...
> > And then to something else, whats wrong with this:
> >
> >     nstr = palloc(len = strlen(string) + 1);
> >     memcpy(nstr, string, len);
>
> The first code you wrote doesn't do the the same thing as the second.

Well thats the point. Why do I need to allocate one extra space for the
string (the first one allready allocate space for the NULL). While the
second example allocates one char too much. Am I right or am I wrong. Or am
I going blind and stupid, at the same time.

// Jarmo


too many clients?

From
"chris markiewicz"
Date:
Sorry, too many clients already

hello.  i am getting the above message when i try to connect.  where do i
find documentation about connection management?  i want to be able to see
all current connections and kill some of them.  how do i do that?

thanks
chris


Re: SV: 7.1 devel and initdb core dumps

From
Tom Lane
Date:
"Jarmo Paavilainen" <netletter@comder.com> writes:
> Well thats the point. Why do I need to allocate one extra space for the
> string (the first one allready allocate space for the NULL). While the
> second example allocates one char too much.

The given fragment of code clearly isn't overwriting anything it
shouldn't.  I think that enlarging the allocated space is masking a bug
somewhere else.

            regards, tom lane

Re: too many clients?

From
Peter Eisentraut
Date:
chris markiewicz writes:

> Sorry, too many clients already
>
> hello.  i am getting the above message when i try to connect.  where do i
> find documentation about connection management?

man postmaster, -N option

> i want to be able to see all current connections and kill some of
> them.  how do i do that?

ps ax or ps -e might work on your platform.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: too many clients?

From
Manuel Cabido
Date:
Hi there,

   try running postmaster -b 100 -N 50

--
                              Manny C. Cabido
                              ====================================
                              e-mail:manny@tinago.msuiit.edu.ph
                                     manny@sun.msuiit.edu.ph
                              =====================================