Re: [pgadmin-hackers] pgAdmin III: Muliple SQL tabs

2016-02-14 Thread Neel Patel
Hi ,

I just applied the patch in Linux environment and found the crash. Below
are the steps to reproduce.
We may need to perform below steps multiple time to reproduce the crash.

   - Open the "Query Window".
   - Go to "File" and click on "New SQL tab". Open the 3-4 SQL tabs and
   execute any query in one SQL tab.
   - Go to "File" menu and click on "Exit".
   - After clicking on "Exit" button only Query window should close but
   pgAdmin3 is getting crashed.

Below are the traces for reference.

#0  0x76c4fbf3 in wxControlContainer::SetLastFocus(wxWindow*) ()
from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#1  0x76ccb684 in wxPanel::OnChildFocus(wxChildFocusEvent&) () from
/usr/local/lib/libwx_gtk2u_core-2.8.so.0
#2  0x7633d9d6 in
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) ()
   from /usr/local/lib/libwx_baseu-2.8.so.0
#3  0x7633da7b in wxEventHashTable::HandleEvent(wxEvent&,
wxEvtHandler*) () from /usr/local/lib/libwx_baseu-2.8.so.0
#4  0x7633dde7 in wxEvtHandler::ProcessEvent(wxEvent&) () from
/usr/local/lib/libwx_baseu-2.8.so.0
#5  0x7633d938 in wxEvtHandler::ProcessPendingEvents() () from
/usr/local/lib/libwx_baseu-2.8.so.0
#6  0x762bb281 in wxAppConsole::ProcessPendingEvents() () from
/usr/local/lib/libwx_baseu-2.8.so.0
#7  0x76c4504e in wxAppBase::ProcessIdle() () from
/usr/local/lib/libwx_gtk2u_core-2.8.so.0
#8  0x76bbfe31 in wxapp_idle_callback () from
/usr/local/lib/libwx_gtk2u_core-2.8.so.0
#9  0x7366ace5 in g_main_context_dispatch () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x7366b048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x7366b30a in g_main_loop_run () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x74106eb2 in gtk_dialog_run () from
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#13 0x76c31aea in wxMessageDialog::ShowModal() () from
/usr/local/lib/libwx_gtk2u_core-2.8.so.0
#14 0x006b79bf in frmQuery::CheckChanged(bool) ()
#15 0x006a967e in frmQuery::SqlBookClose(bool) ()
#16 0x006b7d1e in frmQuery::OnClose(wxCloseEvent&) ()
#17 0x7633d9d6 in
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) ()
   from /usr/local/lib/libwx_baseu-2.8.so.0
#18 0x7633da7b in wxEventHashTable::HandleEvent(wxEvent&,
wxEvtHandler*) () from /usr/local/lib/libwx_baseu-2.8.so.0
#19 0x7633dde7 in wxEvtHandler::ProcessEvent(wxEvent&) () from
/usr/local/lib/libwx_baseu-2.8.so.0
#20 0x7633dd70 in wxEvtHandler::ProcessEvent(wxEvent&) () from
/usr/local/lib/libwx_baseu-2.8.so.0
#21 0x76cac39c in wxWindowBase::Close(bool) () from
/usr/local/lib/libwx_gtk2u_core-2.8.so.0
#22 0x7633d9d6 in
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) ()
   from /usr/local/lib/libwx_baseu-2.8.so.0
#23 0x7633da7b in wxEventHashTable::HandleEvent(wxEvent&,
wxEvtHandler*) () from /usr/local/lib/libwx_baseu-2.8.so.0
#24 0x7633dde7 in wxEvtHandler::ProcessEvent(wxEvent&) () from
/usr/local/lib/libwx_baseu-2.8.so.0
#25 0x7633dd70 in wxEvtHandler::ProcessEvent(wxEvent&) () from
/usr/local/lib/libwx_baseu-2.8.so.0
#26 0x76c2f7b5 in gtk_menu_clicked_callback () from
/usr/local/lib/libwx_gtk2u_core-2.8.so.0
#27 0x73b5b3b8 in g_closure_invoke () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0

We will check for Mac OS X environment and keep you updated.

Thanks,
Neel Patel


On Fri, Feb 12, 2016 at 8:51 PM, Dave Page  wrote:

>
>
> On Thu, Feb 11, 2016 at 2:22 PM, Sergey Busel  wrote:
>
>> Added the query name to history entries. Please note that history entries
>> are not modified if user saves [Query 1] to file [foo.sql]. I don't think
>> that would be practical.
>>
>
> Thanks. So I was just about to commit this, when it crashed on me. It
> seems to happen only if there are at least 2 non-dirty tabs open (easy to
> reproduce - open the query tool, add a second tab, then close the window).
> I've fiddled around for a couple of hours, but not been able to get to the
> bottom of it despite trying a few tricks that sometimes help avoid weird
> issues with wxWidgets. There's a stack trace below.
>
> Ashesh, Neel, Sanket, Akshay - can any of you take a quick look on an OSX
> system? I've attached a slightly cleaned up patch, removing some commented
> code and making it a git-diff against master.
>
> Thanks.
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0   org.postgresql.pgadmin3   0x0036ce4f wxWindowBase::GetParent()
> const + 15 (window.h:590)
> 1   libwx_macud_core-2.8.0.dylib   0x01ea6c0b
> wxControlContainer::SetLastFocus(wxWindow*) + 81
> 2   libwx_macud_core-2.8.0.dylib   0x01faf8c0
> wxPanel::OnChildFocus(wxChildFocusEvent&) + 50
> 3   libwx_base_carbonud-2.8.0.dylib 0x0254b984
> wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEv

Re: [pgadmin-hackers] [pgAdmin4] [Patch]: Resource Group Module

2016-02-14 Thread Neel Patel
Hi Akshay,

Please find below review comments.

   - We are getting error at python side saying "*AttributeError:
   'Response' object has no attribute 'strip'*"
   - "CPU Rate Limit" and "Dirty Rate Limit" should not allowed to enter
   the character (a-z). Currently it allows to enter invalid character so we
   are getting below SQL error saying "*LINE 2: SET cpu_rate_limit =
   4545, dirty_rate_limit = gfgf;*"

Both above errors are due to not validated "CPU Rate Limit" and "Dirty Rate
Limit" fields.

Thanks,
Neel Patel

On Mon, Feb 8, 2016 at 4:13 PM, Akshay Joshi 
wrote:

> Hi All
>
> Attached is the patch with the fixes. Please review it and if looks good
> then please commit it.
>
> On Mon, Feb 8, 2016 at 11:54 AM, Neel Patel 
> wrote:
>
>> Hi Akshay,
>>
>> Please find below review comments.
>>
>>  - As per the pgAdmin3, we should allow to enter the floating point value
>> in "CPU Rate Limit" and "Dirty Rate Limit".
>>
>   Fixed.
>
>  - While creating resource group, we are getting error saying 
> "*generate_browser_node()
>> missing 1 required positional argument: 'label'*".
>>
>  Fixed.
>
>  - Valid range for CPU Rate Limit and Dirty Rate Limit is from 0 to
>> 1.67772e+07. We are not able to enter the maximum limit value while
>> creating the
>>resource group.
>>
>
>  Partially fixed, I have limit the max length to 8 digits, but not
> able to fixed it to the exact range.
>
>>
>> Thanks,
>> Neel Patel
>>
>> On Fri, Feb 5, 2016 at 6:15 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi All
>>>
>>> I have added logic to show sql in the "SQL" tab on dashboard and also
>>> fixed some warnings. Please refer and review this patch.
>>>
>>> On Thu, Feb 4, 2016 at 5:50 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi All

 Attached is the patch for the Resource Group Module. Please review it
 and if it looks good then please commit it.

 --
 *Akshay Joshi*
 *Principal Software Engineer *



 *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*

>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>> *Principal Software Engineer *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>


Re: [pgadmin-hackers] [pgAdmin4] [Patch]: Language Module

2016-02-14 Thread Akshay Joshi
Hi All

Attached is the new patch after fixing review comments given by Dave.

On Fri, Feb 12, 2016 at 10:04 PM, Dave Page  wrote:

>
>
> On Fri, Feb 12, 2016 at 11:21 AM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> New language patch is working fine.
>> Ashesh - Can you please review it ?
>> If it looks good then can you please commit ?
>>
>> Thank you,
>> Harshal
>>
>
> A few comments:
>
> - We omitted CREATE LANGUAGE, as most are now extensions. Shouldn't we
> also therefore omit DROP LANGUAGE?
>
Fixed.

> - Please leave a blank line between the file header and python code in
> python files.
>
Fixed.

> - The pydoc module description is missing from __init__.py
>
Fixed.

> - What about the Dependents and Dependencies tabs?
>
 Infrastructure is not ready, so not implemented yet.

>
> - There are few, if any comments in the Javascript. There should be at
> least minimal comments there to note the purpose of each logical code block.
>
Fixed.

>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
*Akshay Joshi*
*Principal Software Engineer *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*


Languages_v2.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] work status

2016-02-14 Thread Harshal Dhumal
Hi,

I have started working on Backup Globals feature.

-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB