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

Index creation issue on blocking parsing of some statefiles #37

Closed
mvisonneau opened this issue Sep 15, 2017 · 5 comments
Closed

Index creation issue on blocking parsing of some statefiles #37

mvisonneau opened this issue Sep 15, 2017 · 5 comments

Comments

@mvisonneau
Copy link
Contributor

On a specific statefile that my bucket contains, I can see the following errors being thrown by postgres:

STATEMENT:  INSERT INTO "attributes" ("resource_id","key","value") VALUES ($1,$2,$3) RETURNING "attributes"."id"
ERROR:  index row size 5048 exceeds maximum 2712 for index "idx_attributes_value"
HINT:  Values larger than 1/3 of a buffer page cannot be indexed.
	Consider a function index of an MD5 hash of the value, or use full text indexing.
STATEMENT:  INSERT INTO "attributes" ("resource_id","key","value") VALUES ($1,$2,$3) RETURNING "attributes"."id"
ERROR:  index row size 4984 exceeds maximum 2712 for index "idx_attributes_value"
HINT:  Values larger than 1/3 of a buffer page cannot be indexed.
	Consider a function index of an MD5 hash of the value, or use full text indexing.
STATEMENT:  INSERT INTO "attributes" ("resource_id","key","value") VALUES ($1,$2,$3) RETURNING "attributes"."id"
ERROR:  index row size 5048 exceeds maximum 2712 for index "idx_attributes_value"

Had a look into the config and the code but couldn't figure out a fix yet.

@mvisonneau
Copy link
Contributor Author

mvisonneau commented Sep 15, 2017

removing the index seems to solve the issue

terraboard=# DROP INDEX idx_attributes_value;
DROP INDEX

not sure if there is anything that can be configured around it's configuration :

Value string `gorm:"index" json:"value"`

@raphink
Copy link
Contributor

raphink commented Sep 15, 2017

Which version of postgresql is that?

@mvisonneau
Copy link
Contributor Author

9.6.5-alpine https://hub.docker.com/_/postgres/

@mvisonneau
Copy link
Contributor Author

mvisonneau commented Sep 15, 2017

mvisonneau@da3d8e1 fixes it but not quite an optimal solution

@raphink
Copy link
Contributor

raphink commented Sep 15, 2017

Yes indeed. Index was added here for search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants