[HACKERS] Does "explain (QueryTree [RAW| ANAYLZE|REWRITE] | Optimization [PULL_UP_BEFORE| PULL_UP_AFTER|...]) SELECT XXXX" helpful?

2016-05-21 Thread Hao Lee
Hi all, When we debugging or hacking the internal, the tedious things is to debug step by step the code, so that make sure the PostgreSQL generates the right raw syntax tree or query tree or the plans. Therefore, i think if we have a uitility statment to show that, such as, we can using the exp

Re: [HACKERS] Does "explain (QueryTree [RAW| ANAYLZE|REWRITE] | Optimization [PULL_UP_BEFORE| PULL_UP_AFTER|...]) SELECT XXXX" helpful?

2016-05-21 Thread Tom Lane
Hao Lee writes: >When we debugging or hacking the internal, the tedious things is to > debug step by step the code, so that make sure the PostgreSQL generates the > right raw syntax tree or query tree or the plans. Therefore, i think if we > have a uitility statment to show that, such as, we

Re: [HACKERS] [PATCH] Add EXPLAIN (ALL) shorthand

2016-05-21 Thread Euler Taveira
On 20-05-2016 20:34, Robert Haas wrote: > Hmm, my experience is different. I use EXPLAIN (ANALYZE, VERBOSE) a > lot, but EXPLAIN (ANALYZE, BUFFERS) only rarely. I wonder if a GUC is > the way to go. > I wouldn't like a command output controlled by GUC. EXPLAIN is used a lot in bug/performance re

Re: [HACKERS] [PATCH] Add EXPLAIN (ALL) shorthand

2016-05-21 Thread David G. Johnston
On Sat, May 21, 2016 at 10:32 AM, Euler Taveira wrote: > On 20-05-2016 20:34, Robert Haas wrote: > > Hmm, my experience is different. I use EXPLAIN (ANALYZE, VERBOSE) a > > lot, but EXPLAIN (ANALYZE, BUFFERS) only rarely. I wonder if a GUC is > > the way to go. > > > I wouldn't like a command o

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-21 Thread Andreas Karlsson
On 05/20/2016 11:45 PM, Michael Paquier wrote: Yes, I agree. By the way, the patch completely ignores the fact that some of the modules already had a version bump in the 9.6 development cycle, like pageinpect. You don't need to create a new version script in such cases. I assumed this was too l

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-21 Thread Tom Lane
Peter Eisentraut writes: > On 5/20/16 7:37 PM, Robert Haas wrote: >> I guess my first question is whether we have consensus on the release >> into which we should put this. Some people (Noah, among others) >> thought it should wait because we're after feature freeze, while >> others thought we sh

Re: [HACKERS] [PATCH] Add EXPLAIN (ALL) shorthand

2016-05-21 Thread Tom Lane
"David G. Johnston" writes: > On Sat, May 21, 2016 at 10:32 AM, Euler Taveira > wrote: >> I wouldn't like a command output controlled by GUC. EXPLAIN is used a >> lot in bug/performance reports. > ​And most of the time the choice of options is totally arbitrary based upon > the mood and experi

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-21 Thread Andreas Karlsson
Another question which I thought of is what we should do with functions like pg_file_write() in adminpack. While it is perfectly fine to modify files from the parallel workers, a user could get race conditions if he tries to modify the same file multiple times. Is this a kind of problem the PA

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-21 Thread Michael Paquier
On Sat, May 21, 2016 at 1:01 PM, Andreas Karlsson wrote: > Another question which I thought of is what we should do with functions like > pg_file_write() in adminpack. > > While it is perfectly fine to modify files from the parallel workers, a user > could get race conditions if he tries to modify

Re: [HACKERS] [PATCH] Add EXPLAIN (ALL) shorthand

2016-05-21 Thread Pete Hollobon
On 21 May 2016 16:07, "David G. Johnston" wrote: > ​And most of the time the choice of options is totally arbitrary based upon the mood and experience of the user, so what's it matter if they saved a few keystrokes and set the GUC in the .psqlrc​ file? > >> I'm predicting users that will have >> t

Re: [HACKERS] Error during restore - dump taken with pg_dumpall -c option

2016-05-21 Thread Rushabh Lathia
On Fri, May 13, 2016 at 7:27 PM, Stephen Frost wrote: > * Rushabh Lathia (rushabh.lat...@gmail.com) wrote: > > On master branch when we do pg_dumpall with -c option, I can see that > > it also dumping the "DROP ROLE pg_signal_backend", which seems wrong. > > Because when you restore the dump, its

[HACKERS] 9.4 failure on skink in _bt_newroot/XLogCheckBuffer

2016-05-21 Thread Andres Freund
The valgrind animal just reported a large object related failure on 9.4: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=skink&dt=2016-05-19%2006%3A23%3A05 ==9952== VALGRINDERROR-BEGIN ==9952== Conditional jump or move depends on uninitialised value(s) ==9952==at 0x4DC6D3: XLogCheckBuffer (

Re: [HACKERS] 9.4 failure on skink in _bt_newroot/XLogCheckBuffer

2016-05-21 Thread Tom Lane
Andres Freund writes: > The valgrind animal just reported a large object related failure on 9.4: The proximate cause seems to be that _bt_newroot isn't bothering to fill the buffer_std field here: /* Make a full-page image of the left child if needed */ rdata[2].d

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-21 Thread Andreas Karlsson
On 05/21/2016 11:45 AM, Tom Lane wrote: Yes, let's fix it. This will also take care of the questions about whether the GIN/GIST opclass tweaks I made a few months ago require module version bumps. Do you have any idea what the best way to add these tweaks to the upgrade scripts would be? My

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-21 Thread Michael Paquier
On Sat, May 21, 2016 at 6:16 PM, Andreas Karlsson wrote: > My immediate thought is first doing an UPDATE of pg_proc and then updating > the catcache with CREATE OR REPLACE with the new arguments. Does that work? > Is there a less ugly way to accomplish this? > > Example: > > UPDATE pg_proc SET pro

Re: [HACKERS] statistics for shared catalogs not updated when autovacuum is off

2016-05-21 Thread Michael Paquier
On Tue, Feb 2, 2016 at 10:38 AM, Jim Nasby wrote: > On 2/1/16 7:20 PM, Peter Eisentraut wrote: >> That's probably right. Even with autovacuum on, the statistics for >> shared catalogs do not appear as updated right away. That is, if you >> run VACUUM and then look at pg_stat_sys_tables right awa

Re: [HACKERS] Latent cache flush hazard in RelationInitIndexAccessInfo

2016-05-21 Thread Michael Paquier
On Fri, Sep 11, 2015 at 11:29 AM, Robert Haas wrote: > On Wed, Sep 9, 2015 at 3:00 PM, Tom Lane wrote: >> Some stuff Salesforce has been doing turned up the fact that >> RelationInitIndexAccessInfo is not safe against a relcache flush on >> its target index. Specifically, the failure goes like t

[HACKERS] Inheritance

2016-05-21 Thread Jan Johansson
Hi, I've been reading some threads about inheritance, and how complicated it seems to let child (children) to inherit constraints and indexes (behaviors). In fact this seems to have been the issue for years, with no resolution. However, inheritance is a very good feature, and it would be great to