Re: Multiple postgresql clusters with same version and separate binaries

2019-01-04 Thread Shreeyansh Dba
Hi Erika,

You can create the different version services and use these services for
PostgreSQL start/stop.
ex.
service postgresql-10 start
service postgresql-9.6 start

Thanks & Regards,
*Shreeyansh DBA Team*
www.shreeyansh.com


On Fri, Jan 4, 2019 at 7:51 PM Erika Knihti-Van Driessche <
erika.kni...@gmail.com> wrote:

> Hi,
>
> I have 10+ postgresql clusters (v 9.6) running on one machine - each
> having their own data directory and port. They all share same binaries
> though, and this is now giving me some headache.. I cannot shutdown all
> clusters at the same time, so upgrading them is quite impossible.
>
> I know that running several versions of postgres is possible on one
> machine - I suppose this would also work out with same version running on
> different locations, like /db1/PostgreSQL/10, /db2/PostgreSQL/10.. etc..?
> Has anyone any experience with this kind of problem?
>
> All help and ideas appreciated! :-)
>
> Thanks,
> Erika
>


Re: Case Insensitive

2019-03-28 Thread Shreeyansh Dba
Hi Sridhar,

There are a few workarounds available, hope this will help you.

1) Use the citext extension
2) Use ILIKE instead of LIKE
3) Use Postgres lower() function
4) Add an index on lower(ename)

Thanks & Regards,
*Shreeyansh DBA Team*
www.shreeyansh.com


On Thu, Mar 28, 2019 at 1:50 PM Sridhar N Bamandlapally <
sridhar@gmail.com> wrote:

> Hi PG-General and Pgsql-Admin
>
> Can we achieve CASE INSENSITIVE in PostgreSQL?
>
> I mean, need below way
>
> postgres=# select * from emp;
>  eid | ename
> -+---
>1 | aaa
>2 | AAA
> (2 rows)
>
>
>
> *postgres=# select * from emp where ename='aaa';*
> * eid | ename*
> *-+---*
> *   1 | aaa*
> *   2 | AAA*
> *(2 rows)*
> *--above result is just an manual made example only*
>
>
> Thanks
> Sridhar
>
>


Re: PostgreSQL Active-Active

2018-02-06 Thread Shreeyansh Dba
You can achieve this HA with forward and backward reverse synchronous
streaming replication with 3 nodes automatic failover with pgpool in
PostgreSQL.

There is always downtime but it should not be more than a minute its
depends on your hardware and network bandwidth speed availability.

-- 
[image: http://www.shreeyansh.com] 


On Tue, Feb 6, 2018 at 4:31 PM, Dhandapani Shanmugam  wrote:

> Hi Gurus,
>
> Do we have active-active setup in postgreSQL, like we have in oracle RAC?.
> Sorry if this question has been addressed already. What will be best open
> source HA for postgresql with zero RTO and RPO.
>
> -D
>


​


Re: Fwd: postgres instalation

2018-02-06 Thread Shreeyansh Dba
While you installing PostgreSQL via Source then by default it will contain
only (Bin, lib, include, share) if you want to install the documentation
(HTML and man pages)
 use following command:-

make install-docs.



On Wed, Feb 7, 2018 at 9:11 AM, Adrian Klaver 
wrote:

> On 02/06/2018 07:32 PM, Azimuddin Mohammed wrote:
>
>> I built it from source code.
>> It says contib is installed too. But i dont see thrm under the prefix
>> directory.
>>
>
> When you did the original build did you do make world or just make?
>
> See also:
>
> https://www.postgresql.org/docs/10/static/install-procedure.html
> "
> Installing the Files
> Note
>
> If you are upgrading an existing system be sure to read Section 18.6 which
> has instructions about upgrading a cluster.
>
> To install PostgreSQL enter:
>
> make install
>
> This will install files into the directories that were specified in Step
> 1. Make sure that you have appropriate permissions to write into that area.
> Normally you need to do this step as root. Alternatively, you can create
> the target directories in advance and arrange for appropriate permissions
> to be granted.
>
> To install the documentation (HTML and man pages), enter:
>
> make install-docs
>
> If you built the world above, type instead:
>
> make install-world
>
> This also installs the documentation.
> "
>
>
>
>> On Feb 6, 2018 9:17 PM, "Adrian Klaver" > > wrote:
>>
>> On 02/06/2018 06:05 PM, Azimuddin Mohammed wrote:
>>
>>
>> Hello,
>> I have installed postgres I saw the message postgres
>> installation complete. But when I look in the install directory
>> I only see
>> bin
>> lib
>> include
>> share
>>
>> I do not see man and docs, may I know how I can install the man
>> and docs  and what is the use of it?
>>
>>
>> How did you install, from source or via packages?
>>
>> If from source:
>>
>> https://www.postgresql.org/docs/10/static/install-procedure.html
>> 
>>
>> "If you want to build everything that can be built, including the
>> documentation (HTML and man pages), and the additional modules
>> (contrib), type instead:
>>
>> make world
>>
>>
>>
>>
>> --
>> Regards,
>> Azim
>>
>>
>>
>>
>> --
>> Regards,
>> Azim
>>
>>
>> > =link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon
>> > =link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>>
>>  Virus-free. www.avast.com 
>> > =link&utm_campaign=sig-email&utm_content=webmail&utm_term=link
>> > =link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>>
>>
>>
>> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>>
>>
>> -- Adrian Klaver
>> adrian.kla...@aklaver.com 
>>
>>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>
>