[GENERAL] How to implement the skip errors for copy from ?

2014-05-29 Thread xbzhang
I want to?implement the skip errors for copy from,lik as :create table A (c int primary key);copy A from stdin;112\. copy will failed:ERROR: duplicate key violates primary key constraint "CC_PKEY" CONTEXT: COPY CC, line 2: "1" I want skip the error, and continue to copy the reset of tuple

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-29 Thread Dmitry Samonenko
Guys, first of all: thank you for you help and cooperation. I have received several mails suggesting tweaks for tcp_keepalive and usage of postgresql server functions/features (cancel, statement timeout), but as I said - it won't help. I have reproduced the problem scenario. Logs are attached. I w

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-29 Thread Martijn van Oosterhout
On Thu, May 29, 2014 at 12:27:50PM +0400, Dmitry Samonenko wrote: > Guys, first of all: thank you for you help and cooperation. I have received > several mails suggesting tweaks for tcp_keepalive and usage of postgresql > server functions/features (cancel, statement timeout), but as I said - it > w

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-29 Thread Dmitry Samonenko
Please, look inside attached strace_export.txt. Second line. With regard, Dmitry Samonenko.

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-29 Thread Tom Lane
Martijn van Oosterhout writes: > Something very important to note: those settings do nothing unless the > SO_KEEPALIVE option is turned on for the socket. AFAICT libpq does not > enable this option, hence they (probably) have no effect. AFAICS, it does so by default since 9.0.

Re: [GENERAL] How to implement the skip errors for copy from ?

2014-05-29 Thread Vik Fearing
On 05/29/2014 09:25 AM, xbzhang wrote: > I want to implement the skip errors for copy from,lik as : > create table A (c int primary key); > copy A from stdin; > 1 > 1 > 2 > \. > > copy will failed: > ERROR: duplicate key violates primary key constraint "CC_PKEY" > CONTEXT: COPY CC, line 2: "1" > >

Re: [GENERAL] How to implement the skip errors for copy from ?

2014-05-29 Thread Adrian Klaver
On 05/29/2014 12:25 AM, xbzhang wrote: > I want to implement the skip errors for copy from,lik as : > create table A (c int primary key); > copy A from stdin; > 1 > 1 > 2 > \. > > copy will failed: > ERROR: duplicate key violates primary key constraint "CC_PKEY" > CONTEXT: COPY CC, line 2: "1" >

[GENERAL] relocation R_X86_64_32 against `.rodata' can not be used when making a shared object

2014-05-29 Thread Mimiko
Hello. I want to compile postgresql with this: ./configure --prefix=/opt/postgresql --enable-nls --disable-rpath --enable-profiling --enable-depend --with-tcl --with-segsize=4 --with-perl --with-python --with-gssapi --with-krb5 --with-pam --with-ldap --with-ossp-uuid --with-libxml --with-libx

Re: [GENERAL] relocation R_X86_64_32 against `.rodata' can not be used when making a shared object

2014-05-29 Thread Tom Lane
Mimiko writes: > But `make` fails with this error: > /usr/bin/ld: /opt/openssl/lib/libssl.a(t1_meth.o): relocation > R_X86_64_32 against `.rodata' can not be used when making a shared > object; recompile with -fPIC > Want to mention that openssl, zlib, libxml2, libxslt and xz are compiled > in

[GENERAL] Postgresql service stopped automatically after restart

2014-05-29 Thread Kalai R
Hello, I am developing application using postgresql 9.3 and VS2005 as FrontEnd. I am using silent installation method to install postgresql from .Net application. Postgresql installed and connected with application is fine *The problem is* , when we on the system after shut down, postgresql servi

Re: [GENERAL] Postgresql service stopped automatically after restart

2014-05-29 Thread Adrian Klaver
On 05/29/2014 07:34 AM, Kalai R wrote: Hello, I am developing application using postgresql 9.3 and VS2005 as FrontEnd. I am using silent installation method to install postgresql from .Net application. Postgresql installed and connected with application is fine *The problem is* , when we on the

[GENERAL] Postgresql 9.2.4 - timezone error

2014-05-29 Thread Bhushan Pathak
Hello, I have postgresql 9.2.4 running on a CentOS 5 server. A JBOSS AS instance also runs on the same server, which connects to postgresql server [using defined connection pools]. The issue I'm facing is that the JBOSS server is throwing out the error - org.postgresql.util.PSQLException: FATAL:

Re: [GENERAL] Postgresql service stopped automatically after restart

2014-05-29 Thread Kalai R
I have checked no problem in pg_hba.conf file. Also I have disabled AV software checks for the Postgres Directories. But Problem remains On Thu, May 29, 2014 at 8:15 PM, Adrian Klaver wrote: > On 05/29/2014 07:34 AM, Kalai R wrote: > >> Hello, >> >> I am developing application using postgresq

Re: [GENERAL] Code for user-defined type

2014-05-29 Thread Paul Jones
On Wed, May 28, 2014 at 10:51:43AM +0200, Pavel Stehule wrote: > > Hello > > > 2014-05-27 20:30 GMT+02:00 Paul Jones : > > > I have written a user-defined type that allows direct import and printing > > of > > DB2 timestamps.It does correctly import and export DB2 timestamps, > > butI'm wonderi

Re: [GENERAL] Code for user-defined type

2014-05-29 Thread Pavel Stehule
2014-05-29 18:04 GMT+02:00 Paul Jones : > On Wed, May 28, 2014 at 10:51:43AM +0200, Pavel Stehule wrote: > > > > Hello > > > > > > 2014-05-27 20:30 GMT+02:00 Paul Jones : > > > > > I have written a user-defined type that allows direct import and > printing > > > of > > > DB2 timestamps.It does cor

Re: [GENERAL] relocation R_X86_64_32 against `.rodata' can not be used when making a shared object

2014-05-29 Thread Mimiko
On 29.05.2014 17:10, Tom Lane wrote: As the message says, that means you need to have used -fPIC when building them (though -fpic might work as well depending on platform). Thank you for answering. Searching on net I couldn't understand what to compile with -fPIC. So those libraries must be co

Re: [GENERAL] Postgresql 9.2.4 - timezone error

2014-05-29 Thread Tom Lane
Bhushan Pathak writes: > myDB=# SELECT * FROM pg_timezone_names WHERE name = 'America/New_York'; > ERROR: could not stat "/usr/share/zoneinfo/America/New_York": Too many > levels of symbolic links Oh? There's something really broken about your tzdata installation, then. On any Red Hat-derived

Re: [GENERAL] Code for user-defined type

2014-05-29 Thread Tom Lane
Paul Jones writes: > I used the proper XGetDatum and DatumGetX and was able to get it to work > properly.  However, I since discovered that I probably should not use > "cstring_to_text" because of the palloc's it does.  The problem comes > when doing "\copy table from file".  After about 1000 rows

Re: [GENERAL] Postgresql 9.2.4 - timezone error

2014-05-29 Thread Jerry Sievers
Bhushan Pathak writes: > Hello, > > I have postgresql 9.2.4 running on a CentOS 5 server. A JBOSS AS instance > also runs on the same server, which connects to postgresql server [using > defined connection > pools]. > > The issue I'm facing is that the JBOSS server is throwing out the error - >

[GENERAL] Merge a sharded master into a single read-only slave

2014-05-29 Thread Sébastien Lorion
I have a master database sharded by user_id, with globally unique IDs for everything, except shared configuration data stored in global tables (resources strings, system parameters, etc). What would be the best (ie both fast and reliable, simple to maintain as a bonus) to merge all shards into a s

Re: [GENERAL] Backups over slave instead master?

2014-05-29 Thread Andres Freund
Hi, On 2014-05-16 12:49:25 +0530, chiru r wrote: > Yes, It is possible to execute backups on the slave server instead of > master. > > Below are the steps we run for one of our past customer every day to > refresh his Dev/test environments using slave backups. > > *On Slave:* > > 1. Pause the r

Re: [GENERAL] Code for user-defined type

2014-05-29 Thread Paul Jones
- Original Message - > From: Tom Lane > To: Paul Jones > Cc: "pavel.steh...@gmail.com" ; > "pgsql-general@postgresql.org" > Sent: Thursday, May 29, 2014 11:32 AM > Subject: Re: [GENERAL] Code for user-defined type > > Paul Jones writes: > >> I used the proper XGetDatum and Datum

Re: [GENERAL] Backups over slave instead master?

2014-05-29 Thread hubert depesz lubaczewski
OmniPITR (https://github.com/omniti-labs/omnipitr) has working backups off slave. Working as in - we were using in it production since 8.3 at least. depesz On Thu, May 29, 2014 at 8:02 PM, Andres Freund wrote: > Hi, > > On 2014-05-16 12:49:25 +0530, chiru r wrote: > > Yes, It is possible to ex

Re: [GENERAL] Is it typo in pg_stat_replication column name in PG 9.4 ?

2014-05-29 Thread Bruce Momjian
On Sun, May 18, 2014 at 02:10:53PM +0530, Raghavendra wrote: > Hi, > > PostgreSQL 9.4 document for pg_stat_replication view mentions column name as > "backend_xid", whereas when a view described it shows column name as > "backend_xmin". > http://www.postgresql.org/docs/devel/static/monitoring-stat

Re: [GENERAL] log_collector & sysout on windows

2014-05-29 Thread Marc Brazeau
I think I figured this out after some playing around. Looks like postgres only redirects stderr to its log files. Consistent with what documentation says, and my findings playing around. In my situation, I was looking for sysout of my python archiver to go to postgres log files. I added sys.std

Re: [GENERAL] Postgresql 9.2.4 - timezone error

2014-05-29 Thread rob stone
On Thu, 2014-05-29 at 20:22 +0530, Bhushan Pathak wrote: > Hello, > > > I have postgresql 9.2.4 running on a CentOS 5 server. A JBOSS AS > instance also runs on the same server, which connects to postgresql > server [using defined connection pools]. > > > The issue I'm facing is that the JBO

[GENERAL] Re: PostgreSQL 9.3 XML parser seems not to recognize the DOCTYPE element in XML files

2014-05-29 Thread Bob Moyers
I have this table: CREATE TABLE REPORT_STYLE ( REPORT_STYLE_NAME VARCHAR(75) NOT NULL, REPORT_STYLE_VERSION NUMERIC(8,0) NOT NULL, UPDATE_TS TIMESTAMP NOT NULL, UPDATE_USER_NAME VARCHAR(30) NOT NULL, STYLE_DESCR VARCHAR(200), JASPER_STYLE XML ); ALTER TABLE REPORT_STYLE ADD

Re: [GENERAL] Postgresql service stopped automatically after restart

2014-05-29 Thread Adrian Klaver
On 05/29/2014 08:01 AM, Kalai R wrote: I have checked no problem in pg_hba.conf file. Have you checked the Postgres or Windows system logs? Also I have disabled AV software checks for the Postgres Directories. But Problem remains There actually seem to be several problems across multiple

Re: [GENERAL] Postgresql service stopped automatically after restart

2014-05-29 Thread David G Johnston
Kalai R wrote > I have checked no problem in pg_hba.conf file. > > Also I have disabled AV software checks for the Postgres Directories. > > But Problem remains Disabling AV won't magically make the system start working if it's already broken. You disable it to avoid breaking the system in the

Re: [GENERAL] Postgresql 9.2.4 - timezone error

2014-05-29 Thread Bhushan Pathak
There was a redirect loop created somehow - [root ~]# ls -l /etc/localtime lrwxrwxrwx 1 root root 36 May 12 01:13 /etc/localtime -> /usr/share/zoneinfo/America/New_York [root ~]# ll /usr/share/zoneinfo/America/New_York lrwxrwxrwx 1 root root 14 Feb 21 00:08 /usr/share/zoneinfo/America/New_York -> /