Project

General

Profile

Bug #958

PostgreSQL Syntax Errors

Added by titanofold almost 14 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Quassel Core
Target version:
-
Start date:
05/02/2010
Due date:
% Done:

100%

Estimated time:
Version:
0.6-pre
OS:
Any

Description

When using PostgreSQL as the backend to Quassel Core, my logs are filled with syntax errors. The errors stem from duplicate keys and null values for senderid. Quassel Core should not depend on PgSQL to prevent duplicate entries -- in other words, Quassel Core should check for an existing entry -- and it shouldn't try to submit null values for a column that has a NOT NULL constraint.

I've attached a file that shows the entries that PgSQL receiving. I've limited it to just 20, but after less than a week of using Quassel, I have 70,938 entries in my log regarding it.

results.txt (9.36 KB) results.txt SELECT * FROM current WHERE appname = 'postgres' ORDER BY datetime DESC LIMIT 20; titanofold, 05/02/2010 10:09 PM

Associated revisions

Revision c371e27b (diff)
Added by debfx about 11 years ago

Check if user setting pair exists before inserting/updating it.

If it exists it's inserted else the date is updated.
This fixes a (harmless) error that clutters the postgres log.
Fixes #958

History

#1 Updated by ddenis over 13 years ago

I have a similar issue with "senderid" errors appearing on the log:
2010-10-06 19:28:04 Warning: PostgreSqlStorage::executePreparedQuery() no prepared Query with handle "insert_sender" on Database "quassel_QPSQL_con_3"
2010-10-06 19:28:04 Error: unhandled Error in QSqlQuery!
2010-10-06 19:28:04 Error: last Query: EXECUTE quassel_3 ('2010-10-6 17:28:04.357', 10, 2, 4, 'asimov.freenode.net', '*** Looking up your hostname...')
2010-10-06 19:28:04 Error: executed Query:
2010-10-06 19:28:04 Error: bound Values:
2010-10-06 19:28:04 Error: Error Number: -1
2010-10-06 19:28:04 Error: Error Message: ERROR: null value in column "senderid" violates not-null constraintQPSQL: Unable to create query
2010-10-06 19:28:04 Error: Driver Message: QPSQL: Unable to create query
2010-10-06 19:28:04 Error: DB Message: ERROR: null value in column "senderid" violates not-null constraint

#2 Updated by jotik over 12 years ago

I'm getting same error and they fill up system logs quite quickly. Any progress on fixing this?

#3 Updated by jotik over 12 years ago

I still get errors like

Oct  6 00:59:54 localhost postgres[29692]: [917-1] ERROR:  duplicate key value violates unique constraint "user_setting_pkey" 
Oct  6 00:59:54 localhost postgres[29692]: [917-2] DETAIL:  Key (userid, settingname)=(1, BufferViews) already exists.

and
Oct  6 00:59:54 localhost postgres[29692]: [918-1] ERROR:  duplicate key value violates unique constraint "user_setting_pkey" 
Oct  6 00:59:54 localhost postgres[29692]: [918-2] DETAIL:  Key (userid, settingname)=(1, GlobalNetworkConfig) already exists.

with Quassel 0.7.3.

#4 Updated by dazjorz over 12 years ago

Same here, but possibly a new issue / regression, because it happens for me since the upgrade from 0.7.1 to 0.7.3.

#5 Updated by debfx about 11 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset quassel|commit:c371e27b23667e05cccffb200acfb35f5af2a64a.

Also available in: Atom PDF