Re: High concurrency same row (inventory)

Jean Baro <[email protected]>
Newsgroups gmane.comp.db.postgresql.performance
Message-ID <CA+fQeennK4mHkN0Kp5_xFDAU8dK=sY6-=J6ftpJmN9OympOEUg@mail.gmail.com>
Michael Vitale --> No, there is only postgreSQL running in this server...
it is in fact an RDS server.

SELECT n_tup_ins as "inserts",n_tup_upd as "updates",n_tup_del as
"deletes", n_tup_hot_upd as "hot updates", n_live_tup as "live_tuples",
n_dead_tup as "dead_tuples"
FROM pg_stat_user_tables
WHERE schemaname = 'schemaFOO' and relname = 'bucket';

[image: image.png]



On Mon, Jul 29, 2019 at 9:26 PM Jean Baro <[email protected]> wrote:

> [image: image.png]
>
> The dead tuples goes up at a high ratio, but then it gets cleaned.
>
> if you guys need any further information, please let me know!
>
>
>
> On Mon, Jul 29, 2019 at 9:06 PM Jean Baro <[email protected]> wrote:
>
>> The UPDATE was something like:
>>
>> UPDATE bucket SET qty_available = qty_available + 1 WHERE bucket_uid =
>> 0940850938059380590
>>
>> Thanks for all your help guys!
>>
>> On Mon, Jul 29, 2019 at 9:04 PM Jean Baro <[email protected]> wrote:
>>
>>> All the failures come from the Bucket Table (see image below).
>>>
>>> I don't have access to the DB, neither the code, but last time I was
>>> presented to the UPDATE it was changing (incrementing or decrementing)
>>> *qty_available*, but tomorrow morning I can be sure, once the
>>> developers and DBAs are back to the office. I know it's quite a simple
>>> UPDATE.
>>>
>>> Table is called Bucket:
>>> {autovacuum_vacuum_scale_factor=0.01}
>>>
>>> [image: Bucket.png]
>>>
>>>
>>> On Mon, Jul 29, 2019 at 3:12 PM Michael Lewis <[email protected]>
>>> wrote:
>>>
>>>> Can you share the schema of the table(s) involved and an example or two
>>>> of the updates being executed?
>>>>
>>>
Bucket.png (image/png, 14.6 KB) - not displayed
image.png (image/png, 4.2 KB) - not displayed
image.png (image/png, 4.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.