#17266: psycopg2 backend should use get_parameter_status to check if SET TIME ZONE is needed -------------------------------------+------------------------------------- Reporter: akaariai | Owner: aaugustin Type: | Status: new Cleanup/optimization | Version: Component: Database layer | Resolution: (models, ORM) | Triage Stage: Accepted Severity: Normal | Needs documentation: 0 Keywords: | Patch needs improvement: 1 Has patch: 1 | UI/UX: 0 Needs tests: 0 | Easy pickings: 0 | -------------------------------------+-------------------------------------
Comment (by akaariai): The documentation talks about postgresql.conf. That is, setting those parameters is done in postgresql.conf, or for the user you use for taking the connection. That is, those are hints for things you should do to your PostgreSQL setup. If you do change those, you will get fewer queries (including a removed extra commit for timezone) in connection setup. The parameters are set up for each new connection, but late versions (at least 2.4.2) of psycopg are smart enough to skip the SET queries for client_encoding and transaction_isolation if they are already correct. And the included get_parameter_status change allows for skipping the SET timezone. I don't know if it is a good idea to include this hint in the documentation, but I figured that it is better to mention it than keep it as hidden knowledge. Also, the documentation probably needs to be more clear. If you missed this, then so will others. Me need better writing skills :) -- Ticket URL: <https://code.djangoproject.com/ticket/17266#comment:6> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.