Comments (7)
A customer indicated this would be good to have in a backport to 23.2.7 since they are testing read committed and this helps minimize transaction retry errors.
from cockroach.
The setting should be configured in one of two ways:
- use the cluster setting
sql.defaults.results_buffer.size
. - specify
results_buffer_size
in the connection string.
Changing the buffer size in a running session is not supported, and would be a somewhat high effort to implement, since it requires changing the size of the buffer while it's being used in different goroutines.
cockroach/pkg/sql/pgwire/conn.go
Lines 1259 to 1263 in bf28084
from cockroach.
Related issue: #124049
from cockroach.
Thanks! Someday we may wanna do it if restarting the session becomes unacceptable. But for now we should probably remove it from this doc page, I'll make a separate issue for that:
https://www.cockroachlabs.com/docs/v23.2/set-vars#supported-variables
from cockroach.
Specifying results_buffer_size
in the connection string does not seem to work:
~ % cockroach sql --insecure --url 'postgresql://root@localhost:26257/foo?options=-c%20results_buffer_size=4mib' ERROR: options: parameter "results_buffer_size" cannot be changed SQLSTATE: 55P02 Failed running "sql"
from cockroach.
Ah I think there's a bit of a rough edge. It doesn't work in the options
parameter, but it does work as a top-level query parameter.
❯ ./cockroach sql --insecure --url 'postgresql://root@localhost:26257/defaultdb?results_buffer_size=4mib'
#
# Welcome to the CockroachDB SQL shell.
# All statements must be terminated by a semicolon.
# To exit, type: \q.
#
# Server version: CockroachDB CCL v24.2.0-alpha.00000000-dev (darwin arm64, built , go1.22.3 X:nocoverageredesign) (same version as client)
# Cluster ID: 4f3c4c15-b9a5-4bb9-a744-b7c39228c19d
#
# Enter \? for a brief introduction.
#
root@localhost:26257/defaultdb> show results_buffer_size;
results_buffer_size
-----------------------
4194304
(1 row)
Let me try to get the bug with options
fixed; ideally that should work as well.
from cockroach.
Thanks. Some (maybe all?) JDBC libraries don't seem to honor results_buffer_size
as a top-level connection setting, so being able to set this as a session variable on connect with options
would be helpful.
from cockroach.
Related Issues (20)
- schemachanger: create index should fail storing column that is already in pk HOT 4
- schemachanger: create index should fail storing column that is virtual HOT 1
- Enforce strict syntax for replication zone configurations
- kvserver: admin scatter should retry processing on a descriptor change error
- pkg/workload/workloadsql/workloadsql_test_/workloadsql_test: pkg failed HOT 1
- opt: flake in new benchmark
- sql: cannot override built-in functions using search_path HOT 5
- sql/importer: TestImportComputed failed HOT 1
- sql/tests: TestRandomSyntaxSchemaChangeColumn failed [need to disallow subqueries when adding unique constraint] HOT 4
- roachtest: cdc/initial-scan-rolling-restart/shutdown-checkpoint failed HOT 2
- roachtest: sqlsmith/setup=rand-tables/setting=no-ddl failed HOT 1
- roachtest: sqlsmith/setup=rand-tables/setting=default failed HOT 1
- pkg/ccl/spanconfigccl/spanconfigreconcilerccl/spanconfigreconcilerccl_test: TestDataDriven failed HOT 3
- pkg/sql/logictest/tests/cockroach-go-testserver-23.1/cockroach-go-testserver-23_1_test: TestLogic_mixed_version_udf_mutations failed HOT 1
- ccl/streamingccl/streamingest: TestAlterTenantUpdateExistingCutoverTime failed HOT 3
- cli: TestTenantZip failed
- pkg/sql/logictest/tests/cockroach-go-testserver-23.2/cockroach-go-testserver-23_2_test: TestLogic_mixed_version_sequence_per_node_cache failed HOT 1
- ccl/backupccl: TestExportResponseDataSizeZeroCPUPagination failed HOT 3
- cli/debug: all values in system.job_info should be redacted when redaction is enabled HOT 1
- schemachanger: v23.1.12: error when building declarative schema change targets for DROP DATABASE HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cockroach.