Re: [HACKERS] Typo in bgworker.sgml

2014-10-13 Thread Heikki Linnakangas
On 10/14/2014 04:18 AM, Shigeru Hanada wrote: I found a minor typo in bgworker.sgml. Patch attached. It should be applied to 9.4 too. Fixed, thanks. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.o

Re: [HACKERS] Add generate_series(numeric, numeric)

2014-10-13 Thread Michael Paquier
On Tue, Oct 7, 2014 at 8:38 AM, Ali Akbar wrote: > 2014-10-06 22:51 GMT+07:00 Marti Raudsepp : > > > >> > the one that tests values just before numeric overflow >> >> Actually I don't know if that's too useful. I think you should add a >> test case that causes an error to be thrown. >> > > Actual

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.9

2014-10-13 Thread Amit Kapila
On Sat, Oct 11, 2014 at 7:02 PM, Amit Kapila wrote: > On Sat, Oct 11, 2014 at 6:40 PM, Andres Freund wrote: > > On 2014-10-11 07:26:57 +0530, Amit Kapila wrote: > > > On Sat, Oct 11, 2014 at 7:00 AM, Andres Freund > > > > And since > > > > your general performance numbers are a fair bit lower th

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-10-13 Thread Sean Chittenden
> Really? Why? Because it was found to be lighter weight. See §5 (bottom of ppg 8). https://kib.kiev.ua/kib/pgsql_perf.pdf > According to the notes in our code, named POSIX semaphores > are the least attractive of the three Unixoid semaphore APIs we support, > because they require eating a fil

Re: [HACKERS] Function array_agg(array)

2014-10-13 Thread Ali Akbar
2014-10-12 19:37 GMT+07:00 Ali Akbar : > Currently, it cannot handle NULL arrays: > backend> select array_agg(a) from (values(null::int[])) a(a); > 1: array_agg(typeid = 1007, len = -1, typmod = -1, byval = f) > > ERROR: cannot aggregate null arrays > While thinking about the f

Re: [HACKERS] postgres_fdw behaves oddly

2014-10-13 Thread Etsuro Fujita
(2014/10/14 8:53), Robert Haas wrote: On Mon, Oct 13, 2014 at 3:30 PM, Bruce Momjian wrote: Uh, where are we on this patch? Probably it should be added to the upcoming CF. Done. https://commitfest.postgresql.org/action/patch_view?id=1599 Thanks, Best regards, Etsuro Fujita -- Sent via

Re: [HACKERS] Incorrect initialization of sentPtr in walsender.c

2014-10-13 Thread Michael Paquier
On Tue, Oct 14, 2014 at 5:18 AM, Bruce Momjian wrote: > On Fri, Sep 12, 2014 at 09:16:42PM +0900, Michael Paquier wrote: >> Patch attached in case. > I like this. Can we apply it Heikki? I actually registered it to the next CF so as it does not fall into oblivion, simply forgot to mention it: htt

Re: [HACKERS] Possible micro-optimization in CacheInvalidateHeapTuple

2014-10-13 Thread Tom Lane
Jim Nasby writes: > CacheInvalidateHeapTuple currently does the following tests first; would > there be a performance improvement to testing the system relation case first? > We're almost never in bootstrap mode, so that test is almost always a waste. > Is there any reason not to switch the two

Re: [HACKERS] pg_get_indexdef() doesn't quote string reloptions

2014-10-13 Thread Michael Paquier
On Tue, Oct 14, 2014 at 12:21 AM, Eric Ridge wrote: > pg_get_indexdef() and pg_dump don't quote the reloption values, making a > restore (or cut-n-paste of the pg_get_indexdef() output) impossible if the > reloption value contains non-alphanumerics. > > For example, the statement: > > #

[HACKERS] Typo in bgworker.sgml

2014-10-13 Thread Shigeru Hanada
I found a minor typo in bgworker.sgml. Patch attached. It should be applied to 9.4 too. -- Shigeru HANADA fix_typo_in_bgworker.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [HACKERS] pg_get_indexdef() doesn't quote string reloptions

2014-10-13 Thread Robert Haas
On Mon, Oct 13, 2014 at 11:21 AM, Eric Ridge wrote: > PROPRIETARY AND COMPANY CONFIDENTIAL COMMUNICATIONS > The information contained in this communication is intended only for > the use of the addressee. Any other use is strictly prohibited. > Please notify the sender if you have received this me

Re: [HACKERS] postgres_fdw behaves oddly

2014-10-13 Thread Robert Haas
On Mon, Oct 13, 2014 at 3:30 PM, Bruce Momjian wrote: > Uh, where are we on this patch? Probably it should be added to the upcoming CF. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.

Re: [HACKERS] interval typmodout is broken

2014-10-13 Thread Bruce Momjian
On Thu, Sep 25, 2014 at 12:06:56AM -0400, Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> You sure about that? The grammar for INTERVAL is weird. > > > Well, I tested what is taken on input, and yes I agree the grammar is > > weird (but not more weird than timestamp/timestamptz

Re: [HACKERS] psql \watch versus \timing

2014-10-13 Thread Michael Paquier
On Tue, Oct 14, 2014 at 4:49 AM, Bruce Momjian wrote: > On Thu, Sep 4, 2014 at 10:50:58PM +0900, Michael Paquier wrote: >> On Thu, Sep 4, 2014 at 1:44 PM, Fujii Masao wrote: >> > On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao wrote: >> >> Good catch. So I will remove start_xact code later. >> > A

Re: [HACKERS] missing tab-completion for relation options

2014-10-13 Thread Michael Paquier
On Tue, Oct 14, 2014 at 4:51 AM, Bruce Momjian wrote: > On Thu, Sep 4, 2014 at 10:29:06PM +0900, Michael Paquier wrote: >> On Thu, Sep 4, 2014 at 1:53 PM, Fujii Masao wrote: >> > Attached patch adds the missing tab-completion for the relation >> > options like autovacuum_multixact_freeze_max_age

[HACKERS] Possible micro-optimization in CacheInvalidateHeapTuple

2014-10-13 Thread Jim Nasby
CacheInvalidateHeapTuple currently does the following tests first; would there be a performance improvement to testing the system relation case first? We're almost never in bootstrap mode, so that test is almost always a waste. Is there any reason not to switch the two? /* Do nothing d

Re: [HACKERS] pg_dump refactor patch to remove global variables

2014-10-13 Thread Alvaro Herrera
Alvaro Herrera wrote: > Here's the complete patch in case anyone is wondering. I found out that with just a little bit of extra header hacking, the whole thing ends up cleaner -- for instance, with the attached patch, pg_backup_archiver.h is no longer needed by pg_backup_db.h. I also tweaked thin

Re: [HACKERS] Obsolete comment within execTuples.c

2014-10-13 Thread Bruce Momjian
On Sun, Sep 14, 2014 at 09:15:30PM -0700, Peter Geoghegan wrote: > On Sun, Sep 14, 2014 at 9:05 PM, Tom Lane wrote: > > More generally, though, it seems like the header comments in execTuples.c > > are not the best place to document global behavior ... > > > Yeah, my thoughts exactly. I applied

Re: [HACKERS] Missing IPv6 for pgbuildfarm.org

2014-10-13 Thread Joshua D. Drake
On 10/13/2014 11:28 AM, Alvaro Herrera wrote: Andrew Dunstan wrote: [IPv6 support for buildfarm] This should now be working. The postgresql.org DNS maintainers might like to add this address to their entries for the server, too: 2604:da00:2:2:5054:ff:fe49:e8e This doesn't reverse-resolv

Re: [HACKERS] Incorrect initialization of sentPtr in walsender.c

2014-10-13 Thread Bruce Momjian
On Fri, Sep 12, 2014 at 09:16:42PM +0900, Michael Paquier wrote: > On Fri, Sep 12, 2014 at 4:55 PM, Heikki Linnakangas > wrote: > > I haven't looked at those places closely, but it seems possible that at > > least some of those variables are supposed to be initialized to a value > > smaller than a

Re: [HACKERS] settings without unit

2014-10-13 Thread Bruce Momjian
On Thu, Sep 4, 2014 at 08:50:36PM -0300, Euler Taveira wrote: > Hi, > > I noticed that a setting in pg_settings without units have NULL and "" > as unit values ("" for integer and NULL for the other ones). Could we be > consistent? It is like that since units were introduced (b517e65). No > unit

Re: [HACKERS] missing tab-completion for relation options

2014-10-13 Thread Bruce Momjian
On Thu, Sep 4, 2014 at 10:29:06PM +0900, Michael Paquier wrote: > On Thu, Sep 4, 2014 at 1:53 PM, Fujii Masao wrote: > > Attached patch adds the missing tab-completion for the relation > > options like autovacuum_multixact_freeze_max_age. > > That's a nice catch. Multixact parameters are present

Re: [HACKERS] psql \watch versus \timing

2014-10-13 Thread Bruce Momjian
On Thu, Sep 4, 2014 at 10:50:58PM +0900, Michael Paquier wrote: > On Thu, Sep 4, 2014 at 1:44 PM, Fujii Masao wrote: > > On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao wrote: > >> Good catch. So I will remove start_xact code later. > > Attached patch removes start_xact from PSQLexec. > Nothing neg

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

2014-10-13 Thread Tomas Vondra
Hi! On 13.10.2014 09:36, Albe Laurenz wrote: > Tomas Vondra wrote: >> attached is a WIP patch implementing multivariate statistics. > > I think that is pretty useful. > Oracle has an identical feature called "extended statistics". > > That's probably an entirely different thing, but it would be

Re: [HACKERS] On partitioning

2014-10-13 Thread Bruce Momjian
On Mon, Oct 13, 2014 at 04:38:39PM -0300, Alvaro Herrera wrote: > Bruce Momjian wrote: > > On Fri, Aug 29, 2014 at 11:56:07AM -0400, Alvaro Herrera wrote: > > > Prompted by a comment in the UPDATE/LIMIT thread, I saw Marko Tiikkaja > > > reference Tom's post > > > http://www.postgresql.org/message-

Re: [HACKERS] On partitioning

2014-10-13 Thread Alvaro Herrera
Bruce Momjian wrote: > On Fri, Aug 29, 2014 at 11:56:07AM -0400, Alvaro Herrera wrote: > > Prompted by a comment in the UPDATE/LIMIT thread, I saw Marko Tiikkaja > > reference Tom's post > > http://www.postgresql.org/message-id/1598.1399826...@sss.pgh.pa.us > > which mentions the possibility of a d

Re: [HACKERS] postgres_fdw behaves oddly

2014-10-13 Thread Bruce Momjian
Uh, where are we on this patch? --- On Mon, Sep 8, 2014 at 09:30:32PM +0900, Etsuro Fujita wrote: > (2014/09/02 18:55), Etsuro Fujita wrote: > > (2014/09/01 20:15), Etsuro Fujita wrote: > >> While working on [1], I've found

Re: [HACKERS] On partitioning

2014-10-13 Thread Bruce Momjian
On Fri, Aug 29, 2014 at 11:56:07AM -0400, Alvaro Herrera wrote: > Prompted by a comment in the UPDATE/LIMIT thread, I saw Marko Tiikkaja > reference Tom's post > http://www.postgresql.org/message-id/1598.1399826...@sss.pgh.pa.us > which mentions the possibility of a different partitioning > impleme

Re: [HACKERS] Switch pg_basebackup to use -X stream instead of -X fetch by default?

2014-10-13 Thread Bruce Momjian
On Fri, Aug 29, 2014 at 10:37:15PM +0200, Magnus Hagander wrote: > On Fri, Aug 29, 2014 at 10:34 PM, Peter Eisentraut wrote: > > On 8/27/14 2:55 AM, Magnus Hagander wrote: > >> I think the easy way of doing that is to just create an xlog.tar file. > >> Since we already create "base.tar" and possib

Re: [HACKERS] pgbench throttling latency limit

2014-10-13 Thread Gregory Smith
On 10/13/14, 1:54 PM, Heikki Linnakangas wrote: Greg Smith, I'd still appreciate it if you could take a look at this, to check how this will work for pgbench-tools. I'll do a QA pass on the committed version looking for issues, and update the toolchain I publish to be compatible with it along

Re: [HACKERS] Maximum number of WAL files in the pg_xlog directory

2014-10-13 Thread Bruce Momjian
On Mon, Aug 25, 2014 at 07:12:33AM +0200, Guillaume Lelarge wrote: > Le 8 août 2014 09:08, "Guillaume Lelarge" a écrit : > > > > Hi, > > > > As part of our monitoring work for our customers, we stumbled upon an issue > with our customers' servers who have a wal_keep_segments setting higher than >

Re: [HACKERS] Missing IPv6 for pgbuildfarm.org

2014-10-13 Thread Alvaro Herrera
Andrew Dunstan wrote: > > [IPv6 support for buildfarm] > This should now be working. > > The postgresql.org DNS maintainers might like to add this address to > their entries for the server, too: 2604:da00:2:2:5054:ff:fe49:e8e This doesn't reverse-resolve to anything ... can that be fixed? --

Re: [HACKERS] UPSERT wiki page, and SQL MERGE syntax

2014-10-13 Thread Peter Geoghegan
On Mon, Oct 13, 2014 at 7:46 AM, Robert Haas wrote: > Come on. You've had the syntax that way for a while, multiple people > have objected to it, and it didn't get changed. When people renewed > their objections, you said that they were not having a "realistic > conversation". I'm tired of gett

[HACKERS] Commitfest progress, or lack thereof

2014-10-13 Thread Heikki Linnakangas
The August commitfest is still Open, with a few more patches left. The patches that remain have stayed in limbo for a long time. It's not realistic to expect anything to happen to them. I'm going to move the remaining patches to the next commitfest, and close the August one. I hate to do that,

Re: [HACKERS] pgbench throttling latency limit

2014-10-13 Thread Heikki Linnakangas
On 10/09/2014 10:39 PM, Fabien COELHO wrote: One thing bothers me with the log format. Here's an example: 0 81 4621 0 1412881037 912698 3005 0 82 6173 0 1412881037 914578 4304 0 83 skipped 0 1412881037 914578 5217 0 83 skipped 0 1412881037 914578 5099 0 83 4722 0 1412881037 916203 310

Re: [HACKERS] Missing IPv6 for pgbuildfarm.org

2014-10-13 Thread Andrew Dunstan
On 07/10/2014 09:15 AM, Andrew Dunstan wrote: On 07/02/2014 05:08 AM, Torsten Zuehlsdorff wrote: Hello, i've tried to setup a FreeBSD 10 machine as buildfarm-member. But it's an IPv6 only machine and there is no IPv6 for the homepage. Can anyone add support for IPv6 to it? I'm looking

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-10-13 Thread Tom Lane
Andres Freund writes: > Well. Unless I miss something it doesn't resolve the problem that > started this thread. Namely that it's currently impossible to write > regression using EXPLAIN (ANALYZE, TIMING OFF. COSTS OFF). Which is > worthwhile because it allows to tests some behaviour that's only v

Re: [HACKERS] Code bug or doc bug?

2014-10-13 Thread Bruce Momjian
On Wed, Aug 27, 2014 at 06:39:21AM -0700, David G Johnston wrote: > > Is there a doc patch to make here? > > 1. Last sentence change suggestion: "The target tablespace must be empty." > > 2. Based on Robert's comments it sounds like a "You cannot change the > default tablespace of the current dat

Re: [HACKERS] [9.4 bug] The database server hangs with write-heavy workload on Windows

2014-10-13 Thread Heikki Linnakangas
On 10/13/2014 06:26 PM, Andres Freund wrote: On 2014-10-13 17:56:10 +0300, Heikki Linnakangas wrote: So the gist of the problem is that LWLockRelease doesn't wake up LW_WAIT_UNTIL_FREE waiters, when releaseOK == false. It should, because a LW_WAIT_UNTIL FREE waiter is now free to run if the vari

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-10-13 Thread Andres Freund
On 2014-10-13 11:46:16 -0400, Tom Lane wrote: > Robert Haas writes: > > On Sun, Oct 12, 2014 at 11:55 AM, Tom Lane wrote: > >> I have no great objection to making both COSTS OFF and TIMING OFF suppress > >> the "planning time" output, if that's the consensus. I would object to > >> taking away t

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-10-13 Thread Tom Lane
Robert Haas writes: > On Sun, Oct 12, 2014 at 11:55 AM, Tom Lane wrote: >> I have no great objection to making both COSTS OFF and TIMING OFF suppress >> the "planning time" output, if that's the consensus. I would object to >> taking away that behavior of COSTS OFF, because of the implications f

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-10-13 Thread Christoph Berg
Re: Tom Lane 2014-10-12 <19766.1413129...@sss.pgh.pa.us> > Another possibility, which would introduce less non-orthogonality into > the switch design, is to remove the connection to COSTS OFF but say that > planning time is only printed when execution time is also printed (ie, > only in EXPLAIN ANA

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-10-13 Thread Bruce Momjian
On Mon, Oct 13, 2014 at 05:21:32PM +0200, Andres Freund wrote: > > If we have it, we should improve it, or remove it. We might want to use > > this code for something else in the future, so it should be improved > > where feasible. > > Meh. We don't put in effort into code that doesn't matter jus

Re: [HACKERS] bad estimation together with large work_mem generates terrible slow hash joins

2014-10-13 Thread Kevin Grittner
Kevin Grittner wrote: > Since both Heikki and Robert spent time on this patch earlier, > I'll give either of them a shot at committing it if they want; > otherwise I'll do it. Done. Thanks, Tomas! -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent v

Re: [HACKERS] [9.4 bug] The database server hangs with write-heavy workload on Windows

2014-10-13 Thread Andres Freund
On 2014-10-13 17:56:10 +0300, Heikki Linnakangas wrote: > So the gist of the problem is that LWLockRelease doesn't wake up > LW_WAIT_UNTIL_FREE waiters, when releaseOK == false. It should, because a > LW_WAIT_UNTIL FREE waiter is now free to run if the variable has changed in > value, and it won't

Re: [HACKERS] jsonb generator functions

2014-10-13 Thread Andrew Dunstan
On 10/13/2014 09:37 AM, Andrew Dunstan wrote: On 09/26/2014 04:54 PM, Andrew Dunstan wrote: Here is a patch for the generator and aggregate functions for jsonb that we didn't manage to get done in time for 9.4. They are all equivalents of the similarly names json functions. Included are

[HACKERS] pg_get_indexdef() doesn't quote string reloptions

2014-10-13 Thread Eric Ridge
Hi all! I've been working on implementing a custom index using the Index Access Method API and have the need for custom reloptions that are "complex" strings (ie, also contain non-alphaumerics). pg_get_indexdef() and pg_dump don't quote the reloption values, making a restore (or cut-n-paste of

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-10-13 Thread Andres Freund
On 2014-10-13 11:18:26 -0400, Bruce Momjian wrote: > On Mon, Oct 13, 2014 at 04:19:39PM +0200, Andres Freund wrote: > > On 2014-10-13 10:15:29 -0400, Robert Haas wrote: > > > On Sun, Oct 12, 2014 at 5:36 AM, Andres Freund > > > wrote: > > > > IIRC, as pointed out above, it's primarily based on a

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-10-13 Thread Bruce Momjian
On Mon, Oct 13, 2014 at 04:19:39PM +0200, Andres Freund wrote: > On 2014-10-13 10:15:29 -0400, Robert Haas wrote: > > On Sun, Oct 12, 2014 at 5:36 AM, Andres Freund > > wrote: > > > IIRC, as pointed out above, it's primarily based on a misunderstanding > > > about when mmap is used for in dsm. I.

Re: [HACKERS] psql output change in 9.4

2014-10-13 Thread Tom Lane
Bruce Momjian writes: > On Sun, Oct 12, 2014 at 12:17:31AM -0400, Peter Eisentraut wrote: >>> Patch attached. I think this would be for 9.5 only, at this point. >> Funny, I was *just* working on that, too. I propose a patch that >> reverts the output to how it was in 9.3 (without anything in >>

Re: [HACKERS] psql output change in 9.4

2014-10-13 Thread Bruce Momjian
On Sun, Oct 12, 2014 at 12:17:31AM -0400, Peter Eisentraut wrote: > > I went with quoting the pset variable: > > > > test=> \a > > Output format ("format") is aligned. > > test=> \x > > Expanded display ("expanded") is on. > > > > Patch attached. I think this would be for 9.5 onl

Re: [HACKERS] JsonbValue to Jsonb conversion

2014-10-13 Thread Andrew Dunstan
On 10/13/2014 10:39 AM, Pavel Stehule wrote: Hi A JsonSemAction sem is not well initialized a array_element_start is not initialized and enforces sigfault on my comp *** ./utils/adt/jsonb.c.orig2014-10-13 16:37:00.479708142 +0200 --- ./utils/adt/jsonb.c2014-10-13 16:36:33.704650644 +0

Re: [HACKERS] [9.4 bug] The database server hangs with write-heavy workload on Windows

2014-10-13 Thread Robert Haas
On Mon, Oct 13, 2014 at 10:56 AM, Heikki Linnakangas wrote: > I noticed another potential bug: LWLockAcquireCommon doesn't use a volatile > pointer when it sets the value of the protected variable: > >> /* If there's a variable associated with this lock, initialize it >> */ >> if (

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-10-13 Thread Tom Lane
Sean Chittenden writes: > In the same breath, it would also be nice if the following were committed: > [ use named POSIX semaphores on FreeBSD ] Really? Why? According to the notes in our code, named POSIX semaphores are the least attractive of the three Unixoid semaphore APIs we support, becau

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-10-13 Thread Robert Haas
On Sun, Oct 12, 2014 at 11:55 AM, Tom Lane wrote: > Ronan Dunklau writes: >> That wouldn't solve the first problem mentioned, which is that for some >> regression tests one may want to test the costs themselves, which is now >> impossible with the new planning time feature. > > That's a bogus arg

Re: [HACKERS] [9.4 bug] The database server hangs with write-heavy workload on Windows

2014-10-13 Thread Heikki Linnakangas
On 10/13/2014 10:47 AM, Heikki Linnakangas wrote: On 10/10/2014 05:08 PM, MauMau wrote: From: "Craig Ringer" It sounds like they've produced a test case, so they should be able to with a bit of luck. Or even better, send you the test case. I asked the user about this. It sounds like the re

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-10-13 Thread Andres Freund
On 2014-10-13 07:49:44 -0700, Sean Chittenden wrote: > >> Perhaps, but I still see no reason not to apply it. It may not help > >> many people, but it won't hurt anything, either. So why not? > > > > More complicated, less tested code. For no practial benefit, it'll still > > be slower than posi

Re: [HACKERS] JsonbValue to Jsonb conversion

2014-10-13 Thread Pavel Stehule
2014-10-13 15:45 GMT+02:00 Andrew Dunstan : > > On 10/13/2014 06:41 AM, Pavel Stehule wrote: > >> Hi >> >> I am working on review of this patch. >> > > > The patch attached to the message you are replying to was never intended > to be reviewed. It was only given by way of illustration of a techniq

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-10-13 Thread Sean Chittenden
>> Perhaps, but I still see no reason not to apply it. It may not help >> many people, but it won't hurt anything, either. So why not? > > More complicated, less tested code. For no practial benefit, it'll still > be slower than posix shm if there's any memmory pressure. But if you > want to app

Re: [HACKERS] UPSERT wiki page, and SQL MERGE syntax

2014-10-13 Thread Robert Haas
On Fri, Oct 10, 2014 at 4:41 PM, Peter Geoghegan wrote: > On Fri, Oct 10, 2014 at 12:09 PM, Robert Haas wrote: >> I think what's realistic here is that the patch isn't going to get >> committed the way you have it today, because nobody else likes that >> design. That may be harsh, but I think it

Re: [HACKERS] JsonbValue to Jsonb conversion

2014-10-13 Thread Pavel Stehule
Hi A JsonSemAction sem is not well initialized a array_element_start is not initialized and enforces sigfault on my comp *** ./utils/adt/jsonb.c.orig2014-10-13 16:37:00.479708142 +0200 --- ./utils/adt/jsonb.c2014-10-13 16:36:33.704650644 +0200 *** *** 786,791 --- 786,793

Re: [HACKERS] JsonbValue to Jsonb conversion

2014-10-13 Thread Pavel Stehule
2014-10-13 16:19 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > I checked this last version - warning is out, but SIGFAULT on jsonb test > is > > there .. I rechecked it with clang compiler, but result is same > > Stack trace please? > (gdb) bt #0 0x0072 in ?? () #1 0x008

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-10-13 Thread Andres Freund
On 2014-10-13 10:15:29 -0400, Robert Haas wrote: > On Sun, Oct 12, 2014 at 5:36 AM, Andres Freund wrote: > > IIRC, as pointed out above, it's primarily based on a misunderstanding > > about when mmap is used for in dsm. I.e. that it's essentially just a > > fallback/toy implementation and that pos

Re: [HACKERS] JsonbValue to Jsonb conversion

2014-10-13 Thread Tom Lane
Pavel Stehule writes: > I checked this last version - warning is out, but SIGFAULT on jsonb test is > there .. I rechecked it with clang compiler, but result is same Stack trace please? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.

Re: [HACKERS] Proposal : REINDEX SCHEMA

2014-10-13 Thread Robert Haas
On Sun, Oct 12, 2014 at 1:27 PM, Stephen Frost wrote: > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: >> Sawada Masahiko wrote: >> > Attached WIP patch adds new syntax REINEX SCHEMA which does reindexing >> > all table of specified schema. >> > There are syntax dose reindexing specified index

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-10-13 Thread Robert Haas
On Sun, Oct 12, 2014 at 5:36 AM, Andres Freund wrote: > On 2014-10-11 20:33:57 -0400, Bruce Momjian wrote: >> On Tue, Aug 12, 2014 at 07:08:06PM -0400, Robert Haas wrote: >> > On Tue, Aug 12, 2014 at 12:59 PM, Andres Freund >> > wrote: >> > > On 2014-08-12 09:42:30 -0700, Sean Chittenden wrote:

Re: [HACKERS] JsonbValue to Jsonb conversion

2014-10-13 Thread Pavel Stehule
2014-10-13 15:45 GMT+02:00 Andrew Dunstan : > > On 10/13/2014 06:41 AM, Pavel Stehule wrote: > >> Hi >> >> I am working on review of this patch. >> > > > The patch attached to the message you are replying to was never intended > to be reviewed. It was only given by way of illustration of a techniq

Re: [HACKERS] split builtins.h to quote.h

2014-10-13 Thread Robert Haas
On Mon, Oct 13, 2014 at 9:24 AM, Michael Paquier wrote: > That's a 2/2 tie then AFAIK: Noah and Stephen express concerns about > the breakage, you and I would be fine with a clear breakage to make > code more organized (correct me if you don't feel this way). Well, I think that the long-standing

Re: [HACKERS] split builtins.h to quote.h

2014-10-13 Thread Tom Lane
I wrote: > Michael Paquier writes: >> Are you referring to the Datum quote_*(PG_FUNCTION_ARGS) that are >> still let in builtins.h? That was let on purpose to let all the SQL >> functions within builtins.h but I'd be happy to move everything to >> quote.h to make the separation clearer. > I agree

Re: [HACKERS] split builtins.h to quote.h

2014-10-13 Thread Tom Lane
Michael Paquier writes: > On Mon, Oct 13, 2014 at 10:04 PM, Robert Haas wrote: >> No significant advantage will be gained by splitting it out and then >> #including it; nobody's really going to fix their module builds until >> they actually break. >> On the general substance of the issue, our usu

Re: [HACKERS] JsonbValue to Jsonb conversion

2014-10-13 Thread Andrew Dunstan
On 10/13/2014 06:41 AM, Pavel Stehule wrote: Hi I am working on review of this patch. The patch attached to the message you are replying to was never intended to be reviewed. It was only given by way of illustration of a technique. The original patch to be reviewed is on the message

Re: [HACKERS] jsonb generator functions

2014-10-13 Thread Andrew Dunstan
On 09/26/2014 04:54 PM, Andrew Dunstan wrote: Here is a patch for the generator and aggregate functions for jsonb that we didn't manage to get done in time for 9.4. They are all equivalents of the similarly names json functions. Included are to_jsonb jsonb_build_object jsonb_bui

Re: [HACKERS] split builtins.h to quote.h

2014-10-13 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Sat, Oct 11, 2014 at 6:09 PM, Stephen Frost wrote: > > * Noah Misch (n...@leadboat.com) wrote: > >> On Sat, Oct 11, 2014 at 11:43:46PM +0200, Andres Freund wrote: > >> > I personally wouldn't object plaing a #include for the splitof file into > >>

Re: [HACKERS] split builtins.h to quote.h

2014-10-13 Thread Michael Paquier
On Mon, Oct 13, 2014 at 10:04 PM, Robert Haas wrote: > On Sat, Oct 11, 2014 at 6:09 PM, Stephen Frost wrote: >> * Noah Misch (n...@leadboat.com) wrote: >>> On Sat, Oct 11, 2014 at 11:43:46PM +0200, Andres Freund wrote: >>> > I personally wouldn't object plaing a #include for the splitof file into

Re: [HACKERS] Proposal : REINDEX SCHEMA

2014-10-13 Thread Fabrízio de Royes Mello
On Mon, Oct 13, 2014 at 5:39 AM, Sawada Masahiko wrote: > > On Mon, Oct 13, 2014 at 1:25 PM, Fabrízio de Royes Mello > wrote: > > On Sun, Oct 12, 2014 at 2:27 PM, Stephen Frost wrote: > >> > >> * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > >> > Sawada Masahiko wrote: > >> > > Attached WIP

Re: [HACKERS] split builtins.h to quote.h

2014-10-13 Thread Robert Haas
On Sat, Oct 11, 2014 at 6:09 PM, Stephen Frost wrote: > * Noah Misch (n...@leadboat.com) wrote: >> On Sat, Oct 11, 2014 at 11:43:46PM +0200, Andres Freund wrote: >> > I personally wouldn't object plaing a #include for the splitof file into >> > builtin.h to address backward compat concerns. Would

Re: [HACKERS] JsonbValue to Jsonb conversion

2014-10-13 Thread Pavel Stehule
Hi I am working on review of this patch. There is new warnings: jsonb.c: In function ‘jsonb_agg_transfn’: jsonb.c:1540:20: warning: assignment makes pointer from integer without a cast v.val.numeric = DirectFunctionCall1(numeric_uplus, NumericGetDatum(v.val.numeric)); ^

Re: [HACKERS] Sequence Access Method WIP

2014-10-13 Thread Petr Jelinek
Hi, I rewrote the patch with different API along the lines of what was discussed. The API now consists of following functions: sequence_alloc - allocating range of new values The function receives the sequence relation, current value, number of requested values amdata and relevant sequence op

Re: [HACKERS] Is analyze_new_cluster.sh still useful?

2014-10-13 Thread Christoph Berg
Re: Bruce Momjian 2014-10-12 <20141011224002.gm21...@momjian.us> > I have applied a patch to 9.5 to output "./" as a prefix for Unix script > file names. While this also works on Windows, it is likely to be > confusing. The new Unix output is: > > Upgrade Complete >

Re: [HACKERS] tracking commit timestamps

2014-10-13 Thread Petr Jelinek
On 09/09/14 19:05, Petr Jelinek wrote: Hi, I worked bit on this patch to make it closer to committable state. There are several bugs fixed, including ones mentioned by Jamie (writing WAL during recovery). Also support for pg_resetxlog/pg_upgrade has been implemented by Andres. I added simple

Re: [HACKERS] Proposal : REINDEX SCHEMA

2014-10-13 Thread Sawada Masahiko
On Mon, Oct 13, 2014 at 1:25 PM, Fabrízio de Royes Mello wrote: > On Sun, Oct 12, 2014 at 2:27 PM, Stephen Frost wrote: >> >> * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: >> > Sawada Masahiko wrote: >> > > Attached WIP patch adds new syntax REINEX SCHEMA which does reindexing >> > > all tab

Re: [HACKERS] [9.4 bug] The database server hangs with write-heavy workload on Windows

2014-10-13 Thread Heikki Linnakangas
On 10/10/2014 05:08 PM, MauMau wrote: > From: "Craig Ringer" >> It sounds like they've produced a test case, so they should be able to >> with a bit of luck. >> >> Or even better, send you the test case. > > I asked the user about this. It sounds like the relevant test case consists > of many sc

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

2014-10-13 Thread Albe Laurenz
Tomas Vondra wrote: > attached is a WIP patch implementing multivariate statistics. I think that is pretty useful. Oracle has an identical feature called "extended statistics". That's probably an entirely different thing, but it would be very nice to have statistics to estimate the correlation be