Thread: single click, double query

single click, double query

From
Szabolcs BALLA
Date:
Hi,

I have a strange problem with psql 7.4.7.
I have customers who run xp, with sp1 (with sp2 no problem), when they
report from our web-based application they send a query
after a single click. The same queries have been posted twice within a
few milliseconds.
How can I forbid this on db server side? Is it possible?
note: I can't forbid a "too fast" connections by IP because they come
throught firewall.

Thanks,
Szabek


Re: single click, double query

From
Jaime Casanova
Date:
On 12/15/05, Szabolcs BALLA <szballa@confinsystems.com> wrote:
> Hi,
>
> I have a strange problem with psql 7.4.7.
> I have customers who run xp, with sp1 (with sp2 no problem), when they
> report from our web-based application they send a query
> after a single click. The same queries have been posted twice within a
> few milliseconds.
> How can I forbid this on db server side? Is it possible?

if you see the problem just in clients with xp sp1 and not with xp sp2
then the problem is in the client not in the server...

upgrade your xp clients to sp2...

> note: I can't forbid a "too fast" connections by IP because they come
> throught firewall.
>
> Thanks,
> Szabek
>
>


--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

Re: single click, double query

From
Szabolcs BALLA
Date:
Yes, but they are our clients, and I can't say for them: please upgrade
your client because if you use our applications the db server will have
a performance problem...:(

Jaime Casanova wrote:

>On 12/15/05, Szabolcs BALLA <szballa@confinsystems.com> wrote:
>
>
>>Hi,
>>
>>I have a strange problem with psql 7.4.7.
>>I have customers who run xp, with sp1 (with sp2 no problem), when they
>>report from our web-based application they send a query
>>after a single click. The same queries have been posted twice within a
>>few milliseconds.
>>How can I forbid this on db server side? Is it possible?
>>
>>
>
>if you see the problem just in clients with xp sp1 and not with xp sp2
>then the problem is in the client not in the server...
>
>upgrade your xp clients to sp2...
>
>
>
>>note: I can't forbid a "too fast" connections by IP because they come
>>throught firewall.
>>
>>Thanks,
>>Szabek
>>
>>
>>
>>
>
>
>--
>regards,
>Jaime Casanova
>(DBA: DataBase Aniquilator ;)
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>
>
>


Re: single click, double query

From
Stephan Szabo
Date:
On Thu, 15 Dec 2005, Szabolcs BALLA wrote:

> Hi,
>
> I have a strange problem with psql 7.4.7.
> I have customers who run xp, with sp1 (with sp2 no problem), when they
> report from our web-based application they send a query
> after a single click. The same queries have been posted twice within a
> few milliseconds.
> How can I forbid this on db server side? Is it possible?

Not easily that I can think of.  Something between the two that passes
connections but filters queries might be reasonably easy to make. I see
two possible problems with this on the server side though.  First, if
those are coming in separate connections then you have to either delay for
the first query or pay the cost of making a database backend even if
you're going to drop it if its a duplicate. Second, if it's possible for
two client instances to send the same query then you could break the
application in the other direction where the second client gets no
response.