Skip to content
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

Truncate table - command is too large #19304

Closed
debraj-manna opened this issue Oct 17, 2017 · 6 comments
Closed

Truncate table - command is too large #19304

debraj-manna opened this issue Oct 17, 2017 · 6 comments
Assignees
Labels
C-question A question rather than an issue. No code/spec/doc change needed. O-community Originated from the community
Milestone

Comments

@debraj-manna
Copy link

debraj-manna commented Oct 17, 2017

As discussed in forum

I was trying to truncate a table TRUNCATE TABLE config_blob;

I got this message -

root@:26257/van> truncate table config_blob;
pq: command is too large: 143792138 bytes (max: 67108864)

The table has a structure like below:-

CREATE TABLE config_blob (
    cid integer NOT NULL,
    otype integer NOT NULL,
    oid bigint NOT NULL,
    pname text NOT NULL,
    timeinstant bigint NOT NULL,
    updatetimestamp timestamp with time zone DEFAULT now(),
    value text,
    PRIMARY KEY (cid, otype, oid, pname, timeinstant)
);

Sample Data:-

COPY config_blob (cid, otype, oid, pname, timeinstant, updatetimestamp, value) FROM stdin;
10000	28	1325506347	_runtime	1507942986529	2017-10-14 01:03:06.931555+00	{\n  "@class" : "com.van.model.core.L3NR",\n  "objectGuid" : "de-l3-i-dom",\n  "vendorId" : null,\n  "assetIdentifier" : null,\n  "name" : null,\n  "otherNames" : null,\n  "manager" : null,\n  "modelKey" : {\n    "key" : "10000:28:1325506347"\n  },\n  "groups" : [ "java.util.HashSet", [ ] ],\n  "subTypes" : [ "java.util.HashSet", [ ] ],\n  "description" : null,\n  "propertyBag" : {\n    "@class" : "com.van.model.core.PropertyBag",\n    "propertyValues" : [ "java.util.HashSet", [ ] ]\n  },\n  "associationEntities" : {\n    "@class" : "java.util.HashMap"\n  },\n  "graph" : {\n    "@class" : "com.van.model.graph.Graph",\n    "nodes" : [ "java.util.LinkedList", [ ] ],\n    "edges" : [ "java.util.ArrayList", [ ] ],\n    "propertyBag" : null,\n    "ids" : [ "java.util.ArrayList", [ ] ]\n  },\n  "basePayload" : ""\n}

Trucnate Output:-

root@:26257/> SELECT count(*) FROM van.config_blob;
+----------+
| count(*) |
+----------+
|  2000000 |
+----------+
(1 row)
root@:26257/> truncate table config_blob;
pq: no database specified: "config_blob"
root@:26257/> TRUNCATE TABLE van.config_blob;
pq: command is too large: 129091303 bytes (max: 67108864)
root@:26257/>  

Environment:-

  • Mac OS X - 10.12.6
  • Cockroach - 1.1
@jordanlewis
Copy link
Member

Possibly #19267?

@dianasaur323 dianasaur323 added this to the 1.2 milestone Oct 18, 2017
@vivekmenezes
Copy link
Contributor

@debraj-manna I'm unable to see how this can happen on the 1.1 release. Are you sure you tried this with the 1.1 release? Thanks

@debraj-manna
Copy link
Author

debraj-manna commented Oct 23, 2017 via email

@vivekmenezes
Copy link
Contributor

@debraj-manna sorry about that. Can you please share the program that is generating the data. I'm unable to reproduce this problem. Thanks!

@debraj-manna
Copy link
Author

debraj-manna commented Oct 23, 2017 via email

@debraj-manna
Copy link
Author

Sorry my mistake. I was checking the version 1.0.3/

@jordanlewis jordanlewis added C-question A question rather than an issue. No code/spec/doc change needed. O-community Originated from the community and removed O-deprecated-community-questions labels Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-question A question rather than an issue. No code/spec/doc change needed. O-community Originated from the community
Projects
None yet
Development

No branches or pull requests

4 participants