F.M*_*.M. 3 postgresql postgrest
我在运行的 postgREST API 上遇到了无法放大字符串缓冲区消息。我猜想有些表太大而无法成功使用 API。
\n\n我正在使用来自https://hub.docker.com/r/postgrest/postgrest的 docker postgrest/postgrest 容器, 版本为 PostgREST 5.1.0。
\n\n一切都按预期工作,但如果表大小变得太大,我会收到以下错误消息。
\n\nhint null\ndetails "Cannot enlarge string buffer containing 1073741822 bytes by 1 more bytes."\ncode "54000"\nmessage "out of memory"\nRun Code Online (Sandbox Code Playgroud)\n\n我无法确定阈值何时工作或不工作。\n是否有可能扩大某些配置文件中的字符串缓冲区,或者这是硬编码的?
\n\n使用 API 的表大小是否有任何限制?到目前为止我无法\xe2\x80\x99在文档中找到任何信息。
\n\n===========更新
\n\npostgres 日志给了我以下 SQL 查询:
\n\nWITH pg_source AS (\n SELECT "public"."n_osm_bawue_line".* \n FROM "public"."n_osm_bawue_line"\n) \nSELECT null AS total_result_set, \n pg_catalog.count(_postgrest_t) AS page_total, \n array[]::text[] AS header, \n coalesce(json_agg(_postgrest_t), \'[]\')::character varying AS body \nFROM ( \n SELECT * \n FROM pg_source\n) _postgrest_t\nRun Code Online (Sandbox Code Playgroud)\n\n我使用以下 postgres 版本:
\n\n"PostgreSQL 11.1 (Debian 11.1-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit"\nRun Code Online (Sandbox Code Playgroud)\n