[英]Postgresql unique installation id
Where can I get Postgresql unique installation ID? 在哪里可以获得Postgresql唯一安装ID? like... 喜欢...
SELECT dbid from v$database;
(in oracle) (在oracle中)
I need it to identify my different database installation across different sites. 我需要它来标识我在不同站点之间的不同数据库安装。 Getting MAC id of server is a way but if there is a way to get it from postgresql it would be preferred. 获取服务器的MAC ID是一种方法,但是如果有一种方法可以从postgresql获取它,则将是首选方法。
if you have replication slot available, you can use IDENTIFY_SYSTEM
: 如果您有可用的复制插槽,则可以使用 IDENTIFY_SYSTEM
:
MacBook-Air:~ vao$ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
Timing is on.
Pager usage is off.
systemid | timeline | xlogpos | dbname
---------------------+----------+------------+----------
6401169876745218982 | 1 | 1/7A470D80 | postgres
(1 row)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.