> It would be helpful to have a backend method that performers the
"restore connection between uses" function, rather than just use
connection.abort() (of course, the default implementation can use that).
For example, on PostgreSQL, ABORT; DISCARD ALL is the recommended way of
resetting a connection, so being able to implement that would be great.
This was independently suggested by Anssi, and it looks like a good idea
to implement.
--
Ticket URL: <https://code.djangoproject.com/ticket/19948>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> On django-developers, Christopher Pettus says:
>
> > It would be helpful to have a backend method that performers the
> "restore connection between uses" function, rather than just use
> connection.abort() (of course, the default implementation can use that).
> For example, on PostgreSQL, ABORT; DISCARD ALL is the recommended way of
> resetting a connection, so being able to implement that would be great.
>
> This was independently suggested by Anssi, and it looks like a good idea
> to implement.
New description:
On django-developers, Christophe Pettus says:
> It would be helpful to have a backend method that performers the
"restore connection between uses" function, rather than just use
connection.abort() (of course, the default implementation can use that).
For example, on PostgreSQL, ABORT; DISCARD ALL is the recommended way of
resetting a connection, so being able to implement that would be great.
This was independently suggested by Anssi, and it looks like a good idea
to implement.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/19948#comment:1>
Comment (by carljm):
I think "ABORT; DISCARD ALL" may also need to be followed up with
``self.init_connection_state()", because it would otherwise discard the
session state that Django sets up for each connection.
--
Ticket URL: <https://code.djangoproject.com/ticket/19948#comment:2>
Comment (by aaugustin):
Yes, it should.
--
Ticket URL: <https://code.djangoproject.com/ticket/19948#comment:3>
Comment (by auvipy):
any update on this?
--
Ticket URL: <https://code.djangoproject.com/ticket/19948#comment:4>