Re: Really unique session ID - PID + connection timestamp?

From: Durumdara <durumdara(at)gmail(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Really unique session ID - PID + connection timestamp?
Date: 2016-04-11 12:44:08
Message-ID: CAEcMXhkVSkF+yb0ocybSM=nejN1+sxrZpvzbsC+CmrL0cmuTcw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear All!

2016-04-10 18:03 GMT+02:00 Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>:

> On 04/10/2016 06:29 AM, durumdara(at)gmail(dot)com wrote:
>
>>
>> Products, offers are edited for long time.
>>
>
> Define long time, a session, a day, days, etc?
>

For 1 minute to 1-2 hours.

>
> But we must save subdata. This is not a "word like document" which can
>> saved at once, in a transaction.
>> When a product edited, we must protect it from other user's edit.
>> But it's subdata must be posted/commited to the DB, for example
>> shipping, article quantity changes, vouchers, etc.
>>
>
> So folks can make changes to the attributes of a Product, Offer, etc while
> it is being changed in ways they can not see?
>

They are not linked closely. Other people also could give new transport
areas. And they must read them.
And no, Product and Offer elements don't editable for more people at once.

>
> Or do they get a read only view that changes as the 'locking' user makes
> edits?
>

Yes, and they can add new lines.

>
>
>>
> To be clear you are trying to come up with a solution that allows your
> application to run against different databases(Firebird, SQL Server,
> Postgres, etc?), using a single code base, correct?

Yes, absulately right.

We have 3 choices:
1.) A second connection with locking transaction (we lock other resources)
2.) An advisory locks.
3.) A multi-DB solution - if we can identify the current sessions in 99.99%
(except summer/winter or other hour problem and perfect similarity of
timestamps).

Thanks, we can close this thread... :-)

Regards

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Artur Zakirov 2016-04-11 13:05:06 Re: How to build docs from master?
Previous Message Andreas Joseph Krogh 2016-04-11 12:27:02 How to build docs from master?