Re: [GENERAL] pgpgout/s without swapping--what does it mean?

2014-03-17 Thread Jeff Janes
On Monday, March 17, 2014, Kevin Goess wrote: > We had a big increase in load, iowait, and disk i/o on a dedicated > database host the other night. > > Looking at the sar logs, the problem shows itself in a big increase in > pgpgout/s, which I believe is postgres paging out parts of itself to dis

Re: [GENERAL] Upgrade: 9.0.5->9.3.3

2014-03-17 Thread Rich Shepard
On Mon, 17 Mar 2014, Tom Lane wrote: I'm guessing from those path names that you are using self-compiled executables, not somebody's packaging? If the latter, whose? I'm confused as to how you got pg_upgrade installed without knowing where it came from. Tom, Both were buit with scripts fr

Re: [GENERAL] Upgrade: 9.0.5->9.3.3

2014-03-17 Thread Tom Lane
Rich Shepard writes: >Now, -9.0.5 is installed in /usr/local/pgsql/ and -9.3.3 is installed in > /opt/pgsql-9.3.3. I want to use pg_upgrade and have read the Web page with > the instructions. I'm guessing from those path names that you are using self-compiled executables, not somebody's packa

[GENERAL] Upgrade: 9.0.5->9.3.3

2014-03-17 Thread Rich Shepard
Now, -9.0.5 is installed in /usr/local/pgsql/ and -9.3.3 is installed in /opt/pgsql-9.3.3. I want to use pg_upgrade and have read the Web page with the instructions. Instruction #4 tells me to install pg_upgrade and pg_upgrade_support. I have the 9.0.5 version of pg_upgrade in /opt/postgresql

Re: [GENERAL] SQL advice needed

2014-03-17 Thread Torsten Förtsch
On 17/03/14 21:42, Merlin Moncure wrote: >> I can do it in plpgsql. But that would mean to accumulate the complete >> > result in memory first, right? I need to avoid that. > I would test that assumption. This is better handled in loop IMO. > > LOOP > RETURN QUERY SELECT * FROM xx(); > IF NO

Re: [GENERAL] SQL advice needed

2014-03-17 Thread Merlin Moncure
On Mon, Mar 17, 2014 at 4:20 PM, Torsten Förtsch wrote: > On 17/03/14 21:42, Merlin Moncure wrote: >>> I can do it in plpgsql. But that would mean to accumulate the complete >>> > result in memory first, right? I need to avoid that. >> I would test that assumption. This is better handled in loop

Re: [GENERAL] Dump Database

2014-03-17 Thread Dennis
What does the shell command: pwd show when run immediately after you issue a su postgres command? You may want to try su - postgres to ensure you are in the postgres users home directory. From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jos

Re: [GENERAL] SQL advice needed

2014-03-17 Thread David Johnston
Torsten Förtsch wrote > Hi, > > I have a volatile function that returns multiple rows. It may also > return nothing. Now, I want to write an SQL statement that calls this > function until it returns an empty result set and returns all the rows. > > What's the best (or at least a working) way to a

Re: [GENERAL] SQL advice needed

2014-03-17 Thread Merlin Moncure
On Mon, Mar 17, 2014 at 3:21 PM, Torsten Förtsch wrote: > Hi, > > I have a volatile function that returns multiple rows. It may also > return nothing. Now, I want to write an SQL statement that calls this > function until it returns an empty result set and returns all the rows. > > So, in principl

[GENERAL] A user's interpretation (and thoughts) of the WAL replay bug in 9.3

2014-03-17 Thread David Johnston
I'm trying to follow the discussion on -hackers and decided I'd try putting everything I'm reading into my own words. It is probable some or even all of the following is simply wrong so please do not go acting on it without other people providing supporting evidence or comments. I am a database u

[GENERAL] SQL advice needed

2014-03-17 Thread Torsten Förtsch
Hi, I have a volatile function that returns multiple rows. It may also return nothing. Now, I want to write an SQL statement that calls this function until it returns an empty result set and returns all the rows. So, in principle I want to: WITH RECURSIVE t AS ( SELECT * FROM xx() UNION ALL

Re: [GENERAL] pgpgout/s without swapping--what does it mean?

2014-03-17 Thread David Johnston
Kevin Goess wrote > Can anybody help me understand what these statistics are suggesting, > what's > actually going on on this box/in postgresql? What is it writing to disk, > and why? Is it just writing out new/changed rows, or what? Not a clue on the statistics but most likely you are seeing ch

[GENERAL] pgpgout/s without swapping--what does it mean?

2014-03-17 Thread Kevin Goess
We had a big increase in load, iowait, and disk i/o on a dedicated database host the other night. Looking at the sar logs, the problem shows itself in a big increase in pgpgout/s, which I believe is postgres paging out parts of itself to disk? 02:15:01 AM pgpgin/s pgpgout/s fault/s majflt/s

Re: [GENERAL] Linux OOM-Killer

2014-03-17 Thread Adrian Klaver
On 03/17/2014 04:21 AM, basti wrote: uname -a Linux h2085616 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux At any time there are not more than 20-30 Connections at once. Swap is disabled. free -m total used free sharedbuffers cached Mem

Re: [GENERAL] Dump Database

2014-03-17 Thread Martin French
pgsql-general-ow...@postgresql.org wrote on 17/03/2014 12:50:20: > From: José Pedro Santos > To: Postgres Ajuda , > Date: 17/03/2014 12:56 > Subject: [GENERAL] Dump Database > Sent by: pgsql-general-ow...@postgresql.org > > Dear all, > > I'm trying to dump my database using the following comm

[GENERAL] Dump Database

2014-03-17 Thread José Pedro Santos
Dear all, I'm trying to dump my database using the following command after I enter as su postgres: pg_dump - U postgres mydb -f mydb.sql ... but I'm always having the following message: pg_dump [archiver] Could not open output file "mydb.sql" : Permission denied I try to use the same state

Re: [GENERAL] Linux OOM-Killer

2014-03-17 Thread Albe Laurenz
basti wrote: >>> Since a few days we had problems with the Linux OOM-Killer. >>> Some simple query that normally take around 6-7 minutes now takes 5 hours. >>> We did not change any configuration values the last days. >>> >>> First of all I have set >>> >>> vm.overcommit_memory=2 >>> vm.overcommit_

Re: [GENERAL] Linux OOM-Killer

2014-03-17 Thread Karsten Hilbert
On Mon, Mar 17, 2014 at 12:21:30PM +0100, basti wrote: > uname -a > Linux h2085616 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 > GNU/Linux > > At any time there are not more than 20-30 Connections at once. > > Swap is disabled. > free -m > total used free

Re: [GENERAL] Linux OOM-Killer

2014-03-17 Thread basti
uname -a Linux h2085616 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux At any time there are not more than 20-30 Connections at once. Swap is disabled. free -m total used free sharedbuffers cached Mem: 32215 16163 16051

Re: [GENERAL] Linux OOM-Killer

2014-03-17 Thread Tomas Vondra
Hi, On 17 Březen 2014, 11:45, basti wrote: > Hello, > > we have a database master Version: > PostgreSQL 9.1.6 on x86_64-unknown-linux-gnu, compiled by gcc (Debian > 4.7.2-2) 4.7.2, 64-bit > and a WAL-Replication Slave with hot-standby version: > PostgreSQL 9.1.9 on x86_64-unknown-linux-gnu, compil

[GENERAL] Linux OOM-Killer

2014-03-17 Thread basti
Hello, we have a database master Version: PostgreSQL 9.1.6 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-2) 4.7.2, 64-bit and a WAL-Replication Slave with hot-standby version: PostgreSQL 9.1.9 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit. Since a few da