Re: [GENERAL] Preventing psql from attempting to access ~/.pgpass file.

2017-10-17 Thread Murtuza Zabuawala
​It is not psql but libpq which uses ​.pgpass file, as per my knowledge
there is no way of preventing it unless you have your own customize version
of libpq which do not have such option in it. But there is a workaround to
prevent libpg from using default .pgpass file is to set 'PGPASSFILE'
environment variable to something like '/dev/null'.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Tue, Oct 17, 2017 at 11:36 AM, Allan Kamau <kamaual...@gmail.com> wrote:

> Hi,
>
> I am executing many "COPY" commands via psql serially from a bash script
> from a compute node that accesses a mounted home directory located on a
> remote server.
> After about a thousand or so executions of the "COPY" command I get the
> error "psql: could not get home directory to locate password file".
> for each subsequent attempt to connect to PostgreSQL using psql so as to
> issue the next "COPY" command.
>
> I have configured pg_hba.conf to trust connections coming from the
> specific network which contains both the PostgreSQL server and the node
> which I am executing the psql commands from.
>
> Is there a way to instruct psql not to try reading ~/.pgpass file?
>
> Both server and client (psql) are PostgreSQL 10.0 built from source, the
> OS environment is Linux Centos 7.3.1611 (Core).
>
>
> Allan.
>


[GENERAL] Postgres 9.6 Logical and Fisical replication

2017-09-19 Thread Murtuza Zabuawala
++ Forwarding query to appropriate mail group.


On Tue, Sep 19, 2017 at 3:00 AM, guedim  wrote:

> Hi guys
>
> I am working with Postgres9.6 with a Master/Slave cluster replication using
> Streaming replication.
> I would like to add a new Slave server database but this database with
> logical replication .
>
>
> I tried with some configurations but it was not possible  :(
>
> https://github.com/guedim/postgres-streaming-replication
>
>
> Here is the image of what is in my mind:
> 
>
> Thanks for any help!
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-pgadmin-hackers
> -f2155306.html
>
>


[GENERAL] Fwd: 2 process postgres -D for one instance

2017-08-11 Thread Murtuza Zabuawala
Forwarding to pgsql-general list.


-- Forwarded message --
From: francis cherat 
Date: Fri, Aug 11, 2017 at 7:36 PM
Subject: 2 process postgres -D for one instance
To: "pgadmin-supp...@lists.postgresql.org" <
pgadmin-supp...@lists.postgresql.org>


Hi,


some time whe have 2 process postgres for 1 instance like this


exppgs   17769 1  0 01:06 ?00:01:04 /usr/pgsql-9.3/bin/postgres
-D /bases/postgresql/scl/data -i -p 5450 -h bd-sillage.info.
exppgs   39922 17769  0 15:39 ?00:00:00 /usr/pgsql-9.3/bin/postgres
-D /bases/postgresql/scl/data -i -p 5450 -h bd-sillage.info.


is it  an expected behavior ?


Regards

Francis


[GENERAL] standby database crash

2017-08-03 Thread Murtuza Zabuawala
++ Forwarding to pgsql-general group.

-- Forwarded message --
From: Seong Son (US) 
Date: Thu, Aug 3, 2017 at 12:48 AM
Subject: standby database crash
To: "pgadmin-supp...@lists.postgresql.org" <
pgadmin-supp...@lists.postgresql.org>


Hello,



I’ve posted this to the legacy list but learned that there’s a new list so
here it is.



I have a client who has streaming replication setup with the primary in one
city and standby in another city both identical servers with Postgresql 9.6
on Windows Server 2012.



They have some network issues, which is causing the connection from the
primary to standby to drop sometimes.  And recently standby crashed with
the following log.  And it could not be restarted.



2017-07-18 09:21:13 UTC FATAL:  invalid memory alloc request size 4148830208

2017-07-18 09:21:14 UTC LOG:  startup process (PID 5608) exited with exit
code 1

2017-07-18 09:21:14 UTC LOG:  terminating any other active server processes

2017-07-18 09:21:14 UTC LOG:  database system is shut down



Last entry from the pg_xlogdump shows the following



pg_xlogdump: FATAL:  error in WAL record at D5/D1BD5FD0:
unexpected pageaddr D1/E7BD6000 in log segment 00D500D1,
offset 12410880



So my questions are, could an old WAL segment being resent through the
network cause crash like this?  Shouldn’t Postgresql be able to handle out
of order WAL segments instead of just crashing?



And what would be the best way to recover the standby server?  Resynching
the entire database seems to be too time consuming.



Thanks in advance for any info.



-Seong


Re: [HACKERS] [GENERAL] Not able to create collation on Windows

2017-08-01 Thread Murtuza Zabuawala
Hi Tom,

Yes, I was able to create collation using "C" instead of "POSIX" on windows,

CREATE COLLATION public.test from pg_catalog."C";

--
Regards,
Murtuza Zabuawala

On Tue, Aug 1, 2017 at 9:09 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:

> Peter Eisentraut <peter.eisentr...@2ndquadrant.com> writes:
> > On 8/1/17 10:53, Tom Lane wrote:
> >> I think this is actually a bug, because the collations code clearly
> >> means to allow clones of the C/POSIX locales --- see eg lc_collate_is_c,
>
> > You seem to say that we should support a "POSIX" locale even on systems
> > where the C library does not support that.  I'm not convinced about that.
>
> Uh, we already do.  Note all the regression tests that unconditionally
> assume that the POSIX collation works.  Also, I am confused by your
> apparent belief that there might somewhere be a version of libc that
> fails to provide C-locale-compliant behavior.  Surely nobody would
> tolerate a version of strcmp() that fails to act per C spec.
>
> regards, tom lane
>


Re: [GENERAL] Load multiple CSV file in Postgres using COPY

2017-02-17 Thread Murtuza Zabuawala
Thank you All for your suggestions, But I was looking for solution around
COPY command only.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Fri, Feb 17, 2017 at 3:06 PM, Alexander Shchapov <alexande...@gmail.com>
wrote:

> You might want to look into pgloader: http://pgloader.io/
>
> On Fri, Feb 17, 2017 at 7:26 AM, Murtuza Zabuawala
> <murtuza.zabuaw...@enterprisedb.com> wrote:
> > Hi,
> >
> > Is there any way to load multiple CSV files at once using single COPY
> > command?
> >
> > I have scenario where I have to load multiple files,
> >
> > COPY prdxgdat FROM 'Z:/data-2016-04-01.csv' WITH DELIMITER ',' CSV
> HEADER Y
> > COPY prdxgdat FROM 'Z:/data-2016-04-02.csv' WITH DELIMITER ',' CSV
> HEADER Y
> > COPY prdxgdat FROM 'Z:/data-2016-04-03.csv' WITH DELIMITER ',' CSV
> HEADER Y
> > COPY prdxgdat FROM 'Z:/data-2016-04-04.csv' WITH DELIMITER ',' CSV
> HEADER Y
> > COPY prdxgdat FROM 'Z:/data-2016-04-05.csv' WITH DELIMITER ',' CSV
> HEADER Y
> > COPY prdxgdat FROM 'Z:/data-2016-04-06.csv' WITH DELIMITER ',' CSV
> HEADER Y
> > ..
> > ..
> > ..
> > ..
> > COPY prdxgdat FROM 'Z:/data-2016-04-50.csv' WITH DELIMITER ',' CSV
> HEADER Y
> >
> > 50 files -> 50 COPY command, In my use case I think this is not a good
> way
> > to load data, Can you suggest any better way to do this?
> >
> > I can always write external script (eg: shell script) but is there any
> other
> > way to do this using single COPY command?
> >
> > --
> > Regards,
> > Murtuza Zabuawala
> > EnterpriseDB: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
>
>
>
> --
> Alexander Shchapov
>


[GENERAL] Load multiple CSV file in Postgres using COPY

2017-02-16 Thread Murtuza Zabuawala
Hi,

Is there any way to load multiple CSV files at once using single COPY
command?

I have scenario where I have to load multiple files,

COPY prdxgdat FROM 'Z:/data-2016-04-01.csv' WITH DELIMITER ',' CSV HEADER Y
COPY prdxgdat FROM 'Z:/data-2016-04-02.csv' WITH DELIMITER ',' CSV HEADER Y
COPY prdxgdat FROM 'Z:/data-2016-04-03.csv' WITH DELIMITER ',' CSV HEADER Y
COPY prdxgdat FROM 'Z:/data-2016-04-04.csv' WITH DELIMITER ',' CSV HEADER Y
COPY prdxgdat FROM 'Z:/data-2016-04-05.csv' WITH DELIMITER ',' CSV HEADER Y
COPY prdxgdat FROM 'Z:/data-2016-04-06.csv' WITH DELIMITER ',' CSV HEADER Y
..
..
..
..
COPY prdxgdat FROM 'Z:/data-2016-04-50.csv' WITH DELIMITER ',' CSV HEADER Y

50 files -> 50 COPY command, In my use case I think this is not a good way
to load data, Can you suggest any better way to do this?

I can always write external script (eg: shell script) but is there any
other way to do this using single COPY command?

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-15 Thread Murtuza Zabuawala
Also check Odoo (Python & PostgreSQL) & it has large community support.

https://github.com/odoo/odoo

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Fri, Dec 16, 2016 at 8:58 AM, John DeSoi <de...@pgedit.com> wrote:

>
> > On Dec 13, 2016, at 3:25 PM, Ivan Sergio Borgonovo <m...@webthatworks.it>
> wrote:
> >
> > I don't develop on Drupal anymore but up to at least D7 Postgresql was
> still not a first class citizen.
> >
> > I've heard DB abstraction layer in D8 is much better but I don't have
> anything critical on Drupal anymore and life is too short to fight to see
> your patches refused from upstream because "supporting postgres is holding
> us back".
> > Considering that most PHP web applications are not optimized for any DB
> and I wonder what features could a developer exploit to optimize for mysql,
> that's really a shame.
> >
> > I don't want to repeat the experience, especially on software I'm just
> going to use and not develop on.
> >
> > Forgive me for I have sinned: last Drupal I've installed was 7 and I
> picked up mysql and I still feel awkward when I've to deal with it.
>
>
> I have been using Drupal with Postgres since 2005. Yes, there are
> sometimes issues, but it is rarely a problem unless you expect every third
> party module to support Postgres. All of the core modules work well with
> Postgres. The database abstraction layer works for the most part. The main
> benefit of Drupal is to get a base website up and going quickly. You can
> then write your own custom (Postgres only) module to implement the non-core
> features you need.
>
> John DeSoi, Ph.D.
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>