Thread: Detemine name of replication schema

Detemine name of replication schema

From
"Melvin Davidson"
Date:
<p><font face="Arial">I tried searching the archive for a similar question, but found none.</font><p><font
face="Arial">Iam interested in knowing what query can be used to determine the name of the replication schema(s)
installed.</font><p><fontcolor="#000000" face="Arial">P</font><font face="Arial">gadmin is "aware" of the replication
schema(s),as the</font><font color="#0000FF" face="Arial">y</font><font face="Arial"> are listed for each
database</font><br/><font face="Arial">    eg:  <dbname></font><br /><font face="Arial">                     
Casts</font><br/><font face="Arial">                      Languages</font><br /><font
face="Arial">                     Schemas</font><br /><font face="Arial">                     
Replication</font><p><fontface="Arial"> </font><font color="#000000" face="Arial">S</font><font color="#0000FF"
face="Arial">o</font><font face="Arial">I am curious as to what function or sql query is used to obtain that
information?</font><p><fontface="Arial">IOW, I am looking for a generic way to get the names of all replication schemas
ina cluster.</font><p><font face="Arial">Thank you in advance,</font><p><font face="Arial">Melvin Davidson</font> 

Re: Detemine name of replication schema

From
"Dave Page"
Date:
 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Melvin Davidson
Sent: 07 July 2006 21:12
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Detemine name of replication schema

I tried searching the archive for a similar question, but found none.

I am interested in knowing what query can be used to determine the name of the replication schema(s) installed.

Pgadmin is "aware" of the replication schema(s), as they are listed for each database
    eg:  <dbname>
                      Casts
                      Languages
                      Schemas
                      Replication

 So I am curious as to what function or sql query is used to obtain that information?

IOW, I am looking for a generic way to get the names of all replication schemas in a cluster.

The easiest way is to turn on SQL query logging in pgAdmin or the server and see what ends up in the logfile. I suspect (but am too tired to check right now) that it looks for schemas who's name starts with _, and contains one of the slony tables.

Regards, Dave

 

 

Re: Detemine name of replication schema

From
"Melvin Davidson"
Date:
Dave,
 
Much obliged for the suggestion.
 
Here is the query to find all slony schemas.  Maybe this will be of help to others.
 

SELECT  nspname AS “Slony Schema”

  FROM pg_namespace nsp

  JOIN pg_proc pro ON pronamespace=nsp.oid AND proname = 'slonyversion'

 ORDER BY nspname;



From: Dave Page [mailto:dpage@vale-housing.co.uk]
Sent: Friday, July 07, 2006 10:14 PM
To: Melvin Davidson; pgadmin-support@postgresql.org
Subject: RE: [pgadmin-support] Detemine name of replication schema

 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Melvin Davidson
Sent: 07 July 2006 21:12
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Detemine name of replication schema

I tried searching the archive for a similar question, but found none.

I am interested in knowing what query can be used to determine the name of the replication schema(s) installed.

Pgadmin is "aware" of the replication schema(s), as they are listed for each database
    eg:  <dbname>
                      Casts
                      Languages
                      Schemas
                      Replication

 So I am curious as to what function or sql query is used to obtain that information?

IOW, I am looking for a generic way to get the names of all replication schemas in a cluster.

The easiest way is to turn on SQL query logging in pgAdmin or the server and see what ends up in the logfile. I suspect (but am too tired to check right now) that it looks for schemas who's name starts with _, and contains one of the slony tables.

Regards, Dave