Re: [HACKERS] Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire

2014-02-03 Thread Fujii Masao
On Sat, Feb 1, 2014 at 7:41 PM, Christian Kruse wrote: > Hi, > > On 01/02/14 02:45, Fujii Masao wrote: > >> LOG: process 33662 still waiting for ShareLock on transaction >> 1011 after 1000.184 ms >> DETAIL: Process holding the lock: 33660. Request queue: 33662. >> [... snip ...] >> L

Re: [HACKERS] Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire

2014-02-03 Thread Christian Kruse
Hi, On 03/02/14 17:59, Fujii Masao wrote: > Since you added errdetail_log_plural(), ISTM that you need to update > sources.sgml. [x] Fixed. > >> While I'm griping, this message isn't even trying to follow the project's > >> message style guidelines. Detail or context messages are supposed to be

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Andres Freund
On 2014-02-03 12:00:40 +0800, Craig Ringer wrote: > I think it's a good thing personally - we shouldn't be exporting every > little internal var in the symbol table. > > If we built with -fvisibility=hidden on 'nix there'd be no need to > complain about commits being on on 'nix then breaking on Wi

Re: [HACKERS] UNION ALL on partitioned tables won't use indices.

2014-02-03 Thread Kyotaro HORIGUCHI
Hello, The attached file "unionall_inh_idx_typ3_v6_20140203.patch" is the new version of this patch fixed the 'whole-row-var' bug. First of all, on second thought about this, > > create table parent (a int, b int); > > create table child () inherits (parent); > > insert into parent values (1,10)

Re: [HACKERS] Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire

2014-02-03 Thread Simon Riggs
On 3 February 2014 10:06, Christian Kruse wrote: > Hi, > > On 03/02/14 17:59, Fujii Masao wrote: >> Since you added errdetail_log_plural(), ISTM that you need to update >> sources.sgml. > > [x] Fixed. > >> >> While I'm griping, this message isn't even trying to follow the project's >> >> message s

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Dave Page
On Sun, Feb 2, 2014 at 3:59 PM, Tom Lane wrote: > Dave Page writes: >> On Sun, Feb 2, 2014 at 1:03 AM, Tom Lane wrote: >>> I think we should give serious consideration to desupporting this >>> combination so that we can get rid of the plague of PGDLLIMPORT >>> marks. > >> No objection here - tho

Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path

2014-02-03 Thread MauMau
From: "Rajeev rastogi" Please find the attached revised patch. Thanks, your patch looks good. I confirmed the following: * Applied cleanly to the latest source tree, and built on Linux and Windows (with MSVC) without any warnings. * Changed to D:\ and ran "pg_ctl register -N pg -D pgdata"

[HACKERS] Re: [review] PostgreSQL Service on Windows does not start if data directory given is relative path

2014-02-03 Thread Rajeev rastogi
On 3rd February 2014, MauMau Wrote: > Thanks, your patch looks good. I confirmed the following: > > * Applied cleanly to the latest source tree, and built on Linux and > Windows (with MSVC) without any warnings. > > * Changed to D:\ and ran "pg_ctl register -N pg -D pgdata", and checked > the

Re: [HACKERS] Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire

2014-02-03 Thread Christian Kruse
Hi Simon, On 03/02/14 10:43, Simon Riggs wrote: > > Singular: > > "The following process is holding the lock: A. The request queue > > consists of: B." > > > > Plural: > > "Following processes are holding the lock: A, B. The request queue > > consists of: C." > > Seems too complex. How about this

Re: [HACKERS] [COMMITTERS] pgsql: Include planning time in EXPLAIN ANALYZE output.

2014-02-03 Thread Robert Haas
On Sun, Feb 2, 2014 at 11:13 AM, Tom Lane wrote: > Peter Geoghegan writes: >> On Wed, Jan 29, 2014 at 1:10 PM, Robert Haas wrote: >>> Include planning time in EXPLAIN ANALYZE output. > >> Isn't it perhaps a little confusing that "Planning time" may well >> exceed "Total runtime"? > > Perhaps s/T

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Tomas Vondra
Hi Oleg, On 3 Únor 2014, 7:53, Oleg Bartunov wrote: > Tomasa, it'd be nice if you use real data in your testing. I'm using a mailing list archive (the benchmark is essentially a simple search engine on top of the archive, implemented using built-in full-text). So I think this is a quite 'real' da

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Robert Haas
On Mon, Feb 3, 2014 at 5:45 AM, Dave Page wrote: > Done: > http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=narwhal&dt=2014-02-03%2009%3A26%3A43 > > It's not happy though :-( Specifically, it says: dlltool --export-all --output-def libpg_buffercachedll.def pg_buffercache_pages.o dllwrap -o pg

Re: [HACKERS] [GENERAL] postgres FDW cost estimation options unrecognized in 9.3-beta1

2014-02-03 Thread Rajni Baliyan
Hi All, Is there any way to automate the archive deletion process. Any script or command in HA setup using pgpool Thanks in advance Best Regards, *Rajni Baliyan | Database - Consultant* *ASHNIK PTE. LTD.*101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M : +65 83858518 T: +65 6438 3

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Jesper Krogh
On 03/02/14 02:44, Tomas Vondra wrote: (2) The question is whether the new patch works fine on rare words. See this for comparison of the patches against HEAD: http://www.fuzzy.cz/tmp/gin/3-rare-words.png http://www.fuzzy.cz/tmp/gin/3-rare-words-new.png and this is the c

Re: [HACKERS] bugfix patch for json_array_elements

2014-02-03 Thread Andrew Dunstan
On 02/02/2014 08:54 PM, Craig Ringer wrote: On 02/03/2014 09:09 AM, Craig Ringer wrote: At a guess, we're looking at a case where a new child context is created at every call, so every MemoryContextResetChildren call has to deal with more child contexts. That would be "yes". After a short run

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Tom Lane
Robert Haas writes: > I assume I should go stick a DLLIMPORT on MainLWLockArray, unless > somebody has another proposal. Hold up awhile. The reason we're resurrecting it is to get a crosscheck on what symbols it thinks need DLLIMPORT that no other platform does. regards,

Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path

2014-02-03 Thread MauMau
From: "Rajeev rastogi" I will update commitFest with the latest patch immediately after sending the mail. OK, done setting the status to ready for committer. Regards MauMau -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://ww

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Tom Lane
Andres Freund writes: > On 2014-02-03 12:00:40 +0800, Craig Ringer wrote: >> I think it's a good thing personally - we shouldn't be exporting every >> little internal var in the symbol table. >> >> If we built with -fvisibility=hidden on 'nix there'd be no need to >> complain about commits being

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Andres Freund
On 2014-02-03 09:13:02 -0500, Tom Lane wrote: > What we need is to make the Windows platform stop thinking that it is > the center of the world, and make it act as much as possible like the > Unix-oid platforms. What about the completely crazy thing of simply redefining export to include the decls

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Craig Ringer
On 02/03/2014 06:37 PM, Andres Freund wrote: > On 2014-02-03 12:00:40 +0800, Craig Ringer wrote: >> I think it's a good thing personally - we shouldn't be exporting every >> little internal var in the symbol table. >> >> If we built with -fvisibility=hidden on 'nix there'd be no need to >> complain

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Andres Freund
On 2014-02-03 22:23:16 +0800, Craig Ringer wrote: > On 02/03/2014 06:37 PM, Andres Freund wrote: > > I think that'd be an exercise in futility. We're not talking about a > > general purpose library here, where I agree -fvisibility=hidden is a > > useful thing, but about the backend. We'd break coun

Re: [HACKERS] pg_basebackup and pg_stat_tmp directory

2014-02-03 Thread Fujii Masao
On Fri, Jan 31, 2014 at 9:29 PM, Fujii Masao wrote: > On Tue, Jan 28, 2014 at 5:51 PM, Magnus Hagander wrote: >> On Tue, Jan 28, 2014 at 6:11 AM, Amit Kapila >> wrote: >>> >>> On Tue, Jan 28, 2014 at 9:26 AM, Fujii Masao >>> wrote: >>> > Hi, >>> > >>> > The files in pg_stat_tmp directory don't

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Tom Lane
Andres Freund writes: > What about the completely crazy thing of simply redefining export to > include the declspec on windows for backend build? That will possibly > blow up the size of the .def files et al a bit, but I have little mercy > with that. You mean "#define extern extern PGDLLIMPORT"

Re: [HACKERS] Postgresql for cygwin - 3rd

2014-02-03 Thread Andrew Dunstan
On 02/01/2014 05:46 PM, Tom Lane wrote: Andrew Dunstan writes: On 02/01/2014 05:12 PM, Marco Atzeri wrote: is it possible the tsearch test never worked on en_US.utf8 but only on C locale ? Yes, that's more or less what I said, I thought. Maybe we need to test this on other Windows systems in

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Alexander Korotkov
On Mon, Jan 27, 2014 at 7:30 PM, Alexander Korotkov wrote: > On Mon, Jan 27, 2014 at 2:32 PM, Alexander Korotkov > wrote: > >> On Sun, Jan 26, 2014 at 8:14 PM, Heikki Linnakangas < >> hlinnakan...@vmware.com> wrote: >> >>> On 01/26/2014 08:24 AM, Tomas Vondra wrote: >>> Hi! On 25.1

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Andres Freund
On 2014-02-03 09:25:57 -0500, Tom Lane wrote: > Andres Freund writes: > > What about the completely crazy thing of simply redefining export to > > include the declspec on windows for backend build? That will possibly > > blow up the size of the .def files et al a bit, but I have little mercy > > w

[HACKERS] Q: How to use indexer api smartly

2014-02-03 Thread amihay gonen
My goal is to implement a new index type base on bitmap index algorithm. I've to main problems : 1. How to get "Target list" - list of columns need to be returned from query on the index. I want to implement index only access , today the indexer api get row-id and then PG retrive the data fro

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Andrew Dunstan
On 02/03/2014 01:13 AM, Peter Geoghegan wrote: On Sun, Feb 2, 2014 at 5:22 PM, Craig Ringer wrote: I'm not a fan of MinGW (gcc) on Windows, it's a right pain. It's also the only open source compiler currently supported for PostgreSQL on Windows - practically the only one available. I don't kno

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Robert Haas
On Mon, Feb 3, 2014 at 9:57 AM, Andrew Dunstan wrote: > It's not so long ago that they were saying they would no longer publish > free-as-in-beer command line compilers at all. The outrage made them change > their minds, but we really can't rely on only Microsoft compilers for > Windows. +1. --

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Tom Lane
Andrew Dunstan writes: > On 02/03/2014 01:13 AM, Peter Geoghegan wrote: >> On Sun, Feb 2, 2014 at 5:22 PM, Craig Ringer wrote: >>> I'm not a fan of MinGW (gcc) on Windows, it's a right pain. It's also >>> the only open source compiler currently supported for PostgreSQL on >>> Windows - practicall

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Robert Haas
On Fri, Jan 31, 2014 at 12:44 PM, Antonin Houska wrote: > In 9.3 I noticed that postmaster considers bgworker crashed (and > therefore tries to restart it) even if it has exited with zero status code. > > I first thought about a patch like the one below, but then noticed that > postmaster.c:bgwork

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Tom Lane
Robert Haas writes: > This is admittedly a weird API, and we've had some discussion of > whether to change it, but I don't know that we've reached any final > conclusion. I'm tempted to propose exactly inverting the current > meaning of exit(0). That is, make it mean "don't restart me, ever, > e

Re: [HACKERS] jsonb and nested hstore

2014-02-03 Thread Merlin Moncure
On Sat, Feb 1, 2014 at 4:20 PM, Andres Freund wrote: > On 2014-01-30 14:07:42 -0500, Andrew Dunstan wrote: >> + >> +shows the functions that >> are >> + available for creating json values. >> + (see ) >> >> >> - >> -JSON Support Functions >> + >> + array_to_json >> + >>

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Tomas Vondra
Hi Alexander, On 3 Únor 2014, 15:31, Alexander Korotkov wrote: > > I found my patch "0005-Ternary-consistent-implementation.patch" to be > completely wrong. It introduces ternary consistent function to opclass, > but > don't uses it, because I forgot to include ginlogic.c change into patch. > So,

Re: [HACKERS] jsonb and nested hstore

2014-02-03 Thread Andres Freund
On 2014-02-03 09:22:52 -0600, Merlin Moncure wrote: > > I lost my stomach (or maybe it was the glass of red) somewhere in the > > middle, but I think this needs a lot of work. Especially the io code > > doesn't seem ready to me. I'd consider ripping out the send/recv code > > for 9.4, that seems th

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Alexander Korotkov
On Thu, Jan 30, 2014 at 8:38 PM, Heikki Linnakangas wrote: > On 01/30/2014 01:53 AM, Tomas Vondra wrote: > >> (3) A file with explain plans for 4 queries suffering ~2x slowdown, >> and explain plans with 9.4 master and Heikki's patches is available >> here: >> >>http://www.fuzzy

Re: [HACKERS] Regression tests failing if not launched on db "regression"

2014-02-03 Thread Robert Haas
On Fri, Jan 31, 2014 at 5:48 PM, Michael Paquier wrote: > On Sat, Feb 1, 2014 at 12:42 AM, Robert Haas wrote: >> On Fri, Jan 31, 2014 at 2:28 AM, Michael Paquier >> wrote: I took a look at this with a view to committing it but on examination I'm not sure this is the best way to proceed

Re: [HACKERS] KNN-GiST with recheck

2014-02-03 Thread Alexander Korotkov
On Tue, Jan 28, 2014 at 9:32 PM, Heikki Linnakangas wrote: > On 01/28/2014 04:12 PM, Alexander Korotkov wrote: > >> On Tue, Jan 28, 2014 at 5:54 PM, Heikki Linnakangas < >> hlinnakan...@vmware.com >> >>> wrote: >>> >> >> 4. (as you mentioned in the other thread: ) It's a modularity violation >>>

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Alexander Korotkov
On Mon, Feb 3, 2014 at 7:24 PM, Tomas Vondra wrote: > On 3 Únor 2014, 15:31, Alexander Korotkov wrote: > > > > I found my patch "0005-Ternary-consistent-implementation.patch" to be > > completely wrong. It introduces ternary consistent function to opclass, > > but > > don't uses it, because I for

Re: [HACKERS] bugfix patch for json_array_elements

2014-02-03 Thread Tom Lane
Andrew Dunstan writes: > On 02/02/2014 08:54 PM, Craig Ringer wrote: >> The attached patch deletes the context after use, bringing performance >> back into line. It should be backpatched to 9.3. > Hmm. I guess I was assuming that the tmp_cxt would be cleaned up at the > end of the function since

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Tomas Vondra
On 3 Únor 2014, 17:08, Alexander Korotkov wrote: > On Mon, Feb 3, 2014 at 7:24 PM, Tomas Vondra wrote: > >> On 3 Únor 2014, 15:31, Alexander Korotkov wrote: >> > >> > I found my patch "0005-Ternary-consistent-implementation.patch" to be >> > completely wrong. It introduces ternary consistent funct

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Robert Haas
On Mon, Feb 3, 2014 at 10:20 AM, Tom Lane wrote: > So > exit(0) - done, permanently > exit(1) - done until restart interval > exit(other) - crash > and there's no way to obtain the "restart immediately" behavior? That's what I was thinking about, yes. Of course, when the

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-02-03 Thread Tom Lane
Andres Freund writes: > On larger, multi-socket, machines, startup takes a fair bit of time. As > I was profiling anyway I looked into it and noticed that just about all > of it is spent in LWLockAssign() called by InitBufferPool(). Starting > with shared_buffers=48GB on the server Nate Boley prov

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Tom Lane
Robert Haas writes: > On Mon, Feb 3, 2014 at 10:20 AM, Tom Lane wrote: >> So >> exit(0) - done, permanently >> exit(1) - done until restart interval >> exit(other) - crash >> and there's no way to obtain the "restart immediately" behavior? > That's what I was thinking about, yes. Of course, whe

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Robert Haas
On Mon, Feb 3, 2014 at 11:29 AM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Feb 3, 2014 at 10:20 AM, Tom Lane wrote: >>> So >>> exit(0) - done, permanently >>> exit(1) - done until restart interval >>> exit(other) - crash >>> and there's no way to obtain the "restart immediately" behavior?

Re: [HACKERS] Backup throttling

2014-02-03 Thread Antonin Houska
On 01/31/2014 06:26 AM, Fujii Masao wrote: >> Is there a good place to define the constant, so that both backend and >> client can use it? I'd say 'include/common' but no existing file seems >> to be appropriate. I'm not sure if it's worth to add a new file there. > > If there is no good place to

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-02-03 Thread Andres Freund
On 2014-02-03 11:22:45 -0500, Tom Lane wrote: > Andres Freund writes: > > On larger, multi-socket, machines, startup takes a fair bit of time. As > > I was profiling anyway I looked into it and noticed that just about all > > of it is spent in LWLockAssign() called by InitBufferPool(). Starting >

Re: [HACKERS] bugfix patch for json_array_elements

2014-02-03 Thread Andrew Dunstan
On 02/03/2014 11:12 AM, Tom Lane wrote: Andrew Dunstan writes: On 02/02/2014 08:54 PM, Craig Ringer wrote: The attached patch deletes the context after use, bringing performance back into line. It should be backpatched to 9.3. Hmm. I guess I was assuming that the tmp_cxt would be cleaned up

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Tom Lane
Robert Haas writes: > On Mon, Feb 3, 2014 at 11:29 AM, Tom Lane wrote: >> Agreed, but after further reflection it seems like if you've declared >> a restart interval, then "done until restart interval" is probably the >> common case. So how about ... > I think what I proposed is better for two

Re: [HACKERS] [PERFORM] encouraging index-only scans

2014-02-03 Thread Robert Haas
On Fri, Jan 31, 2014 at 10:22 PM, Bruce Momjian wrote: > On Thu, Sep 19, 2013 at 02:39:43PM -0400, Robert Haas wrote: >> Right now, whether or not to autovacuum is the rest of a two-pronged >> test. The first prong is based on number of updates and deletes >> relative to table size; that triggers

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Alexander Korotkov
On Mon, Feb 3, 2014 at 8:19 PM, Tomas Vondra wrote: > > > Sometimes test cases are not what we expect. For example: > >> > > >> > =# explain SELECT id FROM messages WHERE body_tsvector @@ > >> > to_tsquery('english','(5alpha1-initdb''d)'); > >> >QU

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Tomas Vondra
On 3 Únor 2014, 19:18, Alexander Korotkov wrote: > On Mon, Feb 3, 2014 at 8:19 PM, Tomas Vondra wrote: > >> > > Sometimes test cases are not what we expect. For example: >> >> > >> >> > =# explain SELECT id FROM messages WHERE body_tsvector @@ >> >> > to_tsquery('english','(5alpha1-initdb''d)');

Re: [HACKERS] [PATCH] pg_sleep(interval)

2014-02-03 Thread Robert Haas
On Sun, Feb 2, 2014 at 4:50 AM, Julien Rouhaud wrote: > It seems like pg_sleep_until() has issues if used within a transaction, as > it uses now() and not clock_timestamp(). Please find attached a patch that > solves this issue. > > For consistency reasons, I also modified pg_sleep_for() to also u

Re: [HACKERS] plpgsql.warn_shadow

2014-02-03 Thread Pavel Stehule
Hello I am not happy from "warnings_as_error" what about "stop_on_warning" instead? second question: should be these errors catchable or uncatchable? When I work on large project, where I had to use some error handler of "EXCEPTION WHEN OTHERS" I found very strange and not useful so all syntax

Re: [HACKERS] plpgsql.warn_shadow

2014-02-03 Thread Marko Tiikkaja
On 2014-02-03 9:17 PM, Pavel Stehule wrote: I am not happy from "warnings_as_error" what about "stop_on_warning" instead? abort_compilation_on_warning? I think if we're not going to make it more clear that warnings are only promoted to errors at CREATE FUNCTION time, we can't do much better

Re: [HACKERS] plpgsql.warn_shadow

2014-02-03 Thread Pavel Stehule
Dne 3.2.2014 21:48 "Marko Tiikkaja" napsal(a): > > On 2014-02-03 9:17 PM, Pavel Stehule wrote: >> >> I am not happy from "warnings_as_error" >> >> what about "stop_on_warning" instead? > > > abort_compilation_on_warning? I think if we're not going to make it more clear that warnings are only prom

[HACKERS] Re: Misaligned BufferDescriptors causing major performance problems on AMD

2014-02-03 Thread Peter Geoghegan
On Sun, Feb 2, 2014 at 7:13 AM, Andres Freund wrote: > Just as reference, we're talking about a performance degradation from > 475963.613865 tps to 197744.913556 in a pgbench -S -cj64 just by setting > max_connections to 90, from 91... That's pretty terrible. > So, I looked into this, and I am f

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

2014-02-03 Thread Jeff Janes
On Sun, Feb 2, 2014 at 6:00 AM, Andres Freund wrote: > > Some background: > The setups that triggered me into working on the patchset didn't really > have a pgbench like workload, the individual queries were/are more > complicated even though it's still an high throughput OLTP workload. And > the

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

2014-02-03 Thread Peter Geoghegan
On Sun, Feb 2, 2014 at 6:00 AM, Andres Freund wrote: > The changed algorithm for lwlock imo is an *algorithmic* improvement, > not one for a particular architecture. The advantage being that locking > a lwlock which is primarily taken in shared mode will never need need to > wait or loop. I agree

Re: [HACKERS] [COMMITTERS] pgsql: Include planning time in EXPLAIN ANALYZE output.

2014-02-03 Thread Peter Geoghegan
On Mon, Feb 3, 2014 at 4:15 AM, Robert Haas wrote: > I'm not really feeling a compelling need to change that. We've been > displaying total runtime - described exactly that way - for many > releases and it's surely is confusing to the novice that the time > reported can be much less than the time

Re: [HACKERS] Re: Misaligned BufferDescriptors causing major performance problems on AMD

2014-02-03 Thread Andres Freund
On 2014-02-03 15:17:13 -0800, Peter Geoghegan wrote: > On Sun, Feb 2, 2014 at 7:13 AM, Andres Freund wrote: > > Just as reference, we're talking about a performance degradation from > > 475963.613865 tps to 197744.913556 in a pgbench -S -cj64 just by setting > > max_connections to 90, from 91... >

Re: [HACKERS] [COMMITTERS] pgsql: Include planning time in EXPLAIN ANALYZE output.

2014-02-03 Thread Tom Lane
Peter Geoghegan writes: > On Mon, Feb 3, 2014 at 4:15 AM, Robert Haas wrote: >> I'm not really feeling a compelling need to change that. We've been >> displaying total runtime - described exactly that way - for many >> releases and it's surely is confusing to the novice that the time >> reported

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-02-03 Thread Andres Freund
On 2014-02-03 11:22:45 -0500, Tom Lane wrote: > Andres Freund writes: > > On larger, multi-socket, machines, startup takes a fair bit of time. As > > I was profiling anyway I looked into it and noticed that just about all > > of it is spent in LWLockAssign() called by InitBufferPool(). Starting >

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-03 Thread Michael Paquier
On Sun, Feb 2, 2014 at 12:07 AM, Andres Freund wrote: > On 2014-02-02 00:04:41 +0900, Michael Paquier wrote: >> On Fri, Dec 13, 2013 at 2:47 AM, Tom Lane wrote: >> > Andres Freund writes: >> >> On 2013-12-12 11:55:51 -0500, Tom Lane wrote: >> >>> I'm not, however, terribly thrilled with the sugg

Re: [HACKERS] [COMMITTERS] pgsql: Include planning time in EXPLAIN ANALYZE output.

2014-02-03 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > The problem I'm having with the way it stands now is that one would > reasonably expect that "Total time" is the total of all times counted > by EXPLAIN, including main plan execution time, trigger firing time, > and now planning time. Since it is not, any

[HACKERS] Proposing pg_hibernate

2014-02-03 Thread Gurjeet Singh
Please find attached the pg_hibernate extension. It is a set-it-and-forget-it solution to enable hibernation of Postgres shared-buffers. It can be thought of as an amalgam of pg_buffercache and pg_prewarm. It uses the background worker infrastructure. It registers one worker process (BufferSaver)

Re: [HACKERS] Failure while inserting parent tuple to B-tree is not fun

2014-02-03 Thread Peter Geoghegan
On Fri, Jan 31, 2014 at 9:09 AM, Heikki Linnakangas wrote: > I refactored the loop in _bt_moveright to, well, not have that bug anymore. > The 'page' and 'opaque' pointers are now fetched at the beginning of the > loop. Did I miss something? I think so, yes. You still aren't assigning the value r

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-03 Thread Tom Lane
Michael Paquier writes: > Please find attached a patch implementing lsn as a datatype, based on > the one Robert wrote a couple of years ago. > Patch contains regression tests as well as a bit of documentation. > Perhaps this is too late for 9.4, so if there are no objections I'll > simply add th

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-03 Thread Michael Paquier
On Tue, Feb 4, 2014 at 10:10 AM, Tom Lane wrote: > Michael Paquier writes: >> Please find attached a patch implementing lsn as a datatype, based on >> the one Robert wrote a couple of years ago. > >> Patch contains regression tests as well as a bit of documentation. >> Perhaps this is too late fo

[HACKERS] Viability of text HISTORY/INSTALL/regression README files (was Re: [COMMITTERS] pgsql: Document a few more regression test hazards.)

2014-02-03 Thread Tom Lane
Robert Haas writes: > On Mon, Feb 3, 2014 at 4:38 PM, Tom Lane wrote: >> guaibasaurus doesn't like this patch: you need to be more careful >> about links, because the regression instructions are supposed to >> compile as a standalone document. > I wonder if these standalone things are really wor

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

2014-02-03 Thread Peter Geoghegan
On Sun, Feb 2, 2014 at 6:00 AM, Andres Freund wrote: > On 2014-02-01 19:47:29 -0800, Peter Geoghegan wrote: >> Here are the results of a benchmark on Nathan Boley's 64-core, 4 >> socket server: >> http://postgres-benchmarks.s3-website-us-east-1.amazonaws.com/amd-4-socket-rwlocks/ > > That's inter

Re: [HACKERS] memory usage of pg_upgrade

2014-02-03 Thread Bruce Momjian
On Mon, Sep 9, 2013 at 07:39:00PM -0400, Bruce Momjian wrote: > > In the case of tablespaces, I should have thought you could keep a > > hash table of the names and just store an entry id in the table > > structure. But that's just my speculation without actually looking > > at the code, so don't

Re: [HACKERS] Regression tests failing if not launched on db "regression"

2014-02-03 Thread Michael Paquier
On Tue, Feb 4, 2014 at 12:49 AM, Robert Haas wrote: > On Fri, Jan 31, 2014 at 5:48 PM, Michael Paquier > wrote: >> The part about the planning parameter looks good, thanks. The places >> used to mention the databases used also makes more sense. Thanks for >> your input. > > OK, committed and back

Re: [HACKERS] [bug fix] postgres.exe fails to start on Windows Server 2012 due to ASLR

2014-02-03 Thread Craig Ringer
On 02/01/2014 09:53 PM, MauMau wrote: > > Not all users use PostgreSQL built by EnterpriseDB, so I think > src\tools\msvc\build.bat should produce modules that are not affected by > ASLR. I completely agree; just saying that any installer can set the key. I'm convinced that setting this flag is

Re: [HACKERS] Prohibit row-security + inheritance in 9.4?

2014-02-03 Thread Craig Ringer
On 01/31/2014 11:24 PM, Yeb Havinga wrote: > On 2014-01-31 16:05, Stephen Frost wrote: >> * Yeb Havinga (y.t.havi...@mgrid.net) wrote: >>> IMHO, there is another way to implement this, other than the >>> procedure to override the child-rel-quals with the ones from the >>> parent. At DDL time, synch

Re: [HACKERS] Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire

2014-02-03 Thread Fujii Masao
On Mon, Feb 3, 2014 at 8:53 PM, Christian Kruse wrote: > Hi Simon, > > On 03/02/14 10:43, Simon Riggs wrote: >> > Singular: >> > "The following process is holding the lock: A. The request queue >> > consists of: B." >> > >> > Plural: >> > "Following processes are holding the lock: A, B. The reques

[HACKERS] Inconsistency between pg_stat_activity and log_duration

2014-02-03 Thread Tatsuo Ishii
I found an interesting inconsistency between pg_stat_activity and log_duration. -[ RECORD 1 ]+--- datid| 16392 datname | test pid | 21815 u

Re: [HACKERS] Triggers on foreign tables

2014-02-03 Thread Noah Misch
On Sun, Feb 02, 2014 at 11:53:51AM +0100, Ronan Dunklau wrote: > Le jeudi 30 janvier 2014 14:05:08 Noah Misch a écrit : > > On Thu, Jan 23, 2014 at 03:17:35PM +0100, Ronan Dunklau wrote: > > > What do you think about this approach ? Is there something I missed which > > > would make it not sustaina

[HACKERS] could not create IPv6 socket (AI_ADDRCONFIG)

2014-02-03 Thread Kyotaro HORIGUCHI
Hello, I have often seen inquiries about an log message from PostgreSQL server. > LOG: could not create IPv6 socket: Address family not supported by protocol This is emitted on ipv6-disabled environment which was available for me by the following steps on CentOS 6.5, - Add 'NETWORKING_IPV6=no'

[HACKERS] Re: Viability of text HISTORY/INSTALL/regression README files (was Re: [COMMITTERS] pgsql: Document a few more regression test hazards.)

2014-02-03 Thread Noah Misch
On Mon, Feb 03, 2014 at 08:48:06PM -0500, Tom Lane wrote: > Robert Haas writes: > > On Mon, Feb 3, 2014 at 4:38 PM, Tom Lane wrote: > >> guaibasaurus doesn't like this patch: you need to be more careful > >> about links, because the regression instructions are supposed to > >> compile as a standa

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Amit Kapila
On Mon, Feb 3, 2014 at 11:36 AM, Tom Lane wrote: > Amit Kapila writes: >> Also as per below link, it seems that PGDLLIMPORT is required for >> exported global variables. >> http://msdn.microsoft.com/en-us/library/8fskxacy(v=vs.80).aspx > > That was what we'd always assumed, but the fact that post

Re: [HACKERS] Viability of text HISTORY/INSTALL/regression README files (was Re: [COMMITTERS] pgsql: Document a few more regression test hazards.)

2014-02-03 Thread Tom Lane
Noah Misch writes: >> Robert Haas writes: >>> I wonder if these standalone things are really worthwhile. > I wonder how difficult it would be to make sufficient link data available when > building the standalone files. There would be no linking per se; we would > just need the referent's text f

Re: [HACKERS] Row-security on updatable s.b. views

2014-02-03 Thread Craig Ringer
On 01/30/2014 04:05 PM, Craig Ringer wrote: > On 01/30/2014 01:25 PM, Craig Ringer wrote: >> On 01/29/2014 09:47 PM, Craig Ringer wrote: >>> https://github.com/ringerc/postgres/compare/rls-9.4-upd-sb-views >>> >>> i.e. https://github.com/ringerc/postgres.git , >>> branch rls-9.4-upd-sb-views >

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-03 Thread Kyotaro HORIGUCHI
Hello, Now I got workable dll thanks for your advice. > I think both the problems are related and the reason is that dsm_demo.dll > is not built properly. > Let us first try to solve your second problem, because I think if > that is solved, you will not face problem-1. Thank you for kindness. I g

Re: [HACKERS] could not create IPv6 socket (AI_ADDRCONFIG)

2014-02-03 Thread Tom Lane
Kyotaro HORIGUCHI writes: > Hello, I have often seen inquiries about an log message from > PostgreSQL server. >> LOG: could not create IPv6 socket: Address family not supported by protocol That's merely a harmless log message. > - hints.ai_flags = AI_PASSIVE; > + hints.ai_flags = AI_PAS

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Tom Lane
Amit Kapila writes: > In the function where it is used, it seems to me that it is setting DateStyle > as ISO if it is not ISO and function configure_remote_session() will set it > to ISO initially. So basically even if the value of DateStyle is junk, it will > just do what we wanted i.e setting it

Re: [HACKERS] Row-security on updatable s.b. views

2014-02-03 Thread Tom Lane
Craig Ringer writes: > I landed up adding a field to RangeTblEntry that keeps track of all the > oids of relations row-security expanded to produce this RTE. When > testing an RTE for row-security policy, this list is checked to see if > the oid of the relation being expanded is already on the lis

Re: [HACKERS] Row-security on updatable s.b. views

2014-02-03 Thread Craig Ringer
On 02/04/2014 03:14 PM, Tom Lane wrote: > Craig Ringer writes: >> I landed up adding a field to RangeTblEntry that keeps track of all the >> oids of relations row-security expanded to produce this RTE. When >> testing an RTE for row-security policy, this list is checked to see if >> the oid of the

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-03 Thread Amit Kapila
On Tue, Feb 4, 2014 at 12:25 PM, Kyotaro HORIGUCHI wrote: > Hello, Now I got workable dll thanks for your advice. > >> I think both the problems are related and the reason is that dsm_demo.dll >> is not built properly. >> Let us first try to solve your second problem, because I think if >> that is