Skip to content

The issue was NOT with the getSnapshotHistory function itself, but wi… #1916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
The issue was NOT with the getSnapshotHistory function itself, but wi…
…th PostgreSQL queries being executed somewhere in your application that were causing prepared statement parameter binding issues.
  • Loading branch information
thomas37-star committed Jul 28, 2025
commit 48d21d3982a8990363bc15bef1313178b83dce83
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,19 @@ protected void setUpConfigs(PostgresDatasourceConfig datasourceConfig, HikariCon
} else {
config.setReadOnly(false);
}

// Fix for PostgreSQL prepared statement parameter binding issues
// Disable prepared statement caching to prevent S_1, S_2, S_11 errors
config.addDataSourceProperty("preparedStatementCacheQueries", "0");
config.addDataSourceProperty("preparedStatementCacheSizeMiB", "0");

// Add connection validation to reset prepared statement state
config.addDataSourceProperty("testOnBorrow", "true");
config.addDataSourceProperty("validationQuery", "SELECT 1");

// Additional PostgreSQL-specific optimizations
config.addDataSourceProperty("reWriteBatchedInserts", "true");
config.addDataSourceProperty("cachePrepStmts", "false");
config.addDataSourceProperty("useServerPrepStmts", "false");
}
}
Loading