Re: [HACKERS] New Event Trigger: table_rewrite

2014-11-15 Thread Michael Paquier
On Sun, Nov 16, 2014 at 8:57 AM, Simon Riggs wrote: > On 7 November 2014 12:35, Dimitri Fontaine wrote: >> Simon Riggs writes: >>> It would be more useful to work on the applications of this >>> >>> 1. INSERT into a table >>> * Action start time >>> * Schema >>> * Tablename >>> * Number of b

Re: [HACKERS] printing table in asciidoc with psql

2014-11-15 Thread Pavel Stehule
Hi I can fix reported bugs today or tomorrow Regards Pavel 2014-11-14 21:00 GMT+01:00 Szymon Guz : > > On 14 November 2014 20:57, Alvaro Herrera > wrote: > >> Is anyone going to submit a new version of this patch? >> >> >> > > Hi Alvaro, > due to family issues I will not be able to work on it

Re: [HACKERS] pg_basebackup vs. Windows and tablespaces

2014-11-15 Thread Amit Kapila
On Sun, Nov 16, 2014 at 6:15 AM, Alvaro Herrera wrote: > Amit Kapila wrote: > > On Sat, Nov 15, 2014 at 12:03 AM, Alvaro Herrera < alvhe...@2ndquadrant.com> > > wrote: > > > > > > Amit Kapila wrote: > > > > I think symlink_label isn't a very good name. This file is not a label > > > in the sense

Re: [HACKERS] pg_basebackup vs. Windows and tablespaces

2014-11-15 Thread Alvaro Herrera
Amit Kapila wrote: > On Sat, Nov 15, 2014 at 12:03 AM, Alvaro Herrera > wrote: > > > > Amit Kapila wrote: > > I think symlink_label isn't a very good name. This file is not a label > > in the sense that backup_label is; it seems more a "catalog" to me. And > > it's not, in essence, about symlin

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-11-15 Thread Peter Geoghegan
On Wed, Nov 12, 2014 at 12:59 PM, Robert Haas wrote: > On that topic, I think there's unanimous consensus against the design > where equally-distant matches are treated differently based on whether > they are in the same RTE or different RTEs. I think you need to > change that if you want to get

Re: [HACKERS] New Event Trigger: table_rewrite

2014-11-15 Thread Simon Riggs
On 7 November 2014 12:35, Dimitri Fontaine wrote: > Simon Riggs writes: >> It would be more useful to work on the applications of this >> >> 1. INSERT into a table >> * Action start time >> * Schema >> * Tablename >> * Number of blocks in table >> which would then allow you to do these things

Re: [HACKERS] Improve automatic analyze messages for inheritance trees

2014-11-15 Thread Simon Riggs
On 30 October 2014 03:30, Etsuro Fujita wrote: > (2014/10/17 18:35), Etsuro Fujita wrote: >> >> (2014/10/16 17:17), Simon Riggs wrote: >>> >>> Would it be useful to keep track of how many tables just got analyzed? >>> >>> i.e. analyze of foo (including N inheritance children) >> >> >> I think that

Re: [HACKERS] Patch to support SEMI and ANTI join removal

2014-11-15 Thread David Rowley
On Sun, Nov 16, 2014 at 10:09 AM, Simon Riggs wrote: > On 15 October 2014 11:03, David Rowley wrote: > > > The explain analyze from the above query looks like: > > test=# explain (analyze, costs off, timing off) select count(*) from t1 > > inner join t2 on t1.t2_id=t2.id; > >

Re: [HACKERS] controlling psql's use of the pager a bit more

2014-11-15 Thread Andrew Dunstan
On 11/13/2014 11:41 AM, Andrew Dunstan wrote: On 11/13/2014 11:09 AM, Tom Lane wrote: Andrew Dunstan writes: I often get annoyed because psql is a bit too aggressive when it decides whether to put output through the pager, and the only way to avoid this is to turn the pager off (in which ca

[HACKERS] PgBench's \setrandom could be better

2014-11-15 Thread David Rowley
Hi, I've just been looking into the TPC-H benchmark with intention to put together some scripts which can be run easily to output some run times for each of the 22 queries. I've not had a great deal of exposure to pgbench yet, but I had thought that it might be able to help me run these queries w

Re: [HACKERS] Log notice that checkpoint is to be written on shutdown

2014-11-15 Thread Simon Riggs
On 16 October 2014 20:31, Michael Banck wrote: > I'll attach it to the next commitfest and see whether anybody likes it. Not much... We may decide we wanted to always-log shutdown checkpoints. I'm neutral about that, but I can see the logic. But if we did, we would use exactly the same log mess

Re: [HACKERS] 9.5: Better memory accounting, towards memory-bounded HashAgg

2014-11-15 Thread Simon Riggs
On 16 October 2014 02:26, Jeff Davis wrote: > The inheritance is awkward anyway, though. If you create a tracked > context as a child of an already-tracked context, allocations in the > newer one won't count against the original. I don't see a way around > that without introducing even more perfo

Re: [HACKERS] Patch to support SEMI and ANTI join removal

2014-11-15 Thread Simon Riggs
On 15 October 2014 11:03, David Rowley wrote: > The explain analyze from the above query looks like: > test=# explain (analyze, costs off, timing off) select count(*) from t1 > inner join t2 on t1.t2_id=t2.id; > QUERY PLAN >

Re: [HACKERS] [GSoC2014] Patch ALTER TABLE ... SET LOGGED

2014-11-15 Thread Fabrízio de Royes Mello
On Sat, Nov 15, 2014 at 2:23 AM, Alvaro Herrera wrote: > > Michael Paquier wrote: > > > Btw, perhaps this diff should be pushed as a different patch as this is a > > rather different thing: > > - if (heapRelation->rd_rel->relpersistence == RELPERSISTENCE_UNLOGGED > > && > > + if (index

Re: [HACKERS] WIP: multivariate statistics / proof of concept

2014-11-15 Thread Tomas Vondra
On 15.11.2014 18:49, Kevin Grittner > If you eliminate the quals besides the zipcode column you get 61 > rows and it gets much stranger, with legal municipalities that are > completely surrounded by Madison that the postal service would > rather you didn't use in addressing your envelopes, but they

Re: [HACKERS] WIP: multivariate statistics / proof of concept

2014-11-15 Thread Kevin Grittner
Tomas Vondra wrote: > Dne 13 Listopad 2014, 16:51, Katharina Büchse napsal(a): >> On 13.11.2014 14:11, Tomas Vondra wrote: >> >>> The only place where I think this might work are the associative rules. >>> It's simple to specify rules like ("ZIP code" implies "city") and we could >>> even do some

Re: [HACKERS] Failback to old master

2014-11-15 Thread Maeldron T.
On 12/11/14 14:28, Ants Aasma wrote: On Tue, Nov 11, 2014 at 11:52 PM, Maeldron T. wrote: As far as I remember (I can’t test it right now but I am 99% sure) promoting the slave makes it impossible to connect the old master to the new one without making a base_backup. The reason is the timelin

Re: [HACKERS] Add CREATE support to event triggers

2014-11-15 Thread Robert Haas
On Fri, Nov 14, 2014 at 1:18 PM, Andres Freund wrote: > I think it's a good idea to structure independent features in a way that > other solutions can reuse them. But I sure as hell can't force them to > use it - especially as there's unfortunately not too much development > going on in the existi

Re: [HACKERS] tracking commit timestamps

2014-11-15 Thread Simon Riggs
On 15 November 2014 04:32, Steve Singer wrote: > The use cases I'm talking about aren't really replication related. Often I > have come across systems that want to do something such as 'select * from > orders where X > the_last_row_I_saw order by X' and then do further > processing on the order.

Re: [HACKERS] PostgreSQL doesn't stop propley when --slot option is specified with pg_receivexlog.

2014-11-15 Thread Michael Paquier
On Sat, Nov 15, 2014 at 3:42 AM, Andres Freund wrote: > On 2014-11-15 03:25:16 +0900, Fujii Masao wrote: >> On Fri, Nov 14, 2014 at 7:22 PM, wrote: >> > "pg_ctl stop" does't work propley, if --slot option is specified when WAL >> > is flushed only it has switched. >> > These processes still con