Re: BUG #14273: Tuple concurently updated error while creating function using async call from node js with postgresq

From: Kishor Hargude <hargudekishor(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: BUG #14273: Tuple concurently updated error while creating function using async call from node js with postgresq
Date: 2016-08-03 07:00:20
Message-ID: CAF=+5wsj9yYKqWK3GRSCR8XViGjg7P_xhvano_KrGgHR9WAQrw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

Thanks everyone for your valuable inputs.

I got it now,The issue may be happening due to pg_proc catalog table update
for same function by different connection at the same time(due to async
call of node js to multiple db connections for same functions creation ).

--
Kishor

On Wed, Aug 3, 2016 at 5:44 AM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:

> On Wed, Aug 3, 2016 at 3:00 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
> wrote:
> > hargudekishor(at)gmail(dot)com wrote:
> >
> >> We have connected our node js application with postgresql-9.4.8.We have
> >> several functions which are getting created in database using async call
> >> from nodejs to postgresql server.but while creating those functions ,We
> are
> >> encountered a error of "Tuple concurrently updated".
> >
> > Yeah, this is known. We haven't worried too much, because the use case
> > seems thin: why are you deleting and creating the function over and
> > over? Wouldn't it be better to create the function once and be done
> > with it?
>
> Hm. These days I have been pinged regarding the fact that it is
> possible to reach this error on a relation that has a lot of updates
> and where autovacuum is made more aggressive. Well, it increases the
> possibility to face it. simple_heap_delete() is not used except for
> catalogs, so could it be related to one of the pg_stat catalogs
> complaining with VACUUM ANALYZE running in parallel?
>
> >> And because of this error our node js application is getting
> >> terminated.which is not affordable to us.
> >
> > Surely the application should be able to do something else upon
> > receiving an error, rather than crashing.
>
> That's for sure. A crash is a bad idea, and I recall that this is not
> a critical failure.
> --
> Michael
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message klimych 2016-08-03 09:53:01 BUG #14275: cursor's variable in pgsql doesn't respect scope
Previous Message Michael Paquier 2016-08-03 06:15:39 Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file