REG:DR DRILL

2022-03-05 Thread obi reddy
Dear postgres team,

Please clarify my question

4 servers it's working cascade replication

Segment1 another location and ip staring with different compare segment 2
Under the segment one 1 ips are there in that one primary another one is
slave

Segment 2 another location and ip staring with different compare segment 1

Under the segment 2 2 servers are there two also slave

Recently I have completed the switch over one in segment one1,

Now again we are planning do the switch over to the segment 2 and with in
the 24 hours we have to do the switch back is it possible to do the manual
switch over and switch back ,or else possible or not
If incase possible method is good manual or repmgr,
If not what is the reason

Could you give update on the team.


Thanks &Regards
Obireddy.G


Re: Couldn't cast to record[]

2022-03-05 Thread Tom Lane
Suresh Kumar R  writes:
>I needed this because, I use postgres backend along with golang using
> pgx driver. When i query address i need to specify OID of
> address[](composite type). In my case i couldnt find the oid of that type
> since its dynamic.

The usual advice is to look it up on the fly.  As an example:

regression=# create type address as (f1 text, f2 text);
CREATE TYPE
regression=# select 'address[]'::regtype;
  regtype  
---
 address[]
(1 row)

regression=# select 'address[]'::regtype::oid;
  oid   

 127056
(1 row)

If the client-side stack wants a type OID for a result column,
it's unlikely to be satisfied with a pseudotype OID anyway.
That provides next-to-no useful information about how to
interpret values.  Are you sure you can't just leave the type
unspecified (e.g. zero) in whatever API is giving you trouble?

regards, tom lane