Re: Problem w Favourites menu

From: Dave Page <dave(dot)page(at)enterprisedb(dot)com>
To: Dinesh Kumar <dinesh(dot)kumar(at)enterprisedb(dot)com>
Cc: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>, "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>, Lou Oquin <LOquin(at)nammotalley(dot)com>
Subject: Re: Problem w Favourites menu
Date: 2013-03-25 18:28:01
Message-ID: CA+OCxozZXxjftq7G7FXKUe=9zRnTDo6Up71BJZF=wDtQdEYhTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Mon, Mar 25, 2013 at 9:15 AM, Dinesh Kumar
<dinesh(dot)kumar(at)enterprisedb(dot)com> wrote:
>
> While working on this issue in my local machine i have tried some test cases
> to re-produce the same and found that "pgadmin_favourites.xml" overwriting
> it's favorite details among the concurrent "Favourite" items.
>
> To re-produce the same case, i have followed the below steps.
>
> 1) Take 2 new pgAdmin instances in a same box.
>
> 2) From one instance take Favorite Dialog box from Query window.
>
> 3) From second instance take Favorite Dialog box from Query window.
>
> 4) Type your "Favorite" name in the text box of instance 1's Favorite Dialog
> box and press "OK".
>
> Ex:- "Weekly Report"
> 5) Check the file "pgadmin_favourites.xml" for the value.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <favourites>
> <favourite title="Weekly Report">dfdfd </favourite>
> </favourites>
>
> 6) Type your "Favorite" name in the text box of instance 2nd Favorite Dialog
> box and press "OK".
>
> Ex:- "Daily Report"
>
> 7) Check the file "pgadmin_favourites.xml" for the value.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <favourites>
> <favourite title="Daily Report">fd fdfdf pgadmin_favourites.xml</favourite>
> </favourites>
> 8) Once, we restart all the pgAdmin instances, i am not able to see my
> "Weekly Report" Favorite from the list.
>
> Let me know if it is a Bug or a known behavior of pgAdmin. Thanks for your
> guidance.

I'm not entirely surprised it behaves that way, but it's not the
nicest behaviour for sure. I think the most sensible fix would be to
re-read the favourites file immediately before saving it, and then
adding the new item. Want to try to come up with a patch when you get
a few minutes spare?

--
Dave Page
Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dinesh Kumar 2013-03-26 06:45:38 Re: Problem w Favourites menu
Previous Message Dinesh Kumar 2013-03-25 13:15:40 Re: Problem w Favourites menu