geopython / pycsw

pycsw is an OGC CSW server implementation written in Python. pycsw fully implements the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web]. Initial development started in 2010 (more formally announced in 2011). The project is certified OGC Compliant, and is an OGC Reference Implementation. pycsw allows for the publishing and discovery of geospatial metadata via numerous APIs (CSW 2/CSW 3, OpenSearch, OAI-PMH, SRU). Existing repositories of geospatial metadata can also be exposed, providing a standards-based metadata and catalogue component of spatial data infrastructures. pycsw is Open Source, released under an MIT license, and runs on all major platforms (Windows, Linux, Mac OS X). Please read the docs at https://pycsw.org/docs for more information.
https://pycsw.org
MIT License
197 stars 153 forks source link

index ix_records_contacts limited? #942

Open pvgenuchten opened 5 months ago

pvgenuchten commented 5 months ago

Description

when inserting a record,i get this error:

ERROR: foo.xml not inserted: (psycopg2.errors.ProgramLimitExceeded) index row size 3896 exceeds btree version 4 maximum 2704 for index "ix_records_contacts"
DETAIL:  Index row references tuple (225,3) in relation "records".
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.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/base.py", line 1905, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.ProgramLimitExceeded: index row size 3896 exceeds btree version 4 maximum 2704 for index "ix_records_contacts"
DETAIL:  Index row references tuple (225,3) in relation "records".

the record has 60 contacts (mainly contributing authors)

Environment

pvgenuchten commented 3 months ago

Got similar on a long abstract today,

Stackoverflow suggested to define index as:

create index on the_table(left(the_column(1,100))

would that be a solution here?