You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/04/01 16:11:43 UTC

[GitHub] [shardingsphere] PengWangSan commented on issue #9893: sharding jdbc startup error when user has no permission of table t1 on postgresql DB.

PengWangSan commented on issue #9893:
URL: https://github.com/apache/shardingsphere/issues/9893#issuecomment-812013883


   HI @dongzl  ,I think it doesn't matter with the configuration.It is because, the user  don't have the  permission of some tables  on postgresq. My configuration is below. I will fix it .Is OK?
     <bean id="demo_ds" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
           <property name="driverClassName" value="org.postgresql.Driver"/>
           <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/demo_ds"/>
           <property name="username" value="test"/>
           <property name="password" value="test"/>
       </bean> 
       <bean id="preciseHashCodeShardingAlgorithm" class="org.apache.shardingsphere.example.algorithm.PreciseModuloShardingTableAlgorithm" />    
       
       <sharding:standard-strategy id="tableShardingStrategy" sharding-column="order_id" precise-algorithm-ref="preciseHashCodeShardingAlgorithm" />
       
       <sharding:data-source id="shardingDataSource">
           <sharding:sharding-rule data-source-names="demo_ds" default-data-source-name="demo_ds">
               <sharding:table-rules>
                   <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_ds.t_order_$->{0..1}" table-strategy-ref="tableShardingStrategy"/>
               </sharding:table-rules>
              
           </sharding:sharding-rule>
       </sharding:data-source>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org