Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g20Lx-0007f5-S3 for pgsql-general@arkaria.postgresql.org; Mon, 17 Sep 2018 20:42:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g20Lt-0003wc-5o for pgsql-general@arkaria.postgresql.org; Mon, 17 Sep 2018 20:42:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g20Ls-0003vS-Hr for pgsql-general@lists.postgresql.org; Mon, 17 Sep 2018 20:42:36 +0000 Received: from mail-qt0-x22d.google.com ([2607:f8b0:400d:c0d::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g20Ln-0005Cl-BA for pgsql-general@postgresql.org; Mon, 17 Sep 2018 20:42:32 +0000 Received: by mail-qt0-x22d.google.com with SMTP id r37-v6so16682640qtc.0 for ; Mon, 17 Sep 2018 13:42:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=xeT/MxBv1T8O0bVmVqn9OK4NXGTr6vNqT55qeJ9dg30=; b=IZMHbFP5T4iqcp2Io+XfxRhHOqg/YAQ0C8TgC7IgdeD8mDl408Cd3l8qGWZMETHS81 35p95nQAiJHF/MEG+SXqT2ezih7ug38p40Fb7629rE/Ll0DzebvrYyV9fuaCXUsQmrtG BP+D1FDBf6mi8yvsJ+zaEaxHWlSKUc1dGuPw4aRmSAizFN7rJEHsK/ODl7SKHBVbJNOm Ek7ebrrfIdC7m2NZxAx4/2GpvbMJ6+8I5IUnVkX/3VB2KUlAmONAMJPWtEKLjRo5qYOS SYHIUjs6Ok+ltKhObzDu/vXg+GLaXN5iyRnTHYNyc4Xc4VY5oFgK0Wi1/XJa9LPGcYJ0 AQ9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=xeT/MxBv1T8O0bVmVqn9OK4NXGTr6vNqT55qeJ9dg30=; b=Zbd/k89z5wSANU3BaZMt5SlzMYmXKaEeRCEPld9PejTv5TWdHAt6pmMKNDMtveGR8D Gn/Vt4KLAUNz54bmEds8PTpQmFlMK4fSg/4/TD4BK+mPPJQIfuYLWHZiugQjP3Z5dzSS XWjam3Ea+m4O456YJi17b+ChgTRK3LBeWKoWnWxqbin4V0OEANny9Wmk5QSk4b8fcZPT JI0o7rlRXm45OZfNUVIcb+xRHfHQqCW4L84VYkyvmT9maX6Drr6oLSCe6SQLZpg1W4WB 9TA+jzI6+gKTL8GvOhc2994qJvsxYCc0os2J7GuMA2mUsYJt0FHHTZthfRCk9cf/vOos XO1w== X-Gm-Message-State: APzg51DZLFlvbB11RQq7xfc4VWCGE+wODwCTd3MW/PCpX68YUbsOFmyi l2W4EioG70vs2gBmnqNBQWOiAQrz X-Google-Smtp-Source: ANB0VdZGUZY87T1AbuDrbvaJG8w4dYNuPvXrHYoRwVt1fk1YpgEWydrRYnmFmvUlSSaFu5BEVoKuFA== X-Received: by 2002:a0c:d5d3:: with SMTP id h19-v6mr19402253qvi.218.1537216949894; Mon, 17 Sep 2018 13:42:29 -0700 (PDT) Received: from [192.168.1.250] (host130.190-229-77.telecom.net.ar. [190.229.77.130]) by smtp.gmail.com with ESMTPSA id v50-v6sm10692062qtk.68.2018.09.17.13.42.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Sep 2018 13:42:29 -0700 (PDT) Subject: Re: Logical locking beyond pg_advisory To: Chris Travers Cc: Merlin Moncure , Postgres General References: <8d7f3295-c2d6-ef00-1300-4f6db798f76e@gmail.com> <2224096b-7095-372d-fb7b-f3e4add7d334@gmail.com> From: marcelo Message-ID: Date: Mon, 17 Sep 2018 17:42:23 -0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------DB25AE69246512753AF04E42" Content-Language: en-US X-Antivirus: Avast (VPS 180917-4, 17/09/2018), Outbound message X-Antivirus-Status: Clean List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------DB25AE69246512753AF04E42 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 17/09/2018 14:27 , Chris Travers wrote: > > > On Mon, Sep 17, 2018 at 6:04 PM marcelo > wrote: > > > > I´m using an ORM (Devart´s) to access the database, so, I cannot > "select ... FOR UPDATE". The application paradigm is that a user > have a list of records (after a query) and she could update or > delete any of them as the business rules allows it. So, at least > an advisory lock is a must. > I´m convinced by now: I would stay with advisory locks... > expecting no app crash could occur... > > > I would say to fix this in the ORM rather than reinvent what the > database already gives you in the database. > You are right. But you know... > > Thank you all. > Marcelo > > > Libre de virus. www.avast.com > > > > <#m_-9091154853724945458_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > > > -- > Best Wishes, > Chris Travers > > Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor > lock-in. > http://www.efficito.com/learn_more --- El software de antivirus Avast ha analizado este correo electrónico en busca de virus. https://www.avast.com/antivirus --------------DB25AE69246512753AF04E42 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

On 17/09/2018 14:27 , Chris Travers wrote:


On Mon, Sep 17, 2018 at 6:04 PM marcelo <marcelo.nicolet@gmail.com> wrote:


I´m using an ORM (Devart´s) to access the database, so, I cannot "select ... FOR UPDATE". The application paradigm is that a user have a list of records (after a query) and she could update or delete any of them as the business rules allows it. So, at least an advisory lock is a must.
I´m convinced by now: I would stay with advisory locks... expecting no app crash could occur...

I would say to fix this in the ORM rather than reinvent what the database already gives you in the database.

You are right. But you know...
 
Thank you all.
Marcelo

Libre de virus. www.avast.com


--
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor lock-in.

--------------DB25AE69246512753AF04E42--