Last modified: 2012-08-04 20:48:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T26629, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24629 - Eliminating noise from postgres logs
Eliminating noise from postgres logs
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.17.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2010-08-02 10:38 UTC by Tommy Gildseth
Modified: 2012-08-04 20:48 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
10 lines changed/added in includes/db/DatabasePostgres.php (794 bytes, patch)
2010-08-02 10:38 UTC, Tommy Gildseth
Details

Description Tommy Gildseth 2010-08-02 10:38:00 UTC
Created attachment 7610 [details]
10 lines changed/added in includes/db/DatabasePostgres.php

We are running a number of instances of mediawiki on PostgreSQL and are getting a large amount of warning messages in the postgres log, which could easily be fixed with a few simple changes to DatabasePostgres.php. The messages in question are the following:


Message about escape string syntax:
=========================================
[2010-07-01 00:02:30.022 CEST] [dbpg-bloggwiki] [mediawiki:mediawiki] WARNING: nonstandard use of \\ in a string literal at character 25
[2010-07-01 00:02:30.022 CEST] [dbpg-bloggwiki] [mediawiki:mediawiki] HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
=========================================


And warning message when calling "COMMIT" when no transaction is in progress
=========================================
[2010-07-01 00:10:08.521 CEST] [dbpg-bloggwiki] [mediawiki:mediawiki] WARNING:  there is no transaction in progress
=========================================


It's not that it's a critical problem, but it would be nice to avoid filling up our logs with 1-2GB of these kind of messages per month, in addition to it being more correct.
Comment 1 Chad H. 2010-08-06 12:56:17 UTC
The checks for $mTrxLvl before COMMIT/ROLLBACK is done as of r70558. 

Left off the escape thingie for \\ because I have no clue what's going on there. Somebody else can review that bit :)
Comment 2 Tommy Gildseth 2010-08-06 13:03:11 UTC
This section of the postgres documentation gives a little more detail on the escape string syntax:
http://www.postgresql.org/docs/8.4/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE
Comment 3 Greg Sabino Mullane 2010-08-24 14:43:00 UTC
You can add this to your postgresql.conf to turn off those escape warnings:

escape_string_warning = off


Closing: please reopen if you see other verbosity in the logs.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links