代码之家  ›  专栏  ›  技术社区  ›  Maria roies

如何读取postgresql数据目录中的文件[重复]

  •  0
  • Maria roies  · 技术社区  · 8 年前

    如何在postgresql中读取pgsql/data/base/16384目录中的文件。 这些文件类似于二进制文件或dat文件。 我尝试使用pgAdmin将其导入到特定表中,但出现如下错误: see the below picture

    此外,我尝试使用tar文件恢复整个数据库,但在使用pgadmin恢复时,我得到了“没有toc.dat的头”。

    有没有办法在postgresql中读取data/base/16384中的文件?

    谢谢我所有的朋友。

    1 回复  |  直到 8 年前
        1
  •  1
  •   Vao Tsun    8 年前

    使用pgAdmin尝试以下操作:

    select datname from pg_database where oid = 16384;
    --connect to the database from return of above
    select relname from pg_class where relfilenode = 11779;
    --select * from <return of above>