Re: [HACKERS] Using quicksort and a merge step to significantly improve on tuplesort's single run "external sort"

2015-08-06 Thread Peter Geoghegan
On Fri, Jul 31, 2015 at 12:59 AM, Heikki Linnakangas wrote: > On 07/31/2015 02:01 AM, Peter Geoghegan wrote: >> >> What prevents the tuple at the top of the in-memory heap at the point >> of tuplesort_performsort() (say, one of the ones added to the heap as >> our glut of memory was*partially* co

Re: [HACKERS] Using quicksort and a merge step to significantly improve on tuplesort's single run "external sort"

2015-08-06 Thread Peter Geoghegan
On Tue, Aug 4, 2015 at 1:24 AM, Heikki Linnakangas wrote: > Yeah, I don't think there's a big performance difference between the two > approaches. I'm not wedded to either approach. Whichever approach we use, my > main point was that it would be better to handle this in the logical tape > abstract

Re: [HACKERS] Reduce ProcArrayLock contention

2015-08-06 Thread Amit Kapila
On Thu, Aug 6, 2015 at 9:36 PM, Robert Haas wrote: > > > OK, committed. > Thank you. With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Noah Misch
On Thu, Aug 06, 2015 at 05:34:50PM +0200, Andres Freund wrote: > On 2015-08-06 12:29:15 -0300, Alvaro Herrera wrote: > > Andres Freund wrote: > > > @@ -0,0 +1,56 @@ > > > +/*- > > > + * > > > + * lockdefs.h > > > + * F

Re: [HACKERS] Autonomous Transaction is back

2015-08-06 Thread Merlin Moncure
On Thu, Aug 6, 2015 at 4:15 PM, Robert Haas wrote: > On Mon, Aug 3, 2015 at 9:09 AM, Merlin Moncure wrote: >> hm. OK, what's the behavior of: >> >> BEGIN >> UPDATE foo SET x = x + 1 WHERE foo_id = 1; >> >> BEGIN WITH AUTONOMOUS TRANSACTION >> UPDATE foo SET x = x + 1 WHERE foo_id = 1; >>

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Thu, Aug 6, 2015 at 06:42:38PM -0700, Peter Geoghegan wrote: > On Thu, Aug 6, 2015 at 6:08 PM, Bruce Momjian wrote: > > I though tabout this, and it is really an issue for FDW authors, not for > > end users, so I put this text in the Source Code changes section: > > I carefully considered whe

Re: Fwd: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Thu, Aug 6, 2015 at 11:19:46AM -0700, Jeff Janes wrote: > On Wed, Jun 10, 2015 at 9:15 PM, Bruce Momjian wrote: > > I have committed the first draft of the 9.5 release notes.  You can view > the output here: > >         http://momjian.us/pgsql_docs/release-9-5.html > > and i

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Thu, Aug 6, 2015 at 10:21:29PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, Jun 30, 2015 at 12:12:16AM +0200, Andres Freund wrote: > >> Anyway, how about: > >> format:%cd [%h] %<(8,trunc)%cN: %<(49,trunc)%s > >> (which you can configure as pretty.pgmajor or so in .gitconfig btw.)

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Tue, Jun 30, 2015 at 09:00:44PM +0200, Andres Freund wrote: > I've gone through the release notes and added comments referencing > commits as discussed earlier. Additionally I've improved and added a > bunch of items. > > Further stuff that came up while looking: > * 2014-09-25 [b0d81ad] Heikki

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Tom Lane
Bruce Momjian writes: > On Tue, Jun 30, 2015 at 12:12:16AM +0200, Andres Freund wrote: >> Anyway, how about: >> format:%cd [%h] %<(8,trunc)%cN: %<(49,trunc)%s >> (which you can configure as pretty.pgmajor or so in .gitconfig btw.) > Should we add this to src/tools/git_changelog? It currently use

Re: [HACKERS] [sqlsmith] Failed assertion in analyzejoins.c

2015-08-06 Thread Tom Lane
Andreas Seltenreich writes: > this one was in today's sqlsmith harvest. It triggers an assertion in > current master (c030dc4). Fixed, thanks. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Peter Geoghegan
On Thu, Aug 6, 2015 at 6:08 PM, Bruce Momjian wrote: > I though tabout this, and it is really an issue for FDW authors, not for > end users, so I put this text in the Source Code changes section: I carefully considered where to put it, and chose the compatibility section based on the precedent of

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Tue, Jun 30, 2015 at 12:12:16AM +0200, Andres Freund wrote: > On 2015-06-29 17:58:54 -0400, Tom Lane wrote: > > Yeah we are. The only places you'll find where we aren't formatting to 77 > > or 78 columns or so are where it would require breaking SGML tags in weird > > places. > > Which isn't e

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Mon, Jun 29, 2015 at 05:05:59PM -0400, Tom Lane wrote: > Andres Freund writes: > > I'm working on integrating the suggestions I made last week to the > > release notes. Would anybody mind if I start to add commit ids in > > comments, similar to what Tom has done for minor releases, to news > >

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Fri, Jun 26, 2015 at 03:39:19PM -0700, Peter Geoghegan wrote: > On Wed, Jun 10, 2015 at 9:15 PM, Bruce Momjian wrote: > > I am ready to make suggested adjustments > > I attach a compatibility note that is clearly needed; adding this is > an open item of mine for 9.5. This concerns foreign data

Re: [HACKERS] [sqlsmith] Failed assertion in joinrels.c

2015-08-06 Thread Tom Lane
Andreas Seltenreich writes: > Tom Lane writes: >> On 08/01/2015 05:59 PM, Tom Lane wrote: >>> Well, I certainly think all of these represent bugs: >>> 1 | ERROR: could not find pathkey item to sort >> Hmm ... I see no error with these queries as of today's HEAD or >> back-branch tips. I surmise

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Peter Geoghegan
On Thu, Aug 6, 2015 at 3:39 PM, Bruce Momjian wrote: > I am using the same criteria I have always used. If you would like it > changed, we need to discuss it at a macro level, not for individual > cases where we feel someone didn't get enough _credit_. I don't know how you can say that no *user*

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Thu, Aug 6, 2015 at 03:32:43PM -0700, Peter Geoghegan wrote: > On Thu, Aug 6, 2015 at 3:06 PM, Bruce Momjian wrote: > >> Below performance improvement in the "General Performance" category is > >> missing: > >> > >> Reduce btree scan overhead for < and > strategies > >> > >> For <, <=

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Peter Geoghegan
On Thu, Aug 6, 2015 at 3:06 PM, Bruce Momjian wrote: >> Below performance improvement in the "General Performance" category is >> missing: >> >> Reduce btree scan overhead for < and > strategies >> >> For <, <=, > and >= strategies, mark the first scan key >> as already matched if sca

Re: [HACKERS] Thinko in processing of SHM message size info?

2015-08-06 Thread Antonin Houska
Robert Haas wrote: > On Thu, Aug 6, 2015 at 1:24 PM, Robert Haas wrote: > > On Thu, Aug 6, 2015 at 9:04 AM, Antonin Houska wrote: > >> Can anyone please explain why the following patch shouldn't be applied? > >> > >> diff --git a/src/backend/storage/ipc/shm_mq.c > >> b/src/backend/storage/ipc/s

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Mon, Jun 22, 2015 at 09:14:01PM +, Rajeev rastogi wrote: > On 11 June 2015 09:45, Bruce Momjian Wrote: > > > > > I have committed the first draft of the 9.5 release notes. You can > > view the output here: > > > > http://momjian.us/pgsql_docs/release-9-5.html > > > > and it will eve

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Fri, Jun 19, 2015 at 09:44:04PM +0200, Andres Freund wrote: > Hi, > > On 2015-06-11 00:15:21 -0400, Bruce Momjian wrote: > > I have committed the first draft of the 9.5 release notes. You can view > > the output here: > > I'm looking through all the commits, checking which I think should > po

Re: [HACKERS] Race conditions in shm_mq.c

2015-08-06 Thread Antonin Houska
Robert Haas wrote: > On Thu, Aug 6, 2015 at 2:38 PM, Robert Haas wrote: > > On Thu, Aug 6, 2015 at 10:10 AM, Antonin Houska wrote: > >> During my experiments with parallel workers I sometimes saw the "master" > >> and > >> worker process blocked. The master uses shm queue to send data to the >

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Thu, Aug 6, 2015 at 06:44:40PM -0300, Alvaro Herrera wrote: > Bruce Momjian wrote: > > On Fri, Jun 19, 2015 at 08:21:19PM +0200, Andres Freund wrote: > > > > I think 647248e3708, 4fe384bd85, 4f85fde8, 59f71a0d0 should also be > > > > I couldn't look up 647248e3708, I got "unknown revision or

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Alvaro Herrera
Bruce Momjian wrote: > On Fri, Jun 19, 2015 at 08:21:19PM +0200, Andres Freund wrote: > > I think 647248e3708, 4fe384bd85, 4f85fde8, 59f71a0d0 should also be > > I couldn't look up 647248e3708, I got "unknown revision or path not in > the working tree." a "6" is missing. 6647248e3708 -- Álvar

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Wed, Jun 24, 2015 at 11:34:27AM +0200, Andres Freund wrote: > On 2015-06-23 21:08:36 -0400, Robert Haas wrote: > > On Tue, Jun 23, 2015 at 5:48 PM, Kevin Grittner wrote: > > > Andres Freund wrote: > > >>> > > >>> > > >>>Improve concurrent locking and buffer scan performanc

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Fri, Jun 19, 2015 at 08:21:19PM +0200, Andres Freund wrote: > Hi, > > On 2015-06-11 00:15:21 -0400, Bruce Momjian wrote: > > I have committed the first draft of the 9.5 release notes. You can view > > the output here: > > So, I did a pass through master's state: > > > > > > >

Re: [HACKERS] Autonomous Transaction is back

2015-08-06 Thread Robert Haas
On Mon, Aug 3, 2015 at 9:09 AM, Merlin Moncure wrote: > hm. OK, what's the behavior of: > > BEGIN > UPDATE foo SET x = x + 1 WHERE foo_id = 1; > > BEGIN WITH AUTONOMOUS TRANSACTION > UPDATE foo SET x = x + 1 WHERE foo_id = 1; > END; > > RAISE EXCEPTION ...; > EXCEPTION ... > > END; S

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Alvaro Herrera
Petr Jelinek wrote: > On 2015-08-06 22:25, Josh Berkus wrote: > >If there is no appropriate place, I'll just write a blog. > > There is a blog post on 2ndQ blog page which tries to describe the sampling > methods visually, not sure if it's more obvious from that or not. It's > somewhat broken on

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Petr Jelinek
On 2015-08-06 22:25, Josh Berkus wrote: On 08/06/2015 01:19 PM, Simon Riggs wrote: For me, the docs seem exactly correct. The mathematical implications of that just aren't recorded explicitly. Well, for the SELECT page, all we need is the following (one changed sentence): The SYSTEM method is

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Josh Berkus
On 08/06/2015 01:19 PM, Simon Riggs wrote: > On 6 August 2015 at 21:14, Josh Berkus > wrote: > > On 08/06/2015 01:10 PM, Simon Riggs wrote: > > Given, user-stated probability of accessing a block of P and N total > > blocks, there are a few ways to implement

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Peter Geoghegan
On Fri, Jun 26, 2015 at 3:39 PM, Peter Geoghegan wrote: > I attach a compatibility note that is clearly needed; adding this is > an open item of mine for 9.5. This concerns foreign data wrappers and > UPSERT. Can you look at this please, Bruce? -- Peter Geoghegan -- Sent via pgsql-hackers m

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Petr Jelinek
On 2015-08-06 22:17, Josh Berkus wrote: On 08/06/2015 01:14 PM, Josh Berkus wrote: On 08/06/2015 01:10 PM, Simon Riggs wrote: Given, user-stated probability of accessing a block of P and N total blocks, there are a few ways to implement block sampling. 1. Test P for each block individually. Th

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Simon Riggs
On 6 August 2015 at 21:14, Josh Berkus wrote: > On 08/06/2015 01:10 PM, Simon Riggs wrote: > > Given, user-stated probability of accessing a block of P and N total > > blocks, there are a few ways to implement block sampling. > > > > 1. Test P for each block individually. This gives a range of po

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Josh Berkus
On 08/06/2015 01:14 PM, Josh Berkus wrote: > On 08/06/2015 01:10 PM, Simon Riggs wrote: >> Given, user-stated probability of accessing a block of P and N total >> blocks, there are a few ways to implement block sampling. >> >> 1. Test P for each block individually. This gives a range of possible >>

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Josh Berkus
On 08/06/2015 01:10 PM, Simon Riggs wrote: > Given, user-stated probability of accessing a block of P and N total > blocks, there are a few ways to implement block sampling. > > 1. Test P for each block individually. This gives a range of possible > results, with 0 blocks being possible outcome, t

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Simon Riggs
On 6 August 2015 at 20:14, Josh Berkus wrote: > This table has around 185 rows per page. As the sample size goes up, > the number times I get zero rows goes down, but those results seem to > still include data pages with zero rows. For example, here's a series > of results from a 0.04 sample a

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Thu, Aug 6, 2015 at 01:48:26PM -0400, Robert Haas wrote: > On Thu, Aug 6, 2015 at 10:33 AM, Bruce Momjian wrote: > > On Sun, Jun 14, 2015 at 12:05:54PM +0100, Dean Rasheed wrote: > >> On 11 June 2015 at 05:15, Bruce Momjian wrote: > >> > I have committed the first draft of the 9.5 release not

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Josh Berkus
On 08/06/2015 12:45 PM, Tom Lane wrote: > Simon Riggs writes: >> On 6 August 2015 at 20:14, Josh Berkus wrote: >>> Speaking from a user perspective, SYSTEM seems broken to me. I can't >>> imagine using it for anything with a that degree of variation in the >>> number of results returned, especia

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Tom Lane
Simon Riggs writes: > On 6 August 2015 at 20:14, Josh Berkus wrote: >> Speaking from a user perspective, SYSTEM seems broken to me. I can't >> imagine using it for anything with a that degree of variation in the >> number of results returned, especially if it's possible to return zero >> rows fr

Re: [HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Simon Riggs
On 6 August 2015 at 20:14, Josh Berkus wrote: > The results of 0, 185 and 925 are not. It really seems like SYSTEM is > treating 0.04% as a maximum, but taking a random number of data pages > somewhere around that maximum, using math which can choose numbers of > pages far outside of the % requ

[HACKERS] Bug? Small samples in TABLESAMPLE SYSTEM returns zero rows

2015-08-06 Thread Josh Berkus
Version: 9.5alpha2 Issue: when requesting small samples, SYSTEM often returns zero rows, and sometimes returns unexpected numbers of rows. Example: create table thous ( id int, val text ); insert into thous select i, i::text || '-val' from generate_series(1,10) as gs(i); analyze; This is a

Re: [HACKERS] Race conditions in shm_mq.c

2015-08-06 Thread Robert Haas
On Thu, Aug 6, 2015 at 2:38 PM, Robert Haas wrote: > On Thu, Aug 6, 2015 at 10:10 AM, Antonin Houska wrote: >> During my experiments with parallel workers I sometimes saw the "master" and >> worker process blocked. The master uses shm queue to send data to the worker, >> both sides nowait==false.

Re: [HACKERS] Race conditions in shm_mq.c

2015-08-06 Thread Robert Haas
On Thu, Aug 6, 2015 at 10:10 AM, Antonin Houska wrote: > During my experiments with parallel workers I sometimes saw the "master" and > worker process blocked. The master uses shm queue to send data to the worker, > both sides nowait==false. I concluded that the following happened: > > The worker

Fwd: [HACKERS] 9.5 release notes

2015-08-06 Thread Jeff Janes
On Wed, Jun 10, 2015 at 9:15 PM, Bruce Momjian wrote: > I have committed the first draft of the 9.5 release notes. You can view > the output here: > > http://momjian.us/pgsql_docs/release-9-5.html > > and it will eventually appear here: > > http://www.postgresql.org/docs/devel/st

[HACKERS] cache invalidation skip logic

2015-08-06 Thread Qingqing Zhou
In cache invalidation logic, we have the following comment: /* * Now that we have the lock, check for invalidation messages, so that we * will update or flush any stale relcache entry before we try to use it. * RangeVarGetRelid() specifically relies on us for this. We can skip * this in the not-u

Re: [HACKERS] Freeze avoidance of very large table.

2015-08-06 Thread Simon Riggs
On 5 August 2015 at 18:46, Alvaro Herrera wrote: > > What do others think? Wow, everything moves when you blink, eh? Sorry I was wasn't watching this. Mainly because I was working on some other related thoughts, separate post coming. 1. Most importantly, it needs to be somewhere where we can u

[HACKERS] [sqlsmith] Failed assertion in analyzejoins.c

2015-08-06 Thread Andreas Seltenreich
Hi, this one was in today's sqlsmith harvest. It triggers an assertion in current master (c030dc4). regards, Andreas -- TRAP: FailedAssertion("!(!bms_is_empty(phinfo->ph_eval_at))", File: "analyzejoins.c", Line: 474) select rel_141618057.srvfdw as c0, rel_141618057.srvversion as c1 from

Re: [HACKERS] Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );

2015-08-06 Thread Fabrízio de Royes Mello
On Wed, Aug 5, 2015 at 9:21 PM, Michael Paquier wrote: > > On Thu, Aug 6, 2015 at 3:06 AM, Fabrízio de Royes Mello wrote: > > On Wed, Aug 5, 2015 at 9:31 AM, Robert Haas wrote: > >> Agreed. I think we're making a mountain out of a molehill here. As > >> long as the locks that are actually used a

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Robert Haas
On Thu, Aug 6, 2015 at 10:33 AM, Bruce Momjian wrote: > On Sun, Jun 14, 2015 at 12:05:54PM +0100, Dean Rasheed wrote: >> On 11 June 2015 at 05:15, Bruce Momjian wrote: >> > I have committed the first draft of the 9.5 release notes. You can view >> > the output here: >> > >> > http://momj

Re: [HACKERS] Thinko in processing of SHM message size info?

2015-08-06 Thread Robert Haas
On Thu, Aug 6, 2015 at 1:24 PM, Robert Haas wrote: > On Thu, Aug 6, 2015 at 9:04 AM, Antonin Houska wrote: >> Can anyone please explain why the following patch shouldn't be applied? >> >> diff --git a/src/backend/storage/ipc/shm_mq.c >> b/src/backend/storage/ipc/shm_mq.c >> index 126cb07..4cd52a

Re: [HACKERS] Thinko in processing of SHM message size info?

2015-08-06 Thread Robert Haas
On Thu, Aug 6, 2015 at 9:04 AM, Antonin Houska wrote: > Can anyone please explain why the following patch shouldn't be applied? > > diff --git a/src/backend/storage/ipc/shm_mq.c > b/src/backend/storage/ipc/shm_mq.c > index 126cb07..4cd52ac 100644 > --- a/src/backend/storage/ipc/shm_mq.c > +++ b/s

Re: [HACKERS] Removing unreferenced files

2015-08-06 Thread Joshua D. Drake
On 08/05/2015 11:44 AM, Ron Farrer wrote: Initial questions that had no consensus in previous discussions: 1. Approach on file handling undecided 2. Startup vs standalone tool I think it should be on startup and perhaps also have a function that will do it from user space. If this problem pe

Re: [HACKERS] Reduce ProcArrayLock contention

2015-08-06 Thread Robert Haas
On Wed, Aug 5, 2015 at 10:59 AM, Amit Kapila wrote: > On Tue, Aug 4, 2015 at 8:59 PM, Robert Haas wrote: >> >> I'm not entirely happy with the name "nextClearXidElem" but apart from >> that I'm fairly happy with this version. We should probably test it >> to make sure I haven't broken anything;

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Alvaro Herrera
Andres Freund wrote: > On 2015-08-06 12:29:15 -0300, Alvaro Herrera wrote: > > Ah, but that's because you cheated and didn't remove the include from > > namespace.h ... > > Well, it's not included from frontend code, so I didn't see the need? > Going through all the backend code and replacing loc

[HACKERS] obsolete comments for InitializeMaxBackends

2015-08-06 Thread Robert Haas
While hacking today, I realized that a couple of comments related to InitializeMaxBackends are obsolete. Originally, the number of background workers was determined just after processing shared_preload_libraries, but I changed that in commit 6bc8ef0b7f1f1df3998745a66e1790e27424aa0c with the introd

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Andres Freund
On 2015-08-06 12:29:15 -0300, Alvaro Herrera wrote: > Andres Freund wrote: > > > I had to split of three things: LOCKMASK, the individual lock levels and > > xl_standby_lock to be able to prohibit lock.h to be included by frontend > > code. lockdefs.h works for me, counter proposals? > > > > Ther

Re: [HACKERS] Freeze avoidance of very large table.

2015-08-06 Thread Jim Nasby
On 8/5/15 1:47 PM, Petr Jelinek wrote: On 2015-08-05 20:09, Alvaro Herrera wrote: Josh Berkus wrote: On 08/05/2015 10:46 AM, Alvaro Herrera wrote: 1. Add the functions as a builtins. This is what the current patch does. Simon seems to prefer this, because he wants the function to be a

Re: [HACKERS] deparsing utility commands

2015-08-06 Thread Alvaro Herrera
Jim Nasby wrote: > FWIW, my interest in this is largely due to the problems I've had with this > in the variant type. In particular, using the same resolution rules for > functions and operators. So I'm wondering if there's a bigger issue here. I'd be glad to review your variant stuff, but I doub

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Alvaro Herrera
Andres Freund wrote: > I had to split of three things: LOCKMASK, the individual lock levels and > xl_standby_lock to be able to prohibit lock.h to be included by frontend > code. lockdefs.h works for me, counter proposals? > > There weren't any places that needed additional lock.h includes. Ah,

Re: [HACKERS] deparsing utility commands

2015-08-06 Thread Jim Nasby
On 8/5/15 9:55 PM, Alvaro Herrera wrote: Jim Nasby wrote: On 7/31/15 8:45 AM, Shulgin, Oleksandr wrote: STATEMENT: create view v1 as select * from t1 ; ERROR: operator does not exist: pg_catalog.oid = pg_catalog.oid at character 52 HINT: No operator matches the given name and argument type

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Andres Freund
On 2015-08-06 12:05:24 -0300, Alvaro Herrera wrote: > Andres Freund wrote: > > On 2015-08-06 10:27:52 -0400, Tom Lane wrote: > > > Andres Freund writes: > > > >> One approach is to avoid including lwlock.h/slot.h in frontend > > > >> code. That'll require some minor surgery and adding a couple inc

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Alvaro Herrera
Andres Freund wrote: > On 2015-08-06 10:27:52 -0400, Tom Lane wrote: > > Andres Freund writes: > > >> One approach is to avoid including lwlock.h/slot.h in frontend > > >> code. That'll require some minor surgery and adding a couple includes, > > >> but it doesn't look that bad. > > > > > Patch d

Re: [HACKERS] nodes/*funcs.c inconsistencies

2015-08-06 Thread Stephen Frost
Noah, * Noah Misch (n...@leadboat.com) wrote: > Rather than commit on an emergency basis in the few hours between these +1's > and the wrap, I kept to my original schedule. FYI, if it hadn't required > emergency procedures (cancelling the day's plans so I could get to a notebook > computer), I wo

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

2015-08-06 Thread Erik Rijkers
On 2015-08-06 15:36, Uriy Zhuravlev wrote: On Wednesday 08 July 2015 12:29:38 David Rowley wrote: On 8 July 2015 at 02:00, Alexander Korotkov wrote: > Patch doesn't apply to current master. Could you, please, rebase it? Attached. Thanks. Regards David Rowley -- David Rowley

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Robert Haas
On Thu, Aug 6, 2015 at 10:31 AM, Andres Freund wrote: > On 2015-08-06 10:29:39 -0400, Robert Haas wrote: >> On Thu, Aug 6, 2015 at 3:09 AM, Andres Freund wrote: >> > It really doesn't. It's just fallout from indirectly including lwlock.h >> > which includes an atomic variable. The include path le

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Andres Freund
On 2015-08-06 10:27:52 -0400, Tom Lane wrote: > Andres Freund writes: > >> One approach is to avoid including lwlock.h/slot.h in frontend > >> code. That'll require some minor surgery and adding a couple includes, > >> but it doesn't look that bad. > > > Patch doing that attached. > > This seems

Re: [HACKERS] 9.5 release notes

2015-08-06 Thread Bruce Momjian
On Sun, Jun 14, 2015 at 12:05:54PM +0100, Dean Rasheed wrote: > On 11 June 2015 at 05:15, Bruce Momjian wrote: > > I have committed the first draft of the 9.5 release notes. You can view > > the output here: > > > > http://momjian.us/pgsql_docs/release-9-5.html > > > > I think it's worth

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Andres Freund
On 2015-08-06 10:29:39 -0400, Robert Haas wrote: > On Thu, Aug 6, 2015 at 3:09 AM, Andres Freund wrote: > > It really doesn't. It's just fallout from indirectly including lwlock.h > > which includes an atomic variable. The include path leading to it is > > > > In file included from > > /home/andr

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Robert Haas
On Thu, Aug 6, 2015 at 3:09 AM, Andres Freund wrote: > It really doesn't. It's just fallout from indirectly including lwlock.h > which includes an atomic variable. The include path leading to it is > > In file included from > /home/andres/src/postgresql/src/include/storage/lwlock.h:19:0, >

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Tom Lane
Andres Freund writes: >> One approach is to avoid including lwlock.h/slot.h in frontend >> code. That'll require some minor surgery and adding a couple includes, >> but it doesn't look that bad. > Patch doing that attached. This seems kinda messy. Looking at the contents of lock.h, it seems lik

[HACKERS] Race conditions in shm_mq.c

2015-08-06 Thread Antonin Houska
During my experiments with parallel workers I sometimes saw the "master" and worker process blocked. The master uses shm queue to send data to the worker, both sides nowait==false. I concluded that the following happened: The worker process set itself as a receiver on the queue after shm_mq_wait_i

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

2015-08-06 Thread Uriy Zhuravlev
On Wednesday 08 July 2015 12:29:38 David Rowley wrote: > On 8 July 2015 at 02:00, Alexander Korotkov > > wrote: > > Patch doesn't apply to current master. Could you, please, rebase it? > > Attached. Thanks. > > Regards > > David Rowley > > -- > David Rowley http://www.2ndQu

[HACKERS] Thinko in processing of SHM message size info?

2015-08-06 Thread Antonin Houska
Can anyone please explain why the following patch shouldn't be applied? diff --git a/src/backend/storage/ipc/shm_mq.c b/src/backend/storage/ipc/shm_mq.c index 126cb07..4cd52ac 100644 --- a/src/backend/storage/ipc/shm_mq.c +++ b/src/backend/storage/ipc/shm_mq.c @@ -584,7 +584,7 @@ shm_mq_receive(sh

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2015-08-06 Thread Ildus Kurbangaliev
On 08/05/2015 09:33 PM, Robert Haas wrote: On Wed, Aug 5, 2015 at 1:10 PM, Ildus Kurbangaliev wrote: About `memcpy`, PgBackendStatus struct already have a bunch of multi-byte variables, so it will be not consistent anyway if somebody will want to copy it in that way. On the other hand two byte

Re: [HACKERS] raw output from copy

2015-08-06 Thread Pavel Stehule
Hi, Psql based implementation needs new infrastructure (more than few lines) Missing: * binary mode support * parametrized query support, I am not against, but both points I proposed, and both was rejected. So why dont use current infrastructure? Raw copy is trivial patch. Dne 6.8.2015 0:09 na

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-06 Thread Andres Freund
On 2015-08-05 23:18:08 -0400, Tom Lane wrote: > Andres Freund writes: > > ... I'm going to reshuffle things in that direction tomorrow. I'll > > wait for other fallout first though. So far only gcc, xlc and clang (via > > gcc frontend) have run... > > In the department of "other fallout", pademel

Re: [HACKERS] [PATCH] libpq: Allow specifying multiple host names to try to connect to

2015-08-06 Thread Mikko Tiihonen
On Thu, Aug 6, 2015 at 03:15 AM, Michael Paquier wrote: >On Wed, Aug 5, 2015 at 11:53 PM, Bruce Momjian wrote: >> On Wed, Jul 8, 2015 at 12:24:37PM -0400, Robbie Harwood wrote: >>> > You update the documentation just for psql but your change effects any >>> > libpq application if we go forward