Re: [HACKERS] Identity projection

2012-09-14 Thread Kyotaro HORIGUCHI
Although I said as following, the gain seems a bit larger... I'll recheck the testing conditions... > > Another point here is that the projection code already special-cases > > simple projections, so it's a bit hard to believe that it's as slow as > > you suggest above. I wonder if your test case

Re: [HACKERS] WIP patch: add (PRE|POST)PROCESSOR options to COPY

2012-09-14 Thread Etsuro Fujita
OK I will redesign the function. Thanks everyone for the advice! Best regards, Etsuro Fujita > -Original Message- > From: Andrew Dunstan [mailto:and...@dunslane.net] > Sent: Friday, September 14, 2012 2:27 AM > To: Dimitri Fontaine > Cc: Tom Lane; Etsuro Fujita; pgsql-hackers@postgresql

[HACKERS] Reduce palloc's in numeric operations.

2012-09-14 Thread Kyotaro HORIGUCHI
Hello, I will propose reduce palloc's in numeric operations. The numeric operations are slow by nature, but usually it is not a problem for on-disk operations. Altough the slowdown is enhanced on on-memory operations. I inspcted them and found some very short term pallocs. These palloc's are used

Re: [HACKERS] Cause of recent buildfarm failures on hamerkop

2012-09-14 Thread Magnus Hagander
On Fri, Sep 14, 2012 at 7:02 AM, Tom Lane wrote: > I looked into why buildfarm member hamerkop has been failing regression > tests for the last two months. The symptoms appear consistent with the > theory that the src/test/regress/data/tenk.data test file has been > converted to have DOS style li

Re: [HACKERS] Proof of concept: standalone backend with full FE/BE protocol

2012-09-14 Thread Amit kapila
On Tuesday, September 11, 2012 7:07 PM Amit Kapila wrote: On Monday, September 10, 2012 8:20 PM Amit Kapila wrote: On Sunday, September 09, 2012 1:37 PM Amit Kapila wrote: On Friday, September 07, 2012 11:19 PM Tom Lane wrote: Heikki Linnakangas writes: Would socketpair(2) be simpler?

[HACKERS] Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-09-14 Thread Amit kapila
On Thursday, September 13, 2012 10:57 PM Fujii Masao On Thu, Sep 13, 2012 at 1:22 PM, Amit Kapila wrote: > On Wednesday, September 12, 2012 10:15 PM Fujii Masao > On Wed, Sep 12, 2012 at 8:54 PM, wrote: The following bug has been logged on the website: >>> Bug reference: 7534 >>

Re: [HACKERS] Cause of recent buildfarm failures on hamerkop

2012-09-14 Thread Aidan Van Dyk
On Fri, Sep 14, 2012 at 4:56 AM, Magnus Hagander wrote: >> I assume this means that the git checkout was created with options that >> allowed conversion of text files to \r\n line endings. If we have "text files" that we need to be "binary equivilents" for the purpose of diffing, we should proba

[HACKERS] contrib translations

2012-09-14 Thread Bruce Momjian
Someone asked me about translations for pg_upgrade, and I don't see 'po' directories for any of the contrib tools. Do we not translate contrib stuff? Why? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for ev

Re: [HACKERS] contrib translations

2012-09-14 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of vie sep 14 10:37:18 -0300 2012: > Someone asked me about translations for pg_upgrade, and I don't see 'po' > directories for any of the contrib tools. Do we not translate contrib > stuff? Why? We don't. I don't know the exact reason, but I know that whil

Re: [HACKERS] Minor inheritance/check bug: Inconsistent behavior

2012-09-14 Thread Amit kapila
On Thu, 6 Sep 2012 14:50:05 -0400 Robert Hass wrote: On Tue, Aug 28, 2012 at 6:40 AM, Amit Kapila wrote: >> AFAICT during Update also, it doesn't contain useful. The only chance it >> would have contain something useful is when it goes for EvalPlanQual and >> then again comes to check for cons

Re: [HACKERS] contrib translations

2012-09-14 Thread Bruce Momjian
On Fri, Sep 14, 2012 at 10:59:45AM -0300, Alvaro Herrera wrote: > Excerpts from Bruce Momjian's message of vie sep 14 10:37:18 -0300 2012: > > Someone asked me about translations for pg_upgrade, and I don't see 'po' > > directories for any of the contrib tools. Do we not translate contrib > > stuf

[HACKERS] Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries.

2012-09-14 Thread Devrim GUNDUZ
Hi, Does this mean we need to wrap new tarballs soon, because of the data loss bug? Regards, Devrim 14 Eylül 2012, Cuma, 4:42 pm tarihinde, Robert Haas yazmış: > Properly set relpersistence for fake relcache entries. > > This can result in buffers failing to be properly flushed at > checkpoint

Re: [HACKERS] Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries.

2012-09-14 Thread Tom Lane
"Devrim GUNDUZ" writes: > Does this mean we need to wrap new tarballs soon, because of the data loss > bug? I'll defer to Robert on whether this bug is serious enough to merit a near-term release on its own. But historically, we've wanted to push out a .1 update two or three weeks after a .0 rel

Re: [HACKERS] Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries.

2012-09-14 Thread Simon Riggs
On 14 September 2012 17:28, Tom Lane wrote: > "Devrim GUNDUZ" writes: >> Does this mean we need to wrap new tarballs soon, because of the data loss >> bug? > > I'll defer to Robert on whether this bug is serious enough to merit a > near-term release on its own. But historically, we've wanted to

[HACKERS] Closing CF 2012-06

2012-09-14 Thread Noah Misch
According to the CommitFest site, 2012-06 is still in progress with four unresolved patches. With CF 2012-09 scheduled to start tomorrow, let's get it closed. I propose changing two patches from Waiting on Author to Returned with Feedback and moving the other two to CF 2012-09. -- Sent via pgs

Re: [HACKERS] Closing CF 2012-06

2012-09-14 Thread Peter Geoghegan
On 14 September 2012 18:47, Noah Misch wrote: > According to the CommitFest site, 2012-06 is still in progress with four > unresolved patches. With CF 2012-09 scheduled to start tomorrow, let's get it > closed. I propose changing two patches from Waiting on Author to Returned > with Feedback and

[HACKERS] Plan cache and name space behavior in 9.2

2012-09-14 Thread Hitoshi Harada
I came across a new behavior in 9.2 with nested plpgsql functions and temporary table. create or replace function chck(tname text) returns void as $$ declare cnt int; begin select count(*) from pg_attribute where attrelid = tname::regclass::oid into cnt; end; $$ language plpgsql; create o

Re: [HACKERS] embedded list v2

2012-09-14 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of vie sep 14 14:22:18 -0300 2012: > > Here's an updated version of both patches, as well as a third patch that > converts the cc_node list link in catcache.c into an slist. One thing I would like more input in, is whether people think it's worthwhile to spl

Re: [HACKERS] Plan cache and name space behavior in 9.2

2012-09-14 Thread Tom Lane
Hitoshi Harada writes: > I expected success in tname::regclass in the function chck(), but it > actually fails for your first run in the session. Really? Not for me. In the example as given, I see success for "call 1" and then an error at "call 2", which is occurring because we're trying to rep

Re: [HACKERS] Plan cache and name space behavior in 9.2

2012-09-14 Thread Hitoshi Harada
On Fri, Sep 14, 2012 at 12:55 PM, Tom Lane wrote: > Hitoshi Harada writes: >> I expected success in tname::regclass in the function chck(), but it >> actually fails for your first run in the session. > > Really? Not for me. > > In the example as given, I see success for "call 1" and then an erro

Re: [HACKERS] embedded list v2

2012-09-14 Thread Tom Lane
Alvaro Herrera writes: > Here's an updated version of both patches, as well as a third patch that > converts the cc_node list link in catcache.c into an slist. There's a lot of stuff here that seems rather unfortunate and/or sloppy. Does it even compile? The 0002 patch refers to a typedef ilist

Re: [HACKERS] contrib translations

2012-09-14 Thread Peter Eisentraut
On 9/14/12 10:13 AM, Bruce Momjian wrote: > On Fri, Sep 14, 2012 at 10:59:45AM -0300, Alvaro Herrera wrote: >> Excerpts from Bruce Momjian's message of vie sep 14 10:37:18 -0300 2012: >>> Someone asked me about translations for pg_upgrade, and I don't see 'po' >>> directories for any of the contrib

Re: [HACKERS] embedded list v2

2012-09-14 Thread Tom Lane
Alvaro Herrera writes: > One thing I would like more input in, is whether people think it's > worthwhile to split dlists and slists into separate files. Thus far > this has been mentioned by three people independently. They're small enough and similar enough that one header and one .c file seem

Re: [HACKERS] Identity projection

2012-09-14 Thread Tom Lane
Kyotaro HORIGUCHI writes: >> This patch seems quite unsafe to me: it's not generally okay for >> a plan node to return a slot that doesn't belong to it, because of >> tuple-lifespan issues. It's possible that Result in particular >> could do that safely, but if so we ought to hack nodeResult.c fo

Re: [HACKERS] Cause of recent buildfarm failures on hamerkop

2012-09-14 Thread Tom Lane
Magnus Hagander writes: > On Fri, Sep 14, 2012 at 7:02 AM, Tom Lane wrote: >> I'm not sure if we should just write this off as pilot error, or if we >> should try to make the regression tests proof against such things. If >> the latter, how exactly? > I don't think we need to make them proof ag

Re: [HACKERS] Cause of recent buildfarm failures on hamerkop

2012-09-14 Thread Tom Lane
Aidan Van Dyk writes: > If we have "text files" that we need to be "binary equivilents" for > the purpose of diffing, we should probably attribute them in git > attributes to make sure they are not considered "text autocrlf'able". > It could be as simple as adding: > *.out-text > *.dat

Re: [HACKERS] embedded list v2

2012-09-14 Thread Alvaro Herrera
Excerpts from Tom Lane's message of vie sep 14 17:48:35 -0300 2012: > Alvaro Herrera writes: > > Here's an updated version of both patches, as well as a third patch that > > converts the cc_node list link in catcache.c into an slist. > > There's a lot of stuff here that seems rather unfortunate a

[HACKERS] [RFC][PATCH] wal decoding, attempt #2

2012-09-14 Thread Andres Freund
Hi, It took me far longer than I planned, its not finished, but time is running out. I would like some feedback that I am not going astray at this point... *I* think the general approach is sound and a good way forward that provides the basic infrastructure for many (all?) of the scenarios we t

[HACKERS] [PATCH 7/8] Make InvalidateSystemCaches public

2012-09-14 Thread Andres Freund
Pieces of this are in commit: make relfilenode lookup (tablespace, relfilenode --- src/backend/utils/cache/inval.c | 2 +- src/include/utils/inval.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c index

[HACKERS] [PATCH 4/8] add simple xlogdump tool

2012-09-14 Thread Andres Freund
--- src/bin/Makefile| 2 +- src/bin/xlogdump/Makefile | 25 src/bin/xlogdump/xlogdump.c | 334 3 files changed, 360 insertions(+), 1 deletion(-) create mode 100644 src/bin/xlogdump/Makefile create mode 100644 src/bin/xlogdump/xlo

[HACKERS] [PATCH 2/8] Add minimal binary heap implementation

2012-09-14 Thread Andres Freund
This is basically untested. --- src/backend/lib/Makefile | 2 +- src/backend/lib/simpleheap.c | 255 +++ src/include/lib/simpleheap.h | 91 +++ 3 files changed, 347 insertions(+), 1 deletion(-) create mode 100644 src/backend/lib/simplehe

Re: [HACKERS] embedded list v2

2012-09-14 Thread Andres Freund
Hi, On Friday, September 14, 2012 10:48:35 PM Tom Lane wrote: > Alvaro Herrera writes: > > Here's an updated version of both patches, as well as a third patch that > > converts the cc_node list link in catcache.c into an slist. > > There's a lot of stuff here that seems rather unfortunate and/or

[HACKERS] [PATCH 3/8] Add support for a generic wal reading facility dubbed XLogReader

2012-09-14 Thread Andres Freund
Features: - streaming reading/writing - filtering - reassembly of records Reusing the ReadRecord infrastructure in situations where the code that wants to do so is not tightly integrated into xlog.c is rather hard and would require changes to rather integral parts of the recovery code which doesn

[HACKERS] WIP checksums patch

2012-09-14 Thread Jeff Davis
This is just a rebased version of the patch by Simon here: http://archives.postgresql.org/message-id/CA +u5nmkw_gbs6qq_y8-rjgl1v7mvw2hwbhartb8lojhnpfx...@mail.gmail.com There are other things I'd like to do, like: * include page# in checksum, and perhaps relfilenode or object OID (but those two

[HACKERS] [PATCH 5/8] Add a new syscache to fetch a pg_class entry via (reltablespace, relfilenode)

2012-09-14 Thread Andres Freund
This patch is problematic because formally indexes used by syscaches needs to be unique, this one is not though because of 0/InvalidOids relfilenode entries for nailed/shared catalog entries. Those values cannot be sensibly queries from the catalog anyway though (the relmapper infrastructure needs

[HACKERS] [PATCH 6/8] Log enough data into the wal to reconstruct logical changes from it if wal_level=logical

2012-09-14 Thread Andres Freund
This adds a new wal_level value 'logical' Missing cases: - heap_multi_insert - primary key changes for updates - no primary key - LOG_NEWPAGE --- src/backend/access/heap/heapam.c| 135 +--- src/backend/access/transam/xlog.c | 1 + src/backend/catalog/i

[HACKERS] [PATCH 1/8] Add embedded list interface (header only)

2012-09-14 Thread Andres Freund
Adds a single and a double linked list which can easily embedded into other datastructures and can be used without any additional allocations. Problematic: It requires USE_INLINE to be used. It could be remade to fallback to to externally defined functions if that is not available but that hardly

[HACKERS] git tree

2012-09-14 Thread Andres Freund
Hi, A last note: A git tree of this is at git://git.postgresql.org/git/users/andresfreund/postgres.git branch xlog- decoding-rebasing-cf2 checkout with: git clone --branch xlog-decoding-rebasing-cf2 git://git.postgresql.org/git/users/andresfreund/postgres.git Webview: http://git.postgresql.

Re: [HACKERS] Closing CF 2012-06

2012-09-14 Thread Noah Misch
On Fri, Sep 14, 2012 at 08:30:47PM +0100, Peter Geoghegan wrote: > On 14 September 2012 18:47, Noah Misch wrote: > > According to the CommitFest site, 2012-06 is still in progress with four > > unresolved patches. With CF 2012-09 scheduled to start tomorrow, let's get > > it > > closed. I propo

Re: [HACKERS] embedded list v2

2012-09-14 Thread Tom Lane
Andres Freund writes: > On Friday, September 14, 2012 10:48:35 PM Tom Lane wrote: >> Instead let's provide a macro for an empty list value, so that you can >> do something like >> static ilist_d_head DatabaseList = EMPTY_DLIST; > I don't think that can work with dlists because they are circular a

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-09-14 Thread Fujii Masao
On Fri, Sep 14, 2012 at 10:01 PM, Amit kapila wrote: > > On Thursday, September 13, 2012 10:57 PM Fujii Masao > On Thu, Sep 13, 2012 at 1:22 PM, Amit Kapila wrote: >> On Wednesday, September 12, 2012 10:15 PM Fujii Masao >> On Wed, Sep 12, 2012 at 8:54 PM, wrote: > The following bug has bee