Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#26712 closed Cleanup/optimization (fixed)

Avoid unnecessary SET TIMEZONE queries on PostgreSQL when no changes are required

Reported by: Simon Charette Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The setting_changed receiver for the TIME_ZONE and USE_TZ settings inconditionally resets each connections timezones on every change even if not required. This is not an issue for all backends except PostgreSQL where a query needs to be performed.

Whether or not actions must me performed on TIME_ZONE and USE_TZ change should be delegated to the backend specific connection and signal receivers should only have to clear possibly stale cached values.

Change History (6)

comment:1 by Simon Charette, 9 years ago

Needs tests: set

comment:2 by Tim Graham, 9 years ago

Has patch: set
Needs documentation: set
Triage Stage: UnreviewedAccepted

comment:3 by Simon Charette, 9 years ago

Needs documentation: unset
Needs tests: unset

(I had accidently checked needs tests instead of has patch when I linked to the PR)

comment:4 by Tim Graham, 9 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Simon Charette <charette.s@…>, 9 years ago

Resolution: fixed
Status: newclosed

In b484f167:

Fixed #26712 -- Avoided unnecessary SET TIMEZONE queries on PostgreSQL.

A change of the USE_TZ or TIME_ZONE settings doesn't necessarily require a
change to the active connections' timezones.

comment:6 by Simon Charette <charette.s@…>, 9 years ago

In 271581df:

Refs #26712 -- Removed workarounds for PostgreSQL queries on TIME_ZONE changes.

Note: See TracTickets for help on using tickets.
Back to Top