How to edit oid of database?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trieuvi
    New Member
    • Jul 2010
    • 1

    How to edit oid of database?

    I want to create 2 databases in 2 server and these have only one OID. Example:

    Server 1: database 'Test' with OID: 16384
    Server 2: database 'Test' with OID: 16353

    I want to edit OID of database Test on server 2 to 16384.
    How to do that?

    And how to create a database with fix OID??

    (I have a problem when using replication with pgpool II, pgadmin cannot connect to new database because they have 2 different oids from 2 servers, please help!)

    Thanks!
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    I don't think edit OID it is a good idea, it is not 'supported' by postgres.
    You probably can try to edit it ('postgres pg_catalog hacking' :)) but probably it may be not easy.
    Why don't you backup the first database and use it to create the second one. If both clusters should be the same you can also just copy cluster where the first database is installed to the second server.

    Comment

    Working...