Re: [pgAgent][Patch] Fixing connection pool leak

2017-10-22 Thread Ashesh Vashi
Hi Rob,

How about this?


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Sat, Oct 21, 2017 at 8:36 PM, Rob Emery  wrote:

> Hi,
>
> Following on from https://www.postgresql.org/message-id/CA%
> 2BOCxoz4tONxSpd1rdU-9SPKRzucz8Bar2CXkEDnCwV6H77ZyA%40mail.gmail.com
>
> I think I've identified and fixed the issue, please see the patch attached.
>
> As I understand it when there are multiple pgagent instances and they
> clash executing a job (i.e rc != 1 on job.cpp:38), the loser of the
> conflict's thread will never be executed (i.e. job.cpp:418
> JobThread::Entry), which is responsible for deleting the job owned by the
> thread, meaning that the connection is never returned to the pool. By
> moving the delete of the job into the destructor, we can assure that the
> connection is tidied up in both cases as the thread is deleted in the error
> case explicitly in pgAgent.cpp:185.
>
> The only possibly unintended difference that I can see with doing this is
> that the log "Completed job: %s" is now output when before it wasn't,
> however I think this new behaviour is actually correct as the job object is
> completed at that time.
>
> Thanks,
> Rob
>
> 
>
>
> 
> Codeweavers
> October
>  Newsletter
> 
> *l  *Auto Trader extends partnership with Codeweavers
> 
>
>
> 
>
> *What are Codeweavers doing to gear up for GDPR?
> *
>
>
>
> *Phone:* 0800 021 0888  * Email: *contac...@codeweavers.net
> *Codeweavers Ltd* | Barn 4 | Dunston Business Village | Dunston | ST18 9AB
> Registered in England and Wales No. 04092394 | VAT registration no. 974
> 9705 63
>
> 
>   [image:
> https://plus.google.com/b/105942302039373248738/+CodeweaversNet]
>   [image:
> https://twitter.com/CodeweaversTeam] 
>


connection_pool_v2.patch
Description: Binary data


Re: pgadmin4 l10n issues

2017-10-22 Thread Ashesh Vashi
Hi Dave/Alexander,

On Thu, Oct 19, 2017 at 6:43 PM, Dave Page  wrote:

> Akshay, can you review/commit this, and look into why the remaining
> strings Alexander notes are not getting translated please?
>


Did you forget to attach the patch?

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi
*

>
> Thanks.
>
> On Thu, Oct 19, 2017 at 6:08 AM, Alexander Lakhin 
> wrote:
>
>> Hello,
>>
>> I would like to to add Russian translation to pgAdmin 4, but having
>> complete messages.po, I get incomplete UI translation.
>> (See ss1.png attached.)
>> I found two issues with the i18n in the current master.
>> The first one is with web/pgadmin/tools/templates/js/translations.js.
>> I don't understand why, but commit 4a91bcde makes the function return an
>> empty array instead of translations.
>> Patch for fixing it is attached.
>>
>> The second one is more complex and related to get_locale() method. This
>> method is called when first gettext() invoked and it occurs on early stage,
>> where the Preference module 'miscellaneous' is not registered yet. To be
>> precise, first call to gettext() occurs when registering the 'Browser'
>> module. But even if MiscModule will register first, it had to call
>> _('Miscellaneous') before it gets registered.
>> So I propose to implement some way to get current language when the misc
>> preference module is not registered. Please look at the proposed patch.
>>
>> After these two fixes I get (almost) complete Russian interface (See
>> ss2.png attached.)
>> (May be some more strings should be made localizeable, but that is
>> another question.)
>>
>> --
>> Alexander Lakhin
>> Postgres Professional: http://www.postgrespro.com
>> The Russian Postgres Company
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>