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

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.

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

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

[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'

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,

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

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

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

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

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

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

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

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

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.

Re: [GENERAL] Extension coverage

2017-08-28 Thread Michael Paquier
On Sat, Aug 26, 2017 at 6:28 PM, Gabriel Furstenheim Milerud wrote: > Not sure I follow. Do you have an example that I could check? > I have the impression that my problem is that no .gcda files are created. If > I just run the lcov part: > lcov -d . -c -o lcov.info > >

Re: [GENERAL] Retrieving query results

2017-08-28 Thread Michael Paquier
On Sun, Aug 27, 2017 at 12:12 AM, Tom Lane wrote: > Michael Paquier writes: >> On Fri, Aug 25, 2017 at 8:10 AM, Tom Lane wrote: >>> I think the real problem occurs where we realloc the array bigger. > >> Looking at the