postgresql-9.6 - 读取表时,出现错误:无法访问文件“$libdir/postgis-2.3”:没有这样的文件或目录
问题描述
我通过 GCP 在 Google CLoud SQL 中为我在 PC 和 App 中的应用程序创建了一个名为“datastore”的 PostgreSQL 数据库。云中 Postgre 服务器的版本是 9.6。我使用 Windows 的“psql”客户端和 Python Postgre 库“psycopg2”与该数据库通信以读取存储的表。我使用以下命令使用“psql”客户端进行通信:
PS D:\> psql -h <Db-IP-Address> -U postgres
其中“Db-IP-Address”是 GCP 分配给“datastore”的 IP 地址。以下是“数据存储区”中的一些表:
postgres=> \dt
List of relations
Schema | Name | Type | Owner
--------+----------------------------+-------+----------
public | company | table | postgres
public | django_admin_log | table | postgres
public | django_content_type | table | postgres
public | django_migrations | table | postgres
public | image_data | table | postgres
public | imagedata | table | postgres
public | maggi | table | postgres
public | storelocation2 | table | postgres
直到昨天,在读/写表格时一切正常。但是昨天突然尝试读取/编辑表'storelocation2'。它给出以下错误:
postgres=> \d storelocation2
ERROR: could not access file "$libdir/postgis-2.3": No such file or directory
postgres=>
在“选择”命令中也会发生同样的情况:
postgres=> SELECT * FROM storelocation2;
ERROR: could not access file "$libdir/postgis-2.3": No such file or directory
postgres=>
虽然读取任何其他表格时不会出现此类错误。该'storelocation2'
表包含存储详细信息的数据,例如名称、位置等,变量定义为'VARCHAR'
,一个“地理”点定义为'geography(POINT, 4326)'
。
请任何人都可以提出可能的原因和任何补救措施以使桌子恢复原状。因为它可能导致大量数据丢失!
解决方案
推荐阅读
- sql - 查找值是否在 SQL 中不存在
- nopcommerce-4.2 - “Nop Ajax filter Pro”的性能问题
- c++ - cmd.exe vs Powershell中C++程序的不同执行时间
- python - 我可以使用 kwargs 来传递这部分功能吗?
- azure - 使用 azure-python-sdk 拉取应用程序列表时出现“权限不足,无法完成操作”错误
- sql - 条件语句不能正常工作
- lua - 如何在 LUA 脚本中正确格式化日期 - 05292020
- ios - 嵌入式 UIcollectionView 在 UITableView Cell 内滚动
- regex - 如何使用正则表达式替换来包围匹配组中的每个字符
- c++ - 将数据存储在双向链表中