Skip site navigation (1) Skip section navigation (2)

Re: 8.3.0 backend segfaults

From: Rodriguez Fernando <rodriguez(at)ort(dot)edu(dot)uy>
To: Alex Hunsaker <badalex(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: 8.3.0 backend segfaults
Date: 2008-03-12 16:23:57
Message-ID: 47D8039D.8080606@ort.edu.uy (view raw or flat)
Thread:
Lists: pgsql-bugs
Alex Hunsaker wrote:
> Precedence: bulk
> Sender: pgsql-bugs-owner(at)postgresql(dot)org
>
> On Wed, Mar 12, 2008 at 9:49 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>   
>> "Alex Hunsaker" <badalex(at)gmail(dot)com> writes:
>>  > On Wed, Mar 12, 2008 at 12:44 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>
>>     
>>>> If you say "none of my stuff is changing any schemas", then I'd guess
>>>>         
>>  >> that the triggering event is a background autovacuum, which forces
>>  >> replan just like an intentional schema change would.  Does stopping
>>  >> autovacuum make the problem go away?
>>
>>  > Yep turning off autovacuum seems to have fixed it.  And once I
>>  > manually vacuum analyze workers; it blows up almost instantly.
>>
>>  Yeah, I was going to suggest that you ought to be able to extract
>>  a test case involving doing a manual vacuum in between prepare and
>>  execute.  I suspect it wouldn't even need to involve more than one
>>  session.
>>     
>
> Here is what im trying right now with no success:
>
> 3 clients doing this:
> while(1)
> {
>         $db->begin_work();
>         my $sth = $db->prepare_cached('select * from junk left join
> junk as j on j.junk = junk.junk where junk.junk like ? limit 1;');
>         print "VAC!\n";
>         sleep 10;
>         print "EX!\n";
>         $sth->execute('junk') || die "failed: $!";
>         $sth->fetchall_arrayref();
>         $db->commit();
>         $db->{'AutoCommit'} = 0;
>         $db->{'AutoCommit'} = 1;
> }
>
> where when it prints VAC I :
> update junk set junk = 'junkab';
> VACUUM ANALYZE verbose junk;
> (also tried deleting, and inserting a bunch of junk...)
>
> 3 other clients doing:
> while(1)
> {
>         $db->begin_work();
>         my $sth = $db->prepare_cached('select * from junk left join
> junk as j on j.junk = junk.junk where junk.junk like ? limit 1;');
>         $sth->execute('junk') || die "failed: $!";
>         $sth->fetchall_arrayref();
>         $db->rollback();
> }
>
> \d junk
>     Table "public.junk"
>  Column | Type | Modifiers
> --------+------+-----------
>  junk   | text |
>
>   
Hola, esto (like ? ) generalmente no funciona en un prepared statement, 
quizas tu problema este ahi.
proba con un =? , (se que no es lo mismo) y si funciona el problema es 
el like

Saludos Fernando

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2008-03-12 16:31:03
Subject: Re: 8.3.0 backend segfaults
Previous:From: Alex HunsakerDate: 2008-03-12 15:58:02
Subject: Re: 8.3.0 backend segfaults

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group