From: | Nicklas Avén <nicklas(dot)aven(at)jordogskog(dot)no> |
---|---|
To: | |
Cc: | Rashmi V Bharadwaj <rvbharad(at)in(dot)ibm(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: PostgreSQL on Amazon RDS |
Date: | 2019-05-07 07:49:11 |
Message-ID: | a2d4e0c2-5220-e4d3-0a16-b796226823a7@jordogskog.no |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 5/7/19 9:25 AM, Rashmi V Bharadwaj wrote:
> Hi,
>
> That query will only give the PostgreSQL database server's IP address
> right? That is true while we do a remote access to the non-cloud
> database from another machine also.
> I want to know if there is anything specific that can be used to
> determine a cloud environment.
>
> -Rashmi
>
> -----"Nicklas Avén" <nicklas(dot)aven(at)jordogskog(dot)no
> <mailto:nicklas(dot)aven(at)jordogskog(dot)no>> wrote: -----
> To: Rashmi V Bharadwaj <rvbharad(at)in(dot)ibm(dot)com <mailto:rvbharad(at)in(dot)ibm(dot)com>>
> From: "Nicklas Avén" <nicklas(dot)aven(at)jordogskog(dot)no
> <mailto:nicklas(dot)aven(at)jordogskog(dot)no>>
> Date: 07/05/2019 12:46PM
> Subject: Re: PostgreSQL on Amazon RDS
>
> Hi
>
>
> You can resolv the ip-address
>
>
> select inet_server_addr();
>
>
> /Nicklas
>
>
>
> On 5/7/19 8:27 AM, Rashmi V Bharadwaj wrote:
>> Hi,
>>
>> Is there a SQL query or a database parameter setting that I can use
>> from an external application to determine if the PostgreSQL database
>> is on cloud (like on Amazon RDS or IBM cloud) or on a non-cloud
>> on-prem environment?
>>
>> Thanks,
>> Rashmi
>>
>
Sorry I didn't reply to list last time, and I top posted. I will be
banned :-)
Well, that is true that you will get an ip-address in both cases, but in
one case the ip-address will point to a cloud server and in the other
case to some other server.
What you define as a cloud server is up to you.
I don't fully understand what you are want to get. I mean the postgresql
installation doesn't have any definition about what is a cloud server
and what is not.
Some vendors probably have some special settings that can be detected,
but you can install postresql on any server, hosted by you, a company, a
company named Amazon or whatever.
From the ip-address you might be able to find out if it seems to be an
rds server.
But I see that it seems to only give the private address in Amazon rds.
So then it might be difficult.
So, back to your original question.
I don't think there are anything specific for a cloud installation since
a cloud server is just a server like any other server.
If there is something special it is vendor specific.
/Nicklas
From | Date | Subject | |
---|---|---|---|
Next Message | Myles Miller | 2019-05-07 11:53:45 | random generated string matching index in inexplicable ways |
Previous Message | Rashmi V Bharadwaj | 2019-05-07 06:27:57 | PostgreSQL on Amazon RDS |