Re: [GENERAL] Out of memory/corrupted shared memory problem on server

2017-08-28 Thread Johann Spies
On 25 August 2017 at 13:48, Tom Lane wrote: > How complex is "complex"? I can think of two likely scenarios: > 1. You've stumbled across some kind of memory-leak bug in Postgres. > 2. The query's just using too much memory. In this connection, it's > not good that you've got >> work_mem = 2GB >

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-08-28 Thread David G. Johnston
On Mon, Aug 28, 2017 at 6:42 PM, Jerry Regan < jerry.re...@concertoglobalresources.com> wrote: > Let’s suppose for a moment that I piped the output of a psql instance to > awk or some similar program, configured to detect the NOTIFY. That program > would then spawn a process to actually perform th

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-08-28 Thread Tom Lane
"David G. Johnston" writes: > On Mon, Aug 28, 2017 at 1:28 PM, Jerry Regan < > jerry.re...@concertoglobalresources.com> wrote: >> My concern is how, after LISTENing in psql, I can tell it what to do when >> the NOTItFY is received. > ​As far as I am aware you cannot. Yes, and psql is not designe

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-08-28 Thread David G. Johnston
On Mon, Aug 28, 2017 at 1:28 PM, Jerry Regan < jerry.re...@concertoglobalresources.com> wrote: > My concern is how, after LISTENing in psql, I can tell it what to do when > the NOTItFY is received. > ​As far as I am aware you cannot. The docs for psql, and its feature set, with respect to LISTEN

Re: [GENERAL] Installing 9.5 doesn't create 'postgres' unix account on Cent OS 7

2017-08-28 Thread Devrim Gündüz
Hi, On Mon, 2017-08-28 at 05:13 +, John Lawlor wrote: > yum install postgresql95 postgresql95-server.x86_64 > > Then I try to switch to the 'postgres' user normally created by installing > postgres: > > su - postgres > su: user postgres does not exist Can you please paste the full output

[GENERAL] Create Action for psql when NOTIFY Recieved

2017-08-28 Thread Jerry Regan
I have a 9.4 database. I think I’ve read all the LISTEN and NOTIFY entries in PostgreSQL documentation. I’ve done internet searches, hopefully asking the correct question. But I’m stumped. I want psql to LISTEN for a NOTIFY that a trigger, yet to be defined, issues AFTER INSERT into the table.

[GENERAL] Installing 9.5 doesn't create 'postgres' unix account on Cent OS 7

2017-08-28 Thread John Lawlor
Hi, I am installing Postgres 9.5 on a Cent OS 7 server. I have done the following: yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-redhat95-9.5-2.noarch.rpm yum install postgresql95 postgresql95-server.x86_64 Then I try to switch to the 'postgres' user

Re: [GENERAL] Performance with high correlation in group by on PK

2017-08-28 Thread Jeff Janes
On Mon, Aug 28, 2017 at 5:22 AM, Alban Hertroys wrote: > Hi all, > > It's been a while since I actually got to use PG for anything serious, > but we're finally doing some experimentation @work now to see if it is > suitable for our datawarehouse. So far it's been doing well, but there > is a part

Re: [GENERAL] Logging the fact that a log was shipped

2017-08-28 Thread Stephen Frost
* Christoph Moench-Tegeder (c...@burggraben.net) wrote: > ## Stephen Frost (sfr...@snowman.net): > > > Worse, such scripts run the serious risk of losing WAL if a crash > > happens because nothing is ensuring that the WAL has been sync'd to disk > > before returning from the archive_command. > >

Re: [GENERAL] Logging the fact that a log was shipped

2017-08-28 Thread Christoph Moench-Tegeder
## Ron Johnson (ron.l.john...@cox.net): > > I'd put a wrapper around your rsync (a short shell script > > would be sufficient) in the lines of rsync ... && logger "done", > > that way you'd get the information via syslog. > > And if logging to stderr? In that case your original approach could ha

Re: [GENERAL] Logging the fact that a log was shipped

2017-08-28 Thread Christoph Moench-Tegeder
## Stephen Frost (sfr...@snowman.net): > Worse, such scripts run the serious risk of losing WAL if a crash > happens because nothing is ensuring that the WAL has been sync'd to disk > before returning from the archive_command. That risk already exists when using rsync/scp/scp/... and should be mi

Re: [GENERAL] Logging the fact that a log was shipped

2017-08-28 Thread Ron Johnson
On 08/28/2017 08:22 AM, Stephen Frost wrote: * Christoph Moench-Tegeder (c...@burggraben.net) wrote: ## Ron Johnson (ron.l.john...@cox.net): How is this done in v8.4? (I tried adding "date; rsync ..." but pg didn't like that *at all*.) There's a DEBUG1-level log message on successful archive

Re: [GENERAL] jdbc driver vis Release 10

2017-08-28 Thread Dave Cramer
Well we won't be fixing any bugs in anything but the latest version if that makes a difference to you. Dave Cramer da...@postgresintl.com www.postgresintl.com On 25 August 2017 at 21:34, Rob Sargent wrote: > > > On Aug 25, 2017, at 5:55 PM, Dave Cramer wrote: > > There are newer versions out

Re: [GENERAL] Logging the fact that a log was shipped

2017-08-28 Thread Stephen Frost
* Christoph Moench-Tegeder (c...@burggraben.net) wrote: > ## Ron Johnson (ron.l.john...@cox.net): > > > How is this done in v8.4? (I tried adding "date; rsync ..." but pg > > didn't like that *at all*.) > > There's a DEBUG1-level log message on successful archive_command > completion - that woul

Re: [GENERAL] Logging the fact that a log was shipped

2017-08-28 Thread Ron Johnson
On 08/28/2017 06:06 AM, Christoph Moench-Tegeder wrote: ## Ron Johnson (ron.l.john...@cox.net): How is this done in v8.4? (I tried adding "date; rsync ..." but pg didn't like that *at all*.) There's a DEBUG1-level log message on successful archive_command completion - that would give you a lo

Re: [GENERAL] Performance with high correlation in group by on PK

2017-08-28 Thread Alban Hertroys
On 28 August 2017 at 14:22, Alban Hertroys wrote: > This is on: Just noticed I forgot to paste this in: warehouse=# select version(); version --

[GENERAL] Performance with high correlation in group by on PK

2017-08-28 Thread Alban Hertroys
Hi all, It's been a while since I actually got to use PG for anything serious, but we're finally doing some experimentation @work now to see if it is suitable for our datawarehouse. So far it's been doing well, but there is a particular type of query I run into that I expect we will frequently use

Re: [GENERAL] Logging the fact that a log was shipped

2017-08-28 Thread Christoph Moench-Tegeder
## Ron Johnson (ron.l.john...@cox.net): > How is this done in v8.4? (I tried adding "date; rsync ..." but pg > didn't like that *at all*.) There's a DEBUG1-level log message on successful archive_command completion - that would give you a lot of other low-prio log messages wich you probably don'

Re: [SPAM] Re: [GENERAL] Invalid magic number 0000 in log file

2017-08-28 Thread Moreno Andreo
Il 25/08/2017 22:01, Peter Eisentraut ha scritto: On 8/25/17 14:24, Moreno Andreo wrote: I know that's related to XLOG files, but do not have idea on how to deal with it. I had a quick googling but found nothing but "your files are corrupted. You'd better initdb." That's pretty much it. Thanks