Re: Debugger hung on dummy function

Поиск
Список
Период
Сортировка
Искать
От
Heikki Linnakangas
Тема
Re: Debugger hung on dummy function
Дата
Msg-id
49DA641C.20009@enterprisedb.com
Ответ на
Список
Дерево обсуждения
Debugger hung on dummy function Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Debugger hung on dummy function Dave Page <dpage@pgadmin.org>
Re: Debugger hung on dummy function Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Debugger hung on dummy function Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Debugger hung on dummy function Dave Page <dpage@pgadmin.org>
Greenplum patch for estimated rowcounts being wrong. Chuck McDevitt <cmcdevitt@greenplum.com>
Re: Greenplum patch for estimated rowcounts being wrong. Dave Page <dpage@pgadmin.org>
Re: Debugger hung on dummy function Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Debugger hung on dummy function Dave Page <dpage@pgadmin.org>
Re: Debugger hung on dummy function Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Dave Page wrote:
> Hi Heikki
> 
> On Fri, Apr 3, 2009 at 4:43 PM, Heikki Linnakangas
>  wrote:
>> CREATE FUNCTION onelinefunc() RETURNS void AS $$ begin null; end; $$
>> LANGUAGE plpgsql;
> 
> Debugging that won't work terribly well anyway, as the plugin will
> just skip the entire function iirc. For slightly saner testing, try
> replacing null; with raise notice 'foo';. I'm not inclined to spend
> the time fixing the first case at the moment as it seems unlikely to
> ever cause anyone problems.

It's reproducible with any other function too, by stepping to the end of 
the function. Which suggests that the problem occurs when the dialog is 
displayed for the 2nd time.

>> When I choose Debugging->debug on that function, pgAdmin hangs, consuming
>> 100% of CPU. This is on latest svn version of pgAdmin, running on Debian
>> linux with wxwidgets 2.8.10.
>>
>> The same doesn't happen if the function takes an argument:
>>
>> CREATE FUNCTION onelinefunc(i integer) RETURNS void AS $$ begin null; end;
>> $$ LANGUAGE plpgsql;
>>
>> The same thing happens even if the function has more interesting contents,
>> when I step to the end of the function.
> 
> Hmm, that's pretty weird. I can't reproduce it here, however I'm on
> CentOS 5.2 x86_64 which currently only has wxWidgets 2.8.9.

Probably some gtk/wxwidgets glitch. The backtrace suggests that theme 
might make a difference too..

> The line
> you've commented out simply sizes the grid so that the 'No arguments
> required' text fits in the first column. Does the following change
> work for you?
> 
> --- debugger/dlgDirectDbg.cpp   (revision 7789)
> +++ debugger/dlgDirectDbg.cpp   (working copy)
> @@ -295,7 +295,7 @@
>         font.SetStyle( wxFONTSTYLE_ITALIC );
>         grdParams->SetCellFont( 0, COL_NAME, font );
> 
> -        grdParams->AutoSizeColumns();
> +       grdParams->SetColSize( COL_NAME, 200 );
>         activateDebugger();
>     }
>     else

Yes! That fixes it.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com
В списке pgadmin-hackers по дате отправления
От: Ashesh Vashi
Дата:
Сообщение: Re: EXPLAIN format changes
От: Heikki Linnakangas
Дата:
FAQ