Postgres导入Google Cloud SQL由于缺少\ n而失败

发布于 2025-02-09 18:30:38 字数 777 浏览 0 评论 0原文

我正在尝试将Postgres数据库的转储从AWS RDS导入GCP SQL。

我遇到的重复错误似乎是从表行末尾丢失\ n时造成的。下面的示例:

2020-10-15 12:52:19 \N  f

如果我会像这样添加一个\ n:

2020-10-15 12:52:19 \N  f  \N

它将起作用并进步,直到下一个可能是500行向下的。问题是,我有几百万行。有没有办法导入而没有发生此错误或可以解决的修复程序?

找到替换是不起作用的,因为f之后没有空格,所以我无法搜索丢失的版本。同样,有太多数据发现使应用程序崩溃了一半的时间。我正在使用原子来查看该文件。

我还添加了我们用于导入文件以及仪表板中的日志错误的Google GUI的屏幕截图。

”在此处输入图像说明” 任何帮助将不胜感激。

杰拉德

I am trying to import a dump of my postgres database from AWS RDS into GCP SQL.

I am getting a repeating error that seems to be caused when there is a missing \N from the end of a table row. Example below:

2020-10-15 12:52:19 \N  f

If I add a \N to the end like so:

2020-10-15 12:52:19 \N  f  \N

it will work and progress until the next one which could be 500 rows down. The problem is, I have a few million rows. Is there a way I can import without this error occurring or a fix I can put in place?

A find a replace will not work as there is no whitespace after the f so I can't search for the missing version. Also because there is so much data a find crashes the application half the time I carry it out. I am using Atom for looking at the file.

I have also added a screenshot of the Google GUI we are using for importing the file as well as the log error from the dashboard.

enter image description here

enter image description here
Any help would be greatly appreciated.

Gerard

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文