Red is spamming postgres with an invalid query #3983

Closed
opened 2020-06-18 11:47:50 +02:00 by Ryonez · 7 comments
Ryonez commented 2020-06-18 11:47:50 +02:00 (Migrated from github.com)

Other bugs

What were you trying to do?

Was looking at my database logs for another issue.

What were you expecting to happen?

To find something related to my other issue.

What actually happened?

I found this:
image

How can we reproduce this issue?

I honestly have no clue, I'm hoping you guys know what's happening here.

# Other bugs <!-- Did you find a bug with something other than a command? Fill out the following: --> #### What were you trying to do? Was looking at my database logs for another issue. #### What were you expecting to happen? To find something related to my other issue. #### What actually happened? I found this: ![image](https://user-images.githubusercontent.com/16157130/85005638-32534d00-b1ad-11ea-8220-0ac0844f3e08.png) #### How can we reproduce this issue? I honestly have no clue, I'm hoping you guys know what's happening here.
Drapersniper commented 2020-06-18 11:51:52 +02:00 (Migrated from github.com)

All I see is Red trying to get a value that doesnt exist, which makes it use the default set by cogs.

All I see is Red trying to get a value that doesnt exist, which makes it use the default set by cogs.
Ryonez commented 2020-06-18 11:55:22 +02:00 (Migrated from github.com)

Why is this ending up in my database logs then?

Why is this ending up in my database logs then?
Drapersniper commented 2020-06-18 11:56:32 +02:00 (Migrated from github.com)

Because a query is being made for the value?

Because a query is being made for the value?
Ryonez commented 2020-06-18 12:00:22 +02:00 (Migrated from github.com)

I guess this is a case where I'm just surprised because I've never seen a database log to the docker logs for query errors so far.

Can this be fixed on red's side? Something like if value not found then create default? Because I'd like to use the logs, and having them spammed with the same query from something else is a little harder to sort through.

I guess this is a case where I'm just surprised because I've never seen a database log to the docker logs for query errors so far. Can this be fixed on red's side? Something like if value not found then create default? Because I'd like to use the logs, and having them spammed with the same query from something else is a little harder to sort through.
Drapersniper commented 2020-06-18 12:04:01 +02:00 (Migrated from github.com)

Postgres data is not cached within red.

So everytime a valueis queried, and it doesnt exist in the database the error is raised which signals that the default value in memory should be used.

There doesn't really seem to be anything broken here as we need to know when a value doesnt exist to use the default.

Postgres data is not cached within red. So everytime a valueis queried, and it doesnt exist in the database the error is raised which signals that the default value in memory should be used. There doesn't really seem to be anything broken here as we need to know when a value doesnt exist to use the default.
Ryonez commented 2020-06-18 12:11:55 +02:00 (Migrated from github.com)

Hmm, maybe there's a way to tweak the verbosity on Postgres's side then.

Hmm, maybe there's a way to tweak the verbosity on Postgres's side then.
Ryonez commented 2022-10-13 14:50:24 +02:00 (Migrated from github.com)

Oh, thank you very much!

I must confesses I'd put this out of mind long ago >.<

Oh, thank you very much! I must confesses I'd put this out of mind long ago >.<
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#3983
No description provided.