Обсуждение: BUG #5531: REGEXP_ REPLACE causes connection drop

Поиск
Список
Период
Сортировка

BUG #5531: REGEXP_ REPLACE causes connection drop

От
"Ola Sergatchov"
Дата:
The following bug has been logged online:

Bug reference:      5531
Logged by:          Ola Sergatchov
Email address:      ola_sergatchov@hotmail.com
PostgreSQL version: 8.1.18
Operating system:   RedHat Linux 4.1.2-46
Description:        REGEXP_ REPLACE causes connection drop
Details:

Passing large string to REGEXP_REPLACE function causes the DB connection to
drop. We executed this function with very large strings (20,000 - 250,000
characters) both from RedHat and PgAdmin and in both cases the function
fails to return and eventually the connection drops. From looking in the
documentation, there is no reference to the maximum size of the string that
his function can process.

Re: BUG #5531: REGEXP_ REPLACE causes connection drop

От
Bruce Momjian
Дата:
Ola Sergatchov wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5531
> Logged by:          Ola Sergatchov
> Email address:      ola_sergatchov@hotmail.com
> PostgreSQL version: 8.1.18
> Operating system:   RedHat Linux 4.1.2-46
> Description:        REGEXP_ REPLACE causes connection drop
> Details:
>
> Passing large string to REGEXP_REPLACE function causes the DB connection to
> drop. We executed this function with very large strings (20,000 - 250,000
> characters) both from RedHat and PgAdmin and in both cases the function
> fails to return and eventually the connection drops. From looking in the
> documentation, there is no reference to the maximum size of the string that
> his function can process.

Can you show us any relevant entries in the server logs?  FYI, 8.1.18 is
both old for minor and major release.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + None of us is going to be here forever. +

Re: BUG #5531: REGEXP_ REPLACE causes connection drop

От
Tom Lane
Дата:
"Ola Sergatchov" <ola_sergatchov@hotmail.com> writes:
> The following bug has been logged online:

> Bug reference:      5531
> Logged by:          Ola Sergatchov
> Email address:      ola_sergatchov@hotmail.com
> PostgreSQL version: 8.1.18
> Operating system:   RedHat Linux 4.1.2-46
> Description:        REGEXP_ REPLACE causes connection drop
> Details:

> Passing large string to REGEXP_REPLACE function causes the DB connection to
> drop. We executed this function with very large strings (20,000 - 250,000
> characters) both from RedHat and PgAdmin and in both cases the function
> fails to return and eventually the connection drops.

I don't see any such misbehavior here: it either completes or reports
"out of memory".  Could we see a specific problematic example?  Also
what sort of hardware are you on?  (32-bit vs 64-bit seems relevant
in particular.)

            regards, tom lane

Re: BUG #5531: REGEXP_ REPLACE causes connection drop

От
Tom Lane
Дата:
ola sergatchov <ola_sergatchov@hotmail.com> writes:
> Here is the copy from postgresql log from June 23:

> ErrorContext: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used
> ERROR:  out of memory
> DETAIL:  Failed on request of size 251049.
> CONTEXT:  PL/pgSQL function "composite_statements_as_set" line 36 at assignment
>         SQL function "composite_statements_wrapper" statement 1
>         SQL function "dml_statements" statement 1
> LOG:  unexpected EOF on client connection


This does not indicate any problem in Postgres.  The "unexpected EOF"
message indicates that the *client* dropped the connection, not that
Postgres did.  Possibly you need to look at the error processing
logic in your application.

            regards, tom lane

Re: BUG #5531: REGEXP_ REPLACE causes connection drop

От
ola sergatchov
Дата:
Sure.



Here is the copy from postgresql log from June 23:



ErrorContext: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used
ERROR:  out of memory
DETAIL:  Failed on request of size 251049.
CONTEXT:  PL/pgSQL function "composite_statements_as_set" line 36 at assignment
        SQL function "composite_statements_wrapper" statement 1
        SQL function "dml_statements" statement 1
LOG:  unexpected EOF on client connection

The 8.1.18 is used in our product and it is embedded in the production environment of our client. We are planning to
upgradeto more recent release, but currently it is not possible. 



Please let me know if you need any more help.


> From: bruce@momjian.us
> Subject: Re: [BUGS] BUG #5531: REGEXP_ REPLACE causes connection drop
> To: ola_sergatchov@hotmail.com
> Date: Wed, 30 Jun 2010 11:46:53 -0400
> CC: pgsql-bugs@postgresql.org
>
> Ola Sergatchov wrote:
> >
> > The following bug has been logged online:
> >
> > Bug reference: 5531
> > Logged by: Ola Sergatchov
> > Email address: ola_sergatchov@hotmail.com
> > PostgreSQL version: 8.1.18
> > Operating system: RedHat Linux 4.1.2-46
> > Description: REGEXP_ REPLACE causes connection drop
> > Details:
> >
> > Passing large string to REGEXP_REPLACE function causes the DB connection to
> > drop. We executed this function with very large strings (20,000 - 250,000
> > characters) both from RedHat and PgAdmin and in both cases the function
> > fails to return and eventually the connection drops. From looking in the
> > documentation, there is no reference to the maximum size of the string that
> > his function can process.
>
> Can you show us any relevant entries in the server logs? FYI, 8.1.18 is
> both old for minor and major release.
>
> --
> Bruce Momjian <bruce@momjian.us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + None of us is going to be here forever. +

_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969