Merge lp:~allenap/launchpad/log-statement-none into lp:launchpad
Proposed by
Gavin Panella
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~allenap/launchpad/log-statement-none |
Merge into: | lp:launchpad |
Diff against target: |
11 lines 1 file modified
utilities/launchpad-database-setup (+1/-1) |
To merge this branch: | bzr merge lp:~allenap/launchpad/log-statement-none |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | Approve | ||
Review via email: mp+13828@code.launchpad.net |
Commit message
Disable PostgreSQL statement logging by default when setting up the database.
To post a comment you must log in.
Default to not logging any statements when setting up the database. I
think it's basically harmful; it slows things down, takes up huge
amounts of disk space and is unnecessary 99% of the time. It's easy to
turn on again for a session, user or database, e.g.:
SET log_statement TO 'all';
ALTER ROLE launchpad SET log_statement TO 'all';
ALTER DATABASE launchpad_dev SET log_statement TO 'all';
[ http:// www.postgresql. org/docs/ 8.3/static/ sql-set. html www.postgresql. org/docs/ 8.3/static/ sql-alterrole. html www.postgresql. org/docs/ 8.3/static/ sql-alterdataba se.html ]
http://
http://
It's also possible to trace statements using Storm:
from storm.tracer import debug; debug(True)
[ https:/ /dev.launchpad. net/Debugging ]