Re: [Spacewalk-devel] [PATCH] Avoid a possible concurrency issue on RhnSet update

2013-09-04 Thread Silvio Moioli
On 09/03/2013 02:33 PM, Tomas Lestach wrote: to be honest, I personally do not like seeing DB index names in the application code. I agree that it is not really an elegant solution, but I could not find another way of ignoring such specific exceptions. Ideas welcome :-) (Btw. does it work on

[Spacewalk-devel] pltcl question

2013-09-04 Thread Silvio Moioli
Hi, We recently stumbled in some failing tests downstream and we were wondering why it was chosen to use pltcl in the new logging schema (introduced a couple of months ago). Problems arise because: - pltcl global variables are used [1]; - Postgres allocates a new Tcl interpreter for each

Re: [Spacewalk-devel] [PATCH] Avoid a possible concurrency issue on RhnSet update

2013-09-04 Thread Tomas Lestach
(Btw. does it work on PG, when the index name is stated uppercase?) Actually, we could not reproduce the problem in Postgres at all. This is interesting. Isn't it possible to use 'SELECT FOR UPDATE' in these cases? I do not really think so, because AFAIU there is actually no SELECT

[Spacewalk-devel] patch for rhn-entitlement-report

2013-09-04 Thread Shannon Hughes
rhn-entitlement-report crashes with stack trace when you unentitle software channels from systems and leave unentitled: [root@litmus ~]# rhn-entitlement-report Software Channel Entitlements Across RHN Satellite : Channel LabelTotal Regular Used Available Total Flex

Re: [Spacewalk-devel] [PATCH] Avoid a possible concurrency issue on RhnSet update

2013-09-04 Thread Jan Pazdziora
On Wed, Sep 04, 2013 at 08:35:27AM +0200, Silvio Moioli wrote: On 09/03/2013 02:33 PM, Tomas Lestach wrote: to be honest, I personally do not like seeing DB index names in the application code. I agree that it is not really an elegant solution, but I could not find another way of ignoring

Re: [Spacewalk-devel] [PATCH] Avoid a possible concurrency issue on RhnSet update

2013-09-04 Thread Jan Pazdziora
On Wed, Sep 04, 2013 at 08:35:27AM +0200, Silvio Moioli wrote: That would mean saving snapshot IDs between HTTP requests. Again, doable, but sounds quite difficult at least to me! Yet another possibility would be to INSERT only tuples not already present by set difference, something like