使用postgres存储,配置项不能指定database,这样不好吧
Expected behavior 期望表现
{type something here...} @javeme jdbc.driver=org.postgresql.Driver jdbc.url=jdbc:postgresql://localhost:5432/database
Actual behavior 实际表现
{type something here...} jdbc.driver=org.postgresql.Driver jdbc.url=jdbc:postgresql://localhost:5432/ jdbc.username= jdbc.password= @Linary
Steps to reproduce the problem 复现步骤
- {step 1}
- {step 2}
- {step 3}
Status of loaded data 数据状态
Vertex/Edge summary 数据量
- loaded vertices amount: {like 10 million}
- loaded edges amount: {like 20 million}
- loaded time: {like 200s}
Vertex/Edge example 数据示例
{type something here...}
Schema(VertexLabel, EdgeLabel, IndexLabel) 元数据结构
{type something here...}
Specifications of environment 环境信息
- hugegraph version: {like v0.7.4}
- operating system: {like centos 7.4, 32 CPUs, 64G RAM}
- hugegraph backend: {like cassandra 3.10, cluster with 20 nodes, 3 x 1TB HDD disk each node}
为什么要自己指定database呢?默认就是连当前这个图对应的database啊。
@dyhyao6 目前的设计是每个图实例对应的会创建一个database,创建多个图就有多个pg的database。
为什么要自己指定database呢?默认就是连当前这个图对应的database啊。
抱歉,我表述有误。 问题是这样的: 我在pg里创建了huge用户,创建了名为hugegraph的database,配置用户名huge密码password。初始化时提示没有名为huge的database。于是我另外新建了名为huge的database,这是才初始化成功。我的问题就是,为啥需要创建和用户名一样的数据库。此问题没有截图,抱歉。 @ @javeme @Linary
你的配置文件hugegraph.properties中的store配置的值是什么?hugegraph执行init-store.sh时会在你的数据库中创建一个database,这个database的名字就是store的值,跟用户名没有关系的。
你的配置文件
hugegraph.properties中的store配置的值是什么?hugegraph执行init-store.sh时会在你的数据库中创建一个database,这个database的名字就是store的值,跟用户名没有关系的。
这是我的配置文件,值是hugegraeph。可是普通用户没有建库的权限呀。能按照我这样的配置初始化话吗?
@dyhyao6
指定database是通过store,而不是jdbc.url
PostgreSQL连接必须指定database,如果没有指定(我们代码里建库之前建立连接没有指定database),就会尝试连接跟user相同的database。这是出错的原因。
我在 #1293 中改进了下,只要指定的user具有createDB的权限,就可以init-store和start-hugegraph。
@dyhyao6 指定database是通过
store,而不是jdbc.url
PostgreSQL连接必须指定database,如果没有指定(我们代码里建库之前建立连接没有指定database),就会尝试连接跟user相同的database。这是出错的原因。我在 #1293 中改进了下,只要指定的
user具有createDB的权限,就可以init-store和start-hugegraph。
谢谢,这样讲我就明白了