postgresql - Sails.js 蓝图查询与排序引发错误,因为 PostgreSQL 的“无法创建临时目录”
问题描述
在尝试排序时遇到 Sails.js 蓝图上的查询/查找问题。
我们正在尝试将数据库从 DigitalOcean 迁移到 Azure,并且该问题仅发生在 Azure 端数据查询上。
应用了所需的 SQL 安装脚本,其中包含创建表、默认值、PK、FK、序列等。从 DigitalOcean 备份并在 Azure 上恢复完全没问题,没有错误。此外,尝试了Sails > config > model
'migrate
选项 from safe
to alter
ORdrop
让 ORM 创建所需的数据库模式,但错误仍然存在。
我检查了数据库安装脚本和 Sails 模型,以确保所有配置正确匹配,对于 NOT NULL 表示法等。还对不正确的数据应用了数据清理过程。
- 信息; 相同的错误仅发生在两个表/模型以及这两个表/模型的几乎所有列/属性中。其余的表没有相同的问题,排序工作正常。
样品请求;
Request: {{LOCAL}}/foo?skip=0&where={"some_id":"-1","createdAt":{"!=":null}}&limit=30&sort=createdAt DESC
错误是;
Response: AdapterError: Unexpected error from database adapter: cannot create temporary directory
"pg_tblspc/16386/PG_13_202007201/pgsql_tmp": No such file or directory
at Object.findRecords
at routeTargetFnWrapper
at Layer.handle [as handle_request]
at Route.dispatch
at Layer.handle [as handle_request]
at Function.process_params
at process._tickCallback (internal/process/next_tick.js:68:7)
技术栈:
- 节点:v10(最新版本继续问题)
- 数据库:PostgreSQL v13(数字海洋和 Azure)
- 帆:“^1.2.3”
- 适配器:sails-postgresql "^1.0.2"(最新版本继续问题)
解决方案
推荐阅读
- scala - 在 Scala 中使用带有类型参数化函数的 jmock
- javascript - 显示一个加载页面时的内容,刷新时出现
- sql-server - 使用多个/一个下拉列表中的值从数据库中检索数据
- javascript - 使用 IIS 服务器上的 ASP.NET 托管来自 SignalR Hub 的 403(禁止)响应
- dart - 如何在 Dart 中增加字体大小
- stylecop - 向 StyleCop 添加自定义命名规则
- python - 与 scipy integration.tplquad 不同的结果
- security - 基于路径的角色安全性
- c# - 如何在没有滚动的情况下在 xamarin 中呈现 x 项
- c++ - 常数值变化