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 christ...@2ndquadrant.com 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

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

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 christ...@2ndquadrant.com 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

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Dave Page
On Sun, Feb 2, 2014 at 3:59 PM, Tom Lane t...@sss.pgh.pa.us wrote: Dave Page dp...@pgadmin.org writes: On Sun, Feb 2, 2014 at 1:03 AM, Tom Lane t...@sss.pgh.pa.us wrote: I think we should give serious consideration to desupporting this combination so that we can get rid of the plague of

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 rajeev.rast...@huawei.com 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

[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 registry

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... Lock

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 t...@sss.pgh.pa.us wrote: Peter Geoghegan p...@heroku.com writes: On Wed, Jan 29, 2014 at 1:10 PM, Robert Haas rh...@postgresql.org wrote: Include planning time in EXPLAIN ANALYZE output. Isn't it perhaps a little confusing that Planning time may well

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'

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Robert Haas
On Mon, Feb 3, 2014 at 5:45 AM, Dave Page dp...@pgadmin.org wrote: Done: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=narwhaldt=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

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

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

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 robertmh...@gmail.com 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.

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 rajeev.rast...@huawei.com 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

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com 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

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

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 about

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 countless

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 masao.fu...@gmail.com wrote: On Tue, Jan 28, 2014 at 5:51 PM, Magnus Hagander mag...@hagander.net wrote: On Tue, Jan 28, 2014 at 6:11 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jan 28, 2014 at 9:26 AM, Fujii Masao masao.fu...@gmail.com

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com 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

Re: [HACKERS] Postgresql for cygwin - 3rd

2014-02-03 Thread Andrew Dunstan
On 02/01/2014 05:46 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net 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

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Alexander Korotkov
On Mon, Jan 27, 2014 at 7:30 PM, Alexander Korotkov aekorot...@gmail.comwrote: On Mon, Jan 27, 2014 at 2:32 PM, Alexander Korotkov aekorot...@gmail.comwrote: 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:

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Andres Freund
On 2014-02-03 09:25:57 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com 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

[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 from

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 cr...@2ndquadrant.com 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

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Robert Haas
On Mon, Feb 3, 2014 at 9:57 AM, Andrew Dunstan and...@dunslane.net 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

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 02/03/2014 01:13 AM, Peter Geoghegan wrote: On Sun, Feb 2, 2014 at 5:22 PM, Craig Ringer cr...@2ndquadrant.com 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

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Robert Haas
On Fri, Jan 31, 2014 at 12:44 PM, Antonin Houska antonin.hou...@gmail.com 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

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] jsonb and nested hstore

2014-02-03 Thread Merlin Moncure
On Sat, Feb 1, 2014 at 4:20 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-01-30 14:07:42 -0500, Andrew Dunstan wrote: + para id=functions-json-table + xref linkend=functions-json-creation-table shows the functions that are + available for creating typejson/type values. +

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, it

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 the

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Alexander Korotkov
On Thu, Jan 30, 2014 at 8:38 PM, Heikki Linnakangas hlinnakan...@vmware.com 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:

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 michael.paqu...@gmail.com wrote: On Sat, Feb 1, 2014 at 12:42 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Jan 31, 2014 at 2:28 AM, Michael Paquier michael.paqu...@gmail.com wrote: I took a look at this with a view to committing it but

Re: [HACKERS] KNN-GiST with recheck

2014-02-03 Thread Alexander Korotkov
On Tue, Jan 28, 2014 at 9:32 PM, Heikki Linnakangas hlinnakan...@vmware.com 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

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Alexander Korotkov
On Mon, Feb 3, 2014 at 7:24 PM, Tomas Vondra t...@fuzzy.cz 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

Re: [HACKERS] bugfix patch for json_array_elements

2014-02-03 Thread Tom Lane
Andrew Dunstan and...@dunslane.net 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

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 t...@fuzzy.cz 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

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Robert Haas
On Mon, Feb 3, 2014 at 10:20 AM, Tom Lane t...@sss.pgh.pa.us 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

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

2014-02-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com 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

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Feb 3, 2014 at 10:20 AM, Tom Lane t...@sss.pgh.pa.us 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

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Robert Haas
On Mon, Feb 3, 2014 at 11:29 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Feb 3, 2014 at 10:20 AM, Tom Lane t...@sss.pgh.pa.us wrote: So exit(0) - done, permanently exit(1) - done until restart interval exit(other) - crash and there's no way to

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 define

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 and...@2ndquadrant.com 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

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 and...@dunslane.net 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

Re: [HACKERS] bgworker crashed or not?

2014-02-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Feb 3, 2014 at 11:29 AM, Tom Lane t...@sss.pgh.pa.us 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

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

2014-02-03 Thread Robert Haas
On Fri, Jan 31, 2014 at 10:22 PM, Bruce Momjian br...@momjian.us 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;

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-03 Thread Alexander Korotkov
On Mon, Feb 3, 2014 at 8:19 PM, Tomas Vondra t...@fuzzy.cz 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)'); QUERY

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 t...@fuzzy.cz 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 rjuju...@gmail.com 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

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 ma...@joh.to 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 promoted

[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 and...@2ndquadrant.com 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

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 and...@2ndquadrant.comwrote: 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

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 and...@2ndquadrant.com 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

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 robertmh...@gmail.com 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

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 and...@2ndquadrant.com 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

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

2014-02-03 Thread Tom Lane
Peter Geoghegan p...@heroku.com writes: On Mon, Feb 3, 2014 at 4:15 AM, Robert Haas robertmh...@gmail.com 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

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 and...@2ndquadrant.com 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

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 and...@2ndquadrant.com wrote: On 2014-02-02 00:04:41 +0900, Michael Paquier wrote: On Fri, Dec 13, 2013 at 2:47 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-12-12 11:55:51 -0500, Tom Lane wrote:

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 hlinnakan...@vmware.com 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

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

2014-02-03 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com 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

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 t...@sss.pgh.pa.us wrote: Michael Paquier michael.paqu...@gmail.com 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

[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 robertmh...@gmail.com writes: On Mon, Feb 3, 2014 at 4:38 PM, Tom Lane t...@sss.pgh.pa.us 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

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 and...@2ndquadrant.com 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/

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 take my

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 robertmh...@gmail.com wrote: On Fri, Jan 31, 2014 at 5:48 PM, Michael Paquier michael.paqu...@gmail.com wrote: The part about the planning parameter looks good, thanks. The places used to mention the databases used also makes more sense. Thanks for

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, synchronize

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 christ...@2ndquadrant.com 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

[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

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 sustainable ?

[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 robertmh...@gmail.com writes: On Mon, Feb 3, 2014 at 4:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: guaibasaurus doesn't like this patch: you need to be more careful about links, because the regression instructions are

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Amit Kapila
On Mon, Feb 3, 2014 at 11:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com 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

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 n...@leadboat.com writes: Robert Haas robertmh...@gmail.com 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

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 (subject to

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 got

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

2014-02-03 Thread Tom Lane
Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp 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; +

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-03 Thread Tom Lane
Amit Kapila amit.kapil...@gmail.com 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

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

2014-02-03 Thread Tom Lane
Craig Ringer cr...@2ndquadrant.com 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

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 cr...@2ndquadrant.com 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

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 horiguchi.kyot...@lab.ntt.co.jp 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,