Re: [HACKERS] Specifying the log file name of pgbench -l option

2016-11-01 Thread Beena Emerson
Hello, On Wed, Nov 2, 2016 at 4:16 AM, Fabien COELHO wrote: > > Hello Masahiko, > > So I would suggest to: >>> - fix the compilation issue >>> - leave -l/--log as it is, i.e. use "pgbench_log" as a prefix >>> - add --log-prefix=... (long option only) for changing this prefix >>> >> >> I agree

Re: [HACKERS] Using a latch between a background worker process and a thread

2016-11-01 Thread Craig Ringer
On 2 November 2016 at 02:10, Robert Haas wrote: > On Tue, Nov 1, 2016 at 12:35 PM, Abbas Butt > wrote: >> Hi, >> Consider this situation: >> 1. I have a background worker process. >> 2. The process creates a latch, initializes it using InitLatch & resets it. >> 3. It then creates a thread and pa

Re: [HACKERS] sequences and pg_upgrade

2016-11-01 Thread Michael Paquier
On Mon, Oct 31, 2016 at 9:53 PM, Peter Eisentraut wrote: > On 9/30/16 12:50 PM, Anastasia Lubennikova wrote: >> The patches are good, no complaints. >> But again, I have the same question. >> I was confused, why do we always dump sequence data, >> because I'd overlooked the --sequence-data key. I'

Re: [HACKERS] Microvacuum support for Hash Index

2016-11-01 Thread Ashutosh Sharma
Hi, > While replaying the delete/vacuum record on standby, it can conflict > with some already running queries. Basically the replay can remove > some row which can be visible on standby. You need to resolve > conflicts similar to what we do in btree delete records (refer > btree_xlog_delete).

Re: [HACKERS] WAL consistency check facility

2016-11-01 Thread Michael Paquier
On Tue, Nov 1, 2016 at 10:31 PM, Robert Haas wrote: > IMHO, your rewrite of this patch was a bit heavy-handed. OK... Sorry for that. > I haven't > scrutinized the code here so maybe it was a big improvement, and if so > fine, but if not it's better to collaborate with the author than to > take o

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-11-01 Thread Tomas Vondra
On 11/01/2016 08:13 PM, Robert Haas wrote: On Mon, Oct 31, 2016 at 5:48 PM, Tomas Vondra wrote: Honestly, I have no idea what to think about this ... I think a lot of the details here depend on OS scheduler behavior. For example, here's one of the first scalability graphs I ever did: http://

Re: [HACKERS] WAL consistency check facility

2016-11-01 Thread Peter Geoghegan
On Mon, Oct 31, 2016 at 5:31 AM, Robert Haas wrote: > On Fri, Oct 28, 2016 at 2:05 AM, Michael Paquier > wrote: >> And here we go. Here is a review as well as a large brush-up for this >> patch. A couple of things: >> - wal_consistency is using a list of RMGRs, at the cost of being >> PGC_POSTMAS

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Amit Langote
On 2016/11/02 2:53, Robert Haas wrote: > On Fri, Oct 28, 2016 at 3:53 AM, Amit Langote > wrote: >> [ new patches ] > > Reviewing 0005: > > Your proposed commit messages says this: > >> If relation is the target table (UPDATE and DELETE), flattening is >> done regardless (scared to modify inher

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-01 Thread Karl O. Pinc
On Mon, 31 Oct 2016 09:26:27 +0100 Gilles Darold wrote: > Le 30/10/2016 à 08:04, Karl O. Pinc a écrit : > Attached patch v11 include your patch. > > > > > I have some questions about logfile_writename(): > > > > Why does the logfile_open() call fail silently? > logfile_open() "fail silently"

Re: [HACKERS] Performance improvement for joins where outer side is unique

2016-11-01 Thread David Rowley
On 31 October 2016 at 18:37, David Rowley wrote: > I've rebased the changes I made to address this back in April to current > master. Please note that I went ahead and marked this as "Ready for committer". It was previously marked as such in a previous commitfest. The changes made since last ver

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-01 Thread Tom Lane
Vik Fearing writes: > I'm really late to this discussion, and I apologize for that; but I'm > wondering why we're doing all this through some random file on disk. Well, the log collector is intentionally not connected to very much. > Why not just use the stats collector and have everything we'd

Re: [HACKERS] Hash Indexes

2016-11-01 Thread Robert Haas
On Mon, Oct 24, 2016 at 10:30 AM, Amit Kapila wrote: > [ new patches ] I looked over parts of this today, mostly the hashinsert.c changes. +/* + * Copy bucket mapping info now; The comment in _hash_expandtable where + * we copy this information and calls _hash_splitbucket explains w

Re: [HACKERS] Proposal: scan key push down to heap [WIP]

2016-11-01 Thread Kouhei Kaigai
> -Original Message- > From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Dilip Kumar > Sent: Saturday, October 29, 2016 3:48 PM > To: Andres Freund > Cc: Tom Lane; Alvaro Herrera; pgsql-hackers > Subject: Re: [HACKERS] Proposal: scan key pus

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-01 Thread Vik Fearing
On 03/09/2016 07:32 PM, Gilles Darold wrote: > This patch implements the pg_current_logfile() function that can be > used as follow. The function returns NULL when logging_collector > is not active and outputs a warning. I'm really late to this discussion, and I apologize for that; but I'm wonderi

Re: [HACKERS] Specifying the log file name of pgbench -l option

2016-11-01 Thread Fabien COELHO
Hello Masahiko, So I would suggest to: - fix the compilation issue - leave -l/--log as it is, i.e. use "pgbench_log" as a prefix - add --log-prefix=... (long option only) for changing this prefix I agree. It's better to add the separated option to specify the prefix of log file instead of

Re: [HACKERS] pageinspect: Hash index support

2016-11-01 Thread Peter Eisentraut
On 10/3/16 8:52 AM, Jesper Pedersen wrote: > On 09/29/2016 04:02 PM, Peter Eisentraut wrote: >> On 9/29/16 4:00 PM, Peter Eisentraut wrote: >>> Since the commit fest is drawing to a close, I'll set this patch as >>> returned with feedback. >> >> Actually, the CF app informs me that moving to the ne

Re: [HACKERS] auto_explain vs. parallel query

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 10:58 AM, Tomas Vondra wrote: > Damn! You're right of course. Who'd guess I need more coffee this early? > > Attached is a fix replacing the flag with an array of flags, indexed by > ParallelMasterBackendId. Hopefully that makes it work with multiple > concurrent parallel qu

[HACKERS] commitfest 2016-11 status summary

2016-11-01 Thread Haribabu Kommi
Hi All, The 2016-11 commitfest is officially started. Please add any further development patches into 2017-01 commitfest. The current status summary is: Needs review: 98 Waiting on author: 9 Ready for Commiter: 18 Commited: 19 Moved to next CF: 0 Rejected: 0 Returned with feedback: 3 TOTAL: 147

Re: [HACKERS] commit fest manager for CF 2016-11?

2016-11-01 Thread Haribabu Kommi
On Tue, Nov 1, 2016 at 11:19 PM, Michael Paquier wrote: > On Tue, Nov 1, 2016 at 4:53 PM, Michael Paquier > wrote: > > On Tue, Nov 1, 2016 at 12:20 PM, Thomas Munro > > wrote: > >> On Tue, Nov 1, 2016 at 4:15 PM, Peter Eisentraut > >> wrote: > >>> On 10/31/16 9:39 PM, Michael Paquier wrote: >

Re: [HACKERS] Typo in comment in contrib/postgres_fdw/deparse.c

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 8:20 AM, Etsuro Fujita wrote: > I ran into a typo in a comment in contrib/postgres_fdw/deparse.c. Please > find attached a patch. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing lis

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-11-01 Thread Robert Haas
On Mon, Oct 31, 2016 at 5:48 PM, Tomas Vondra wrote: > Honestly, I have no idea what to think about this ... I think a lot of the details here depend on OS scheduler behavior. For example, here's one of the first scalability graphs I ever did: http://rhaas.blogspot.com/2011/09/scalability-in-gra

Re: [HACKERS] DROP FUNCTION of multiple functions

2016-11-01 Thread Fabrízio de Royes Mello
On Tue, Nov 1, 2016 at 2:55 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > > Here is a patch series that implements several changes in the internal > grammar and node representation of function signatures. They are not > necessarily meant to be applied separately, but they expla

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Corey Huinker
On Tue, Nov 1, 2016 at 2:24 PM, Robert Haas wrote: > Well, I'm not sure we've exactly reached consensus here, and you're > making me feel like I just kicked a puppy. > It was hyperbole. I hope you found it as funny to read as I did to write. This is a great feature and I'm not going to make "per

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 2:11 PM, Corey Huinker wrote: > On Tue, Nov 1, 2016 at 2:01 PM, Robert Haas wrote: >> Yeah. That syntax has some big advantages, though. If we define that >> partition as START ('2014-01-01') INCLUSIVE END ('2014-12-31') >> INCLUSIVE, there's no way for the system to tell

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Francisco Olarte
Robert: On Tue, Nov 1, 2016 at 7:09 PM, Robert Haas wrote: > In defense of Corey's position, that's not so easy. First, \0 doesn't > work; our strings can't include null bytes. Second, the minimum legal > character depends on the collation in use. It's not so easy to figure > out what the "nex

Re: [HACKERS] DROP FUNCTION of multiple functions

2016-11-01 Thread Alvaro Herrera
Peter Eisentraut wrote: > Here is a patch series that implements several changes in the internal > grammar and node representation of function signatures. They are not > necessarily meant to be applied separately, but they explain the > progression of the changes nicely, so I left them like that f

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Corey Huinker
> > OTOH I've seen a lot of people bitten by [2014-01-01,2014-12-31] on > TIMESTAMP intervals. > No argument there. > Everybody remembers december has 31 days, but when we have to do > MONTHLY partitions if you use closed intervals someone always miskeys > the number of days, or forgets wheter a

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Francisco Olarte
On Tue, Nov 1, 2016 at 7:01 PM, Robert Haas wrote: > In the end, keywords are not the defining issue here; the issue is > whether all of this complexity around inclusive and exclusive bounds > carries its weight, and whether we want to be committed to that. > > Any other opinions out there? If it

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Corey Huinker
On Tue, Nov 1, 2016 at 2:01 PM, Robert Haas wrote: > Yeah. That syntax has some big advantages, though. If we define that > partition as START ('2014-01-01') INCLUSIVE END ('2014-12-31') > INCLUSIVE, there's no way for the system to tell that the there's no > gap between the that ending bound a

Re: [HACKERS] Using a latch between a background worker process and a thread

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 12:35 PM, Abbas Butt wrote: > Hi, > Consider this situation: > 1. I have a background worker process. > 2. The process creates a latch, initializes it using InitLatch & resets it. > 3. It then creates a thread and passes the latch created in step 2 to it. > To pass it, t

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 2:05 PM, Francisco Olarte wrote: >> /me raises hand. We have tables with a taxonomy in them where the even data >> splits don't fall on single letter boundaries, and often the single string >> values have more rows than entire letters. In those situations, being able >> to

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Francisco Olarte
On Tue, Nov 1, 2016 at 6:49 PM, Corey Huinker wrote: > > On Tue, Nov 1, 2016 at 12:57 PM, Robert Haas wrote: >> For strings and numeric types that are not integers, there is in >> theory a loss of power. If you want a partition that allows very >> value starting with 'a' plus the string 'b' but

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 1:49 PM, Corey Huinker wrote: > Exactly. This is especially true for date ranges. There's a lot of cognitive > dissonance in defining the "2014" partition as < '2015-01-01', as was the > case in Oracle waterfall-style partitioning. That was my reasoning for > pushing for ran

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Robert Haas
On Fri, Oct 28, 2016 at 3:53 AM, Amit Langote wrote: > [ new patches ] Reviewing 0005: Your proposed commit messages says this: > If relation is the target table (UPDATE and DELETE), flattening is > done regardless (scared to modify inheritance_planner() yet). In the immortal words of Frank H

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Corey Huinker
On Tue, Nov 1, 2016 at 12:57 PM, Robert Haas wrote: > For strings and numeric types that are not integers, there is in > theory a loss of power. If you want a partition that allows very > value starting with 'a' plus the string 'b' but not anything after > that, you are out of luck. START ('a')

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Robert Haas
On Fri, Oct 28, 2016 at 3:53 AM, Amit Langote wrote: >> Insisting that you can't drop a child without detaching it first seems >> wrong to me. If I already made this comment and you responded to it, >> please point me back to whatever you said. However, my feeling is >> this is flat wrong and ab

Re: [HACKERS] Specifying the log file name of pgbench -l option

2016-11-01 Thread Masahiko Sawada
On Wed, Nov 2, 2016 at 1:41 AM, Fabien COELHO wrote: > >> The log file generated by pgbench -l option is fixed file name >> 'pgbench_log..'. And it's a little complicated for the >> script that runs pgbench repeatedly to identify the log file name. >> Attached patch make it possible to specify the

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Robert Haas
On Fri, Oct 28, 2016 at 3:53 AM, Amit Langote wrote: > [ new patches ] Reviewing 0006: This patch seems scary. I sort of assumed from the title -- "Teach a few places to use partition check quals." -- that this was an optional thing, some kind of optimization from which we could reap further ad

Re: [HACKERS] Declarative partitioning - another take

2016-11-01 Thread Robert Haas
On Fri, Oct 28, 2016 at 3:53 AM, Amit Langote wrote: >> 4. I'm somewhat wondering if we ought to just legislate that the lower >> bound is always inclusive and the upper bound is always exclusive. >> The decision to support both inclusive and exclusive partition bounds >> is responsible for an eno

Re: [HACKERS] GiST support for UUIDs

2016-11-01 Thread Adam Brusselback
So I apologize in advance if I didn't follow the processes exactly, I was going to attempt to review this to move it along, but ran into issues applying the patch cleanly to master. I fixed the issues I was having applying it, and created a new patch (attached). Managed to test it out after I got

Re: [HACKERS] Specifying the log file name of pgbench -l option

2016-11-01 Thread Fabien COELHO
The log file generated by pgbench -l option is fixed file name 'pgbench_log..'. And it's a little complicated for the script that runs pgbench repeatedly to identify the log file name. Attached patch make it possible to specify the log file name. I think it's useful for the use who want to run p

[HACKERS] Using a latch between a background worker process and a thread

2016-11-01 Thread Abbas Butt
Hi, Consider this situation: 1. I have a background worker process. 2. The process creates a latch, initializes it using InitLatch & resets it. 3. It then creates a thread and passes the latch created in step 2 to it. To pass it, the process uses the last argument of pthread_create. 4. The thre

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 11:21 AM, Mithun Cy wrote: > On Tue, Nov 1, 2016 at 7:44 PM, Robert Haas wrote: >>> Starting program: /home/mithun/libpqbin/bin/./psql >>> postgres://%2home%2mithun:/postgres -U mithun1 >>Can you provide a concrete test scenario or some test code that fails? >>connhost

Re: [HACKERS] save redundant code for pseudotype I/O functions

2016-11-01 Thread Peter Eisentraut
On 10/28/16 9:25 AM, Tom Lane wrote: > Would it be better to use CppAsString and CppConcat instead of directly > using # and ##, for consistency with what we do elsewhere? I modeled this after several similar places in gin and tsearch code, which use ##: contrib/btree_gin/btree_gin.c src/backend/

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-11-01 Thread Mithun Cy
On Tue, Nov 1, 2016 at 7:44 PM, Robert Haas wrote: >> Starting program: /home/mithun/libpqbin/bin/./psql >> postgres://%2home%2mithun:/postgres -U mithun1 >Can you provide a concrete test scenario or some test code that fails? >connhost is supposed to be getting set in connectOptions2(), which

Re: [HACKERS] emergency outage requiring database restart

2016-11-01 Thread Merlin Moncure
On Tue, Nov 1, 2016 at 8:56 AM, Tom Lane wrote: > Merlin Moncure writes: >> On Mon, Oct 31, 2016 at 10:32 AM, Oskari Saarenmaa wrote: >>> Your production system's postgres backends probably have a lot more open >>> files associated with them than the simple test case does. Since Postgres >>> li

Re: [HACKERS] auto_explain vs. parallel query

2016-11-01 Thread Tomas Vondra
On 11/01/2016 03:29 PM, Robert Haas wrote: On Tue, Nov 1, 2016 at 10:21 AM, Tomas Vondra wrote: Clearly we need to pass some information to the worker processes, so that they know whether to instrument the query or not. I don't know if there's a good non-invasive way to do that from an extensio

Re: [HACKERS] [PATCH] pgpassfile connection option

2016-11-01 Thread Julian Markwort
Am 01.11.2016 um 15:14 schrieb Fabien COELHO: Thus, when returning with an error, if conn->pgpassfile was set and a password was necessary, we must have tried that pgpassfile, so i got rid of the field "dot_pgpass_used" No, you should not have done that, because it changes a feature which w

Re: [HACKERS] Proposal for changes to recovery.conf API

2016-11-01 Thread Robert Haas
On Mon, Oct 31, 2016 at 7:44 PM, Abhijit Menon-Sen wrote: > At 2016-09-28 13:13:56 -0400, robertmh...@gmail.com wrote: I hope that the fact that there's been no discussion for the last >> three weeks doesn't mean this effort is dead; I would like very >> much to see it move forward. > > Here'

Re: [HACKERS] auto_explain vs. parallel query

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 10:21 AM, Tomas Vondra wrote: > Clearly we need to pass some information to the worker processes, so that > they know whether to instrument the query or not. I don't know if there's a > good non-invasive way to do that from an extension - the easiest way I can > think of is

Re: [HACKERS] auto_explain vs. parallel query

2016-11-01 Thread Tomas Vondra
On 11/01/2016 02:15 PM, Robert Haas wrote: On Mon, Oct 31, 2016 at 6:35 PM, Tomas Vondra wrote: While debugging something on 9.6, I've noticed that auto_explain handles parallel queries in a slightly strange way - both the leader and all the workers log their chunk of the query (i.e. the leader

Re: [HACKERS] [PATCH] pgpassfile connection option

2016-11-01 Thread Fabien COELHO
Hello Julian, Alright, here goes another one: Patch v3 applies, make check ok, feature tested on Linux, one small issue found, see below. 1. Cleaned up the clutter with getPgPassFilename - the function is now named fillDefaultPGPassFile() and only does exactly that. Ok. 2. Since a conn

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 9:43 AM, Mithun Cy wrote: >> Starting program: /home/mithun/libpqbin/bin/./psql >> postgres://%2fhome%2fmithun:/postgres -U mithun1 >> [Thread debugging using libthread_db enabled] >> Using host libthread_db library "/lib64/libthread_db.so.1". >> psql: could not connect

Re: [HACKERS] Improve output of BitmapAnd EXPLAIN ANALYZE

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 9:46 AM, Tom Lane wrote: > Robert Haas writes: >> I don't like Tom's proposal of trying to fake up a value here when >> EXPLAIN ANALYZE is in use. Reporting "exact" and "lossy" values for >> BitmapAnd would be a fine enhancement, but artificially trying to >> flatten that

Re: [HACKERS] emergency outage requiring database restart

2016-11-01 Thread Andres Freund
On 2016-11-01 09:56:45 -0400, Tom Lane wrote: > The real problem with Oskari's theory is that it requires not merely > busted, but positively brain-dead error handling in the shell and/or > sqsh, ie ignoring open() failures altogether. That seems kind of > unlikely. Still, I suspect he might be o

Re: [HACKERS] emergency outage requiring database restart

2016-11-01 Thread Tom Lane
Merlin Moncure writes: > On Mon, Oct 31, 2016 at 10:32 AM, Oskari Saarenmaa wrote: >> Your production system's postgres backends probably have a lot more open >> files associated with them than the simple test case does. Since Postgres >> likes to keep files open as long as possible and only clo

Re: [HACKERS] Improve output of BitmapAnd EXPLAIN ANALYZE

2016-11-01 Thread Tom Lane
Robert Haas writes: > I don't like Tom's proposal of trying to fake up a value here when > EXPLAIN ANALYZE is in use. Reporting "exact" and "lossy" values for > BitmapAnd would be a fine enhancement, but artificially trying to > flatten that back into a row count is going to be confusing, not > h

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-11-01 Thread Mithun Cy
On Tue, Nov 1, 2016 at 6:54 PM, Robert Haas wrote: >That's the wrong syntax. If you look in > https://www.postgresql.org/docs/devel/static/libpq-connect.html under > "32.1.1.2. Connection URIs", it gives an example of how to include a > slash in a pathname. You have to use %2F, or else the URL p

Re: [HACKERS] emergency outage requiring database restart

2016-11-01 Thread Merlin Moncure
On Mon, Oct 31, 2016 at 10:32 AM, Oskari Saarenmaa wrote: > 27.10.2016, 21:53, Merlin Moncure kirjoitti: >> >> As noted earlier, I was not able to reproduce the issue with >> crashme.sh, which was: >> >> NUM_FORKS=16 >> do_parallel psql -p 5432 -c"select PushMarketSample('1740')" >> castaging_tes

Re: [HACKERS] WAL consistency check facility

2016-11-01 Thread Robert Haas
On Mon, Oct 31, 2016 at 5:51 PM, Michael Paquier wrote: > Hehe, I was expecting you to jump on those lines. While looking at the > patch I have simplified it first to focus on the core engine of the > thing. Adding back this code sounds fine to me as there is a wall of > contestation. I offer to d

Re: [HACKERS] Fix bug in handling of dropped columns in pltcl triggers

2016-11-01 Thread Michael Paquier
On Tue, Nov 1, 2016 at 4:17 AM, Jim Nasby wrote: > While reviewing code coverage in pltcl, I uncovered a bug in trigger > function return handling. If you returned the munged name of a dropped > column, that would silently be ignored. It would be unusual to hit this, > since dropped columns end up

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 2:03 AM, Mithun Cy wrote: > On Thu, Oct 27, 2016 at 11:15 PM, Robert Haas wrote: >> Thanks. Here's a new version with a fix for that issue and also a fix >> for PQconnectionNeedsPassword(), which was busted in v1. > I did some more testing of the patch for both URI and (ho

Re: [HACKERS] Improve output of BitmapAnd EXPLAIN ANALYZE

2016-11-01 Thread Robert Haas
On Mon, Oct 31, 2016 at 6:56 AM, Emre Hasegeli wrote: > The BRIN Bitmap Index Scan has the same problem. I have seen people > confused by this. I think N/A would clearly improve the situation. I agree. Or perhaps better still, leave rows=%.0f out altogether when we don't have a meaningful valu

Re: [HACKERS] [PATCH] pgpassfile connection option

2016-11-01 Thread Julian Markwort
Welp, I was in head over heels, sorry for my messy email... *2. No more "dot_pgpass_used" - we fill the conn->pgpassfile field with any options that have been provided (connection parameter, environment variable, "default" ~/.pgpass) and in case there has been an error with the authentificatio

Re: [HACKERS] auto_explain vs. parallel query

2016-11-01 Thread Robert Haas
On Mon, Oct 31, 2016 at 6:35 PM, Tomas Vondra wrote: > While debugging something on 9.6, I've noticed that auto_explain handles > parallel queries in a slightly strange way - both the leader and all the > workers log their chunk of the query (i.e. the leader logs explain for the > whole query, whi

Re: [HACKERS] [PATCH] pgpassfile connection option

2016-11-01 Thread Julian Markwort
Alright, here goes another one: 1. Cleaned up the clutter with getPgPassFilename - the function is now named fillDefaultPGPassFile() and only does exactly that. 2. Since a connection option "pgpassfile" or environment variable "PGPASSFILE" are picked up in conninfo_add_defaults() or in case a p

Re: [HACKERS] pgbench - allow backslash continuations in \set expressions

2016-11-01 Thread Fabien COELHO
Hello Rafia, Well with this new approach, the example you gave previously for better readability: \set bid CASE WHEN random(0, 99) < 85 THEN :tbid ELSE :abid + (:abid >= :tbid) END will give error at the first line. Indeed you are right for the patch I sent, but it

[HACKERS] Typo in comment in contrib/postgres_fdw/deparse.c

2016-11-01 Thread Etsuro Fujita
Hi, I ran into a typo in a comment in contrib/postgres_fdw/deparse.c. Please find attached a patch. Best regards, Etsuro Fujita diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index 450693a..66b059a 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgre

Re: [HACKERS] commit fest manager for CF 2016-11?

2016-11-01 Thread Michael Paquier
On Tue, Nov 1, 2016 at 4:53 PM, Michael Paquier wrote: > On Tue, Nov 1, 2016 at 12:20 PM, Thomas Munro > wrote: >> On Tue, Nov 1, 2016 at 4:15 PM, Peter Eisentraut >> wrote: >>> On 10/31/16 9:39 PM, Michael Paquier wrote: We are on the 1st, at least in my timezone. So the CF should start >>

Re: [HACKERS] Push down more full joins in postgres_fdw

2016-11-01 Thread Etsuro Fujita
On 2016/10/27 20:41, Etsuro Fujita wrote: Here is the updated version, which includes the restructuring you proposed. Other than the above issue and the alias issue we discussed, I addressed all your comments except one on testing; I tried to add test cases where the remote query is deparsed as

Re: [HACKERS] pgbench - allow backslash continuations in \set expressions

2016-11-01 Thread Rafia Sabih
Well with this new approach, the example you gave previously for better readability: > \set bid > CASE WHEN random(0, 99) < 85 >THEN :tbid >ELSE :abid + (:abid >= :tbid) > END will give error at the first line. In general, this new approach is likely to create confusions

Re: [HACKERS] Fix checkpoint skip logic on idle systems by tracking LSN progress

2016-11-01 Thread Kyotaro HORIGUCHI
Thanks for merging. It still applies on the current master with some displacements. At Wed, 5 Oct 2016 15:18:53 +0900, Michael Paquier wrote in > (Squashing replies) > > On Fri, Sep 30, 2016 at 6:13 PM, Michael Paquier > wrote: > > On Fri, Sep 30, 2016 at 2:51 PM, Michael Paquier > > wrote:

Re: [HACKERS] pgbench - allow backslash continuations in \set expressions

2016-11-01 Thread Fabien COELHO
Attached patch does what is described in the title, hopefully. Continuations in other pgbench backslash-commands should be dealt with elsewhere... Also attached is a small test script. Here is another approach, with "infered" continuations: no backslash is needed, the parsing is pursued if

[HACKERS] Re: [BUGS] BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.

2016-11-01 Thread Dilip Kumar
On Tue, Nov 1, 2016 at 12:40 PM, Haribabu Kommi wrote: > COPY command is treated as an UTILITY command, During the query > processing, the rules are not applied on the COPY command, and in the > execution of COPY command, it just inserts the data into the heap and > indexes with direct calls. > >

Re: [HACKERS] pgbench - allow backslash continuations in \set expressions

2016-11-01 Thread Fabien COELHO
Hello Rafia, Seems like an interesting addition to pgbench interface, but not sure where it's required, it'll be good if you may provide some cases where it's utility can be witnessed. Something like where you absolutely need continuations in expression. It is never "absolutely needed", you c

Re: [HACKERS] commit fest manager for CF 2016-11?

2016-11-01 Thread Michael Paquier
On Tue, Nov 1, 2016 at 12:20 PM, Thomas Munro wrote: > On Tue, Nov 1, 2016 at 4:15 PM, Peter Eisentraut > wrote: >> On 10/31/16 9:39 PM, Michael Paquier wrote: >>> We are on the 1st, at least in my timezone. So the CF should start >>> really soon, meaning that no new patches would get in. In a co

Re: [HACKERS] pgbench - allow backslash continuations in \set expressions

2016-11-01 Thread Rafia Sabih
Hie Fabien, Seems like an interesting addition to pgbench interface, but not sure where it's required, it'll be good if you may provide some cases where it's utility can be witnessed. Something like where you absolutely need continuations in expression. While applying it is giving some trailing wh

[HACKERS] Re: [BUGS] BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.

2016-11-01 Thread Haribabu Kommi
On Tue, Nov 1, 2016 at 3:54 PM, Dilip Kumar wrote: > On Tue, Oct 4, 2016 at 1:07 PM, Haribabu Kommi > wrote: > > I think currently there is no handling of INSTEAD of triggers in the copy > > functionality. > > > > It didn't seem difficult to the support the same, until unless there are > any > >