Re: [GENERAL] Importing binary data

2014-10-27 Thread Chris Ruprecht
Thanks guys. I know what I will spend the night, doing ;). > On Oct 27, 2014, at 16:33 , Tom Lane wrote: > > Chris Ruprecht writes: >> I can export the data out of that database into flat files just fine, but >> then I try to import the data to Postgres, I'm getting errors like this: > >> ER

Re: [GENERAL] Importing binary data

2014-10-27 Thread Tom Lane
Chris Ruprecht writes: > I can export the data out of that database into flat files just fine, but > then I try to import the data to Postgres, I'm getting errors like this: > ERROR: invalid byte sequence for encoding "SQL_ASCII": 0x00 > CONTEXT: COPY attachments, line 14: "58025 1 c

Re: [GENERAL] Importing binary data

2014-10-27 Thread Chris Ruprecht
I'm using psql mydb # copy attachments FROM '/opt/tmp/clientdata/sql-data-p/attachments.dat' with NULL as 'NULL'; to load the database back in. The psql command runs on the same box as the DB server. If I had my way, I'd store the binary somewhere and keep a reference to it in the database

Re: [GENERAL] pg killed by oom-killer, "invalid contrecord length 2190 at A6C/331AAA90" on slaves

2014-10-27 Thread Emanuel Calvo
El 25/10/14 a las 17:55, Joe Van Dyk escibió: > One of my postgres backends was killed by the oom-killer. Now, one of > my streaming replication slaves is reporting "invalid contrecord > length 2190 at A6C/331AAA90" in the logs and replication has paused. I > have other streaming replication slave

Re: [GENERAL] Importing binary data

2014-10-27 Thread David G Johnston
Chris Ruprecht-3 wrote > Hey guys, > > I was given a database back of a non-PostgreSQL database. That database > contains records where some binary file (looks like email attachments) was > imported into several chunks of X characters in length and then stored > into multiple records. A messy way

[GENERAL] Importing binary data

2014-10-27 Thread Chris Ruprecht
Hey guys, I was given a database back of a non-PostgreSQL database. That database contains records where some binary file (looks like email attachments) was imported into several chunks of X characters in length and then stored into multiple records. A messy way of storing BLOB data. The databa

Re: [GENERAL] pg killed by oom-killer, "invalid contrecord length 2190 at A6C/331AAA90" on slaves

2014-10-27 Thread basti
I'm no PG expert but it seem that your WAL record is corrupt just on this one slave. Perhaps you can check this with md5 or something. perhaps your master process die in this moment there the file was written? So the question is "How does PG sync WAL file between multiple slaves?" Async or Synchro

Re: [GENERAL] pg killed by oom-killer, "invalid contrecord length 2190 at A6C/331AAA90" on slaves

2014-10-27 Thread Joe Van Dyk
On Mon, Oct 27, 2014 at 8:16 AM, basti wrote: > Hello, > > months ago I have a similar problem with the OOM-Killer. > Have a look at > > http://www.credativ.co.uk/credativ-blog/2010/03/postgresql-and-linux-memory-management > > Thanks -- my question is not so much about the oom killer, but rather

Re: [GENERAL] pg killed by oom-killer, "invalid contrecord length 2190 at A6C/331AAA90" on slaves

2014-10-27 Thread basti
Hello, months ago I have a similar problem with the OOM-Killer. Have a look at http://www.credativ.co.uk/credativ-blog/2010/03/postgresql-and-linux-memory-management I hope that's helpful. Regards, basti On Sat 25.10.2014 22:55 +0200, Joe Van Dyk wrote: > One of my postgres backends was killed

Re: [GENERAL] some queries on standby preventing replication updates

2014-10-27 Thread Emanuel Calvo
El 23/10/14 a las 17:40, Joe Van Dyk escibió: > Hi, > > I have a master and a slave database. > > I've got hot_standby_feedback turned on, > max_standby_streaming_delay=-1. I've configured the master and slave > to keep a few days of WALs around. > > I've noticed that when some large queries are

Re: [GENERAL] Change recovery configuration without restarting standby_node.

2014-10-27 Thread Emanuel Calvo
El 27/10/14 a las 09:31, sudalai escibió: > > How to change the* recovery configuration *such as *master ip, > primary_conninfo* without restarting the standby node in postgresql. > You need to do a restart of the standby node: http://www.postgresql.org/docs/9.3/static/recovery-config.html "They

[GENERAL] Change recovery configuration without restarting standby_node.

2014-10-27 Thread sudalai
How to change the* recovery configuration *such as *master ip, primary_conninfo* without restarting the standby node in postgresql. - sudalai -- View this message in context: http://postgresql.1045698.n5.nabble.com/Change-recovery-configuration-without-restarting-standby-node-tp5824432.ht