You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue with the Postgres Chat Memory node in n8n where the query to the PostgreSQL database does not respect the "Context Window Length" setting. Despite setting this value to a low number, the query retrieves the full table rather than limiting the amount of historical chat data being returned.
This issue significantly impacts performance when using persistent chat memory, as the full history is unnecessarily loaded.
To Reproduce
Configure the Postgres Chat Memory node in a workflow.
Set "Context Window Length" to a low number (e.g., 5 or 10).
Use a fixed session key to ensure chat memory persists across sessions.
Observe the query execution and response time.
Check the node output and see that all rows are being returned instead of only the expected limited number.
Expected behavior
The query should retrieve only the specified number of recent chat history entries based on the "Context Window Length" setting, improving performance and reducing response time.
Operating System
Docker Image: docker.n8n.io/n8nio/n8n
n8n Version
1.76.1
Node.js Version
20.18.2
Database
PostgreSQL
Execution mode
main (default)
The text was updated successfully, but these errors were encountered:
Bug Description
I am encountering an issue with the Postgres Chat Memory node in n8n where the query to the PostgreSQL database does not respect the "Context Window Length" setting. Despite setting this value to a low number, the query retrieves the full table rather than limiting the amount of historical chat data being returned.
This issue significantly impacts performance when using persistent chat memory, as the full history is unnecessarily loaded.
To Reproduce
Expected behavior
The query should retrieve only the specified number of recent chat history entries based on the "Context Window Length" setting, improving performance and reducing response time.
Operating System
Docker Image: docker.n8n.io/n8nio/n8n
n8n Version
1.76.1
Node.js Version
20.18.2
Database
PostgreSQL
Execution mode
main (default)
The text was updated successfully, but these errors were encountered: