Re: [HACKERS] [PATCH] pg_upgrade: support for btrfs copy-on-write clones

2013-11-15 Thread Heikki Linnakangas
On 05.10.2013 16:57, Oskari Saarenmaa wrote: 05.10.2013 16:38, Bruce Momjian kirjoitti: On Fri, Oct 4, 2013 at 10:42:46PM +0300, Oskari Saarenmaa wrote: Thanks for the offers, but it looks like ZFS doesn't actually implement a similar file level clone operation. See

Re: [HACKERS] init_sequence spill to hash table

2013-11-15 Thread Andres Freund
On 2013-11-15 14:22:30 +1300, David Rowley wrote: On Fri, Nov 15, 2013 at 3:12 AM, Andres Freund and...@2ndquadrant.comwrote: Hi, On 2013-11-13 22:55:43 +1300, David Rowley wrote: Here http://www.postgresql.org/message-id/24278.1352922...@sss.pgh.pa.usthere was some talk about

Re: [HACKERS] init_sequence spill to hash table

2013-11-15 Thread Andres Freund
On 2013-11-15 19:12:15 +1300, David Rowley wrote: On Fri, Nov 15, 2013 at 3:23 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: I think it'd be a better idea to integrate the sequence caching logic into the relcache. There's a comment about it: *

[HACKERS] Cannot allocate memory

2013-11-15 Thread Heng Zhi Feng (zh...@hsr.ch)
Hi, We have a problem where PostgreSQL will restart or shutdown when calling it through PDAL write filter. This was after we applied pgtune on the postgresql.conf. These are the settings on the machine: Virtual Machine - Ubuntu 13.10 1.92GB Memory 2 Parallel Processors And these are the

Re: [HACKERS] Logging WAL when updating hintbit

2013-11-15 Thread Sawada Masahiko
On Thu, Nov 14, 2013 at 7:51 PM, Florian Weimer fwei...@redhat.com wrote: On 11/14/2013 07:02 AM, Sawada Masahiko wrote: I attached patch adds new wal_level 'all'. Shouldn't this be a separate setting? It's useful for storage which requires rewriting a partially written sector before it

Re: [HACKERS] init_sequence spill to hash table

2013-11-15 Thread Heikki Linnakangas
On 15.11.2013 07:47, David Rowley wrote: On Fri, Nov 15, 2013 at 3:03 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote I think that means that we should just completely replace the list with the hash table. The difference with a small N is lost in noise, so there's no point in keeping the

Re: [HACKERS] init_sequence spill to hash table

2013-11-15 Thread Andres Freund
On 2013-11-15 12:31:54 +0200, Heikki Linnakangas wrote: On 15.11.2013 07:47, David Rowley wrote: On Fri, Nov 15, 2013 at 3:03 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote I think that means that we should just completely replace the list with the hash table. The difference with a

Re: [HACKERS] init_sequence spill to hash table

2013-11-15 Thread David Rowley
On Fri, Nov 15, 2013 at 11:31 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Thanks, committed with minor copy-editing. I dialed down the initial size of the hash table from 1000 to 16, that ought to be enough. Great. Thanks for commiting. Regards David Rowley - Heikki

Re: [HACKERS] New option for pg_basebackup, to specify a different directory for pg_xlog

2013-11-15 Thread Haribabu kommi
On 14 November 2013 23:59 Fujii Masao wrote: On Thu, Nov 14, 2013 at 9:08 PM, Haribabu kommi haribabu.ko...@huawei.com wrote: Please find attached the patch, for adding a new option for pg_basebackup, to specify a different directory for pg_xlog. Sounds good! Here are the review comments:

Re: [HACKERS] The number of character limitation of custom script on pgbench

2013-11-15 Thread Sawada Masahiko
On Wed, Nov 13, 2013 at 10:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On 11/13/13, 6:18 AM, Sawada Masahiko wrote: The function of custom script of pgbench allows only BUFSIZ (i.g.,1024byte) or less as length of a SQL. So I'm thinking following

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

2013-11-15 Thread Simon Riggs
On 14 November 2013 03:41, Amit Kapila amit.kapil...@gmail.com wrote: I have gone through the mail chain of this thread and tried to find the different concerns or open ends for this patch. Not enough. This feature is clearly being suggested as a way to offer Postgres in embedded mode for

Re: [HACKERS] New option for pg_basebackup, to specify a different directory for pg_xlog

2013-11-15 Thread Magnus Hagander
On Fri, Nov 15, 2013 at 12:10 PM, Haribabu kommi haribabu.ko...@huawei.comwrote: On 14 November 2013 23:59 Fujii Masao wrote: On Thu, Nov 14, 2013 at 9:08 PM, Haribabu kommi haribabu.ko...@huawei.com wrote: Please find attached the patch, for adding a new option for pg_basebackup, to

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

2013-11-15 Thread Andres Freund
On 2013-11-15 09:51:28 -0200, Simon Riggs wrote: On 14 November 2013 03:41, Amit Kapila amit.kapil...@gmail.com wrote: I have gone through the mail chain of this thread and tried to find the different concerns or open ends for this patch. Not enough. This feature is clearly being

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

2013-11-15 Thread Dimitri Fontaine
Andres Freund and...@2ndquadrant.com writes: I think fixing single user mode to work halfway reasonable is enough justification for the feature. Having to deal with that when solving critical issues is just embarassing. +1 But: I very, very much agree with the other concerns around this.

Re: [HACKERS] init_sequence spill to hash table

2013-11-15 Thread Heikki Linnakangas
On 15.11.2013 12:44, Andres Freund wrote: On 2013-11-15 12:31:54 +0200, Heikki Linnakangas wrote: On 15.11.2013 07:47, David Rowley wrote: On Fri, Nov 15, 2013 at 3:03 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote I think that means that we should just completely replace the list with

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

2013-11-15 Thread Simon Riggs
On 15 November 2013 09:00, Andres Freund and...@2ndquadrant.com wrote: This should be a patch to fix single user mode, not one to make postgres into a single process database. +1 -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training

Re: [HACKERS] [PATCH] Use MAP_HUGETLB where supported (v3)

2013-11-15 Thread Heikki Linnakangas
On 30.10.2013 19:11, Andres Freund wrote: On 2013-10-30 22:39:20 +0530, Abhijit Menon-Sen wrote: At 2013-10-30 11:04:36 -0400, t...@sss.pgh.pa.us wrote: As a compromise, perhaps we can unconditionally round the size up to be a multiple of 2MB? […] That sounds reasonably painless to me.

Re: [HACKERS] LISTEN / NOTIFY enhancement request for Postgresql

2013-11-15 Thread Pavel Golub
Hello, Dimitri. You wrote: DF Bruce Momjian br...@momjian.us writes: • is used to separate names in a path • * is used to match any name in a path • is used to recursively match any destination starting from this name For example using the example above, these subscriptions are

Re: [HACKERS] [PATCH] SQL assertions prototype

2013-11-15 Thread Heikki Linnakangas
On 15.11.2013 05:30, Peter Eisentraut wrote: Various places in the constraint checking code say something like, if we ever implement assertions, here is where it should go. I've been fiddling with filling in those gaps for some time now, and the other day I noticed, hey, this actually kind of

Re: [HACKERS] pg_upgrade misreports full disk

2013-11-15 Thread Robert Haas
On Wed, Nov 13, 2013 at 10:28 AM, Peter Eisentraut pete...@gmx.net wrote: When pg_upgrade encounters a full disk while copying relation files, it reports this as: error while copying relation xyz (...): Success because it doesn't set errno in some error cases. In other places we treat

Re: [HACKERS] [PATCH] Sort contents entries in reference documentation

2013-11-15 Thread Robert Haas
On Wed, Nov 13, 2013 at 4:40 AM, Colin 't Hart colinth...@gmail.com wrote: Hi, While looking at the documentation on SELECT I noticed that the entries in reference.sgml aren't sorted correctly -- psql \h does have them in the correct order. Attached a trivial patch to fix this. Committed

Re: [HACKERS] The number of character limitation of custom script on pgbench

2013-11-15 Thread Alvaro Herrera
Sawada Masahiko escribió: Yes, I also think #2 is good. I will implement the patch. I remember this was recently discussed in the spanish list. Please see this email: http://archives.postgresql.org/message-id/48589.192.168.207.54.1382570043.squir...@webmail.etecsa.cu -- Álvaro Herrera

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Stephen Frost
* Tomas Vondra (t...@fuzzy.cz) wrote: On 15 Listopad 2013, 1:00, David Rowley wrote: more focused on trying to draw a bit of attention to commit 061b88c732952c59741374806e1e41c1ec845d50 which uses strncpy and does not properly set the last byte to 0 afterwards. I think this case could just

Re: [HACKERS] SSL renegotiation

2013-11-15 Thread Alvaro Herrera
So I committed this patch without backpatching anything. There was some discussion about the exact strategy for backpatching the behavior change, but no final agreement; the suggestions were 0. Backpatch as an ERROR. If it causes failures, people is supposed to change their apps or something.

Re: [HACKERS] SSL renegotiation

2013-11-15 Thread Stephen Frost
Alvaro, * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: 1. Don't backpatch the ERROR bit at all, so that if the renegotiation fails we would silently continue just as currently I'm leaning towards the above at this point. I was reminded of this once more because I just saw a spurious

Re: [HACKERS] Race condition in b-tree page deletion

2013-11-15 Thread Peter Eisentraut
On 11/13/13, 11:04 AM, Heikki Linnakangas wrote: Here's a patch implementing this scheme. Compiler warnings: nbtpage.c: In function ‘_bt_pagedel’: nbtpage.c:1695:24: warning: ‘metad’ may be used uninitialized in this function [-Wmaybe-uninitialized] nbtpage.c:1414:18: note: ‘metad’ was

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Kevin Grittner
Tomas Vondra t...@fuzzy.cz wrote: On 15 Listopad 2013, 1:00, David Rowley wrote: more focused on trying to draw a bit of attention to commit 061b88c732952c59741374806e1e41c1ec845d50 which uses strncpy and does not properly set the last byte to 0 afterwards. I think this case could just be

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Andres Freund
On 2013-11-15 09:24:59 -0500, Stephen Frost wrote: * Tomas Vondra (t...@fuzzy.cz) wrote: On 15 Listopad 2013, 1:00, David Rowley wrote: more focused on trying to draw a bit of attention to commit 061b88c732952c59741374806e1e41c1ec845d50 which uses strncpy and does not properly set the

Re: [HACKERS] Turning recovery.conf into GUCs

2013-11-15 Thread Jaime Casanova
On Fri, Nov 15, 2013 at 9:28 AM, Peter Eisentraut pete...@gmx.net wrote: On 11/13/13, 12:17 AM, Jaime Casanova wrote: I have rebased Michael Paquier's patch and did a few changes: * changed standby.enabled filename to recovery.trigger * make archive_command a SIGHUP parameter again * make

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Andres Freund
On 2013-11-15 04:21:50 +0100, Tomas Vondra wrote: Hmm, you mean this piece of code? strncpy(saved_argv0, argv[0], MAXPGPATH); IMHO you're right that's probably broken, unless there's some checking happening before the call. FWIW, argv0 is pretty much guaranteed to be shorter than

Re: [HACKERS] Logging WAL when updating hintbit

2013-11-15 Thread Peter Eisentraut
On 11/14/13, 1:02 AM, Sawada Masahiko wrote: I attached patch adds new wal_level 'all'. Compiler warning: pg_controldata.c: In function ‘wal_level_str’: pg_controldata.c:72:2: warning: enumeration value ‘WAL_LEVEL_ALL’ not handled in switch [-Wswitch] -- Sent via pgsql-hackers mailing

Re: [HACKERS] additional json functionality

2013-11-15 Thread Merlin Moncure
On Thu, Nov 14, 2013 at 1:54 PM, Hannu Krosing ha...@2ndquadrant.com wrote: On 11/14/2013 08:17 PM, Merlin Moncure wrote: On Thu, Nov 14, 2013 at 11:34 AM, David E. Wheeler da...@justatheory.com wrote: On Nov 14, 2013, at 7:07 AM, Merlin Moncure mmonc...@gmail.com wrote: This is exactly what

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: FWIW, argv0 is pretty much guaranteed to be shorter than MAXPGPATH since MAXPGPATH is the longest a path can be, and argv[0] is either the executable's name (if executed via PATH) or the path to the executable. Err, it's the longest that *we*

Re: [HACKERS] Turning recovery.conf into GUCs

2013-11-15 Thread Peter Eisentraut
On 11/13/13, 12:17 AM, Jaime Casanova wrote: I have rebased Michael Paquier's patch and did a few changes: * changed standby.enabled filename to recovery.trigger * make archive_command a SIGHUP parameter again * make restore_command a SIGHUP parameter * rename restore_command variable to

Re: [HACKERS] ERROR during end-of-xact/FATAL

2013-11-15 Thread Robert Haas
On Wed, Nov 13, 2013 at 11:04 AM, Noah Misch n...@leadboat.com wrote: So, in short, ERROR + ERROR*10 = PANIC, but FATAL + ERROR*10 = FATAL. That's bizarre. Quite so. Given that that's where we are, promoting an ERROR during FATAL processing to PANIC doesn't seem like it's losing much; we're

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

2013-11-15 Thread Merlin Moncure
On Fri, Nov 15, 2013 at 6:06 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: But: I very, very much agree with the other concerns around this. This should be a patch to fix single user mode, not one to make postgres into a single process database. It's not, and trying to make it by using

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Andres Freund
On 2013-11-15 09:53:24 -0500, Stephen Frost wrote: * Andres Freund (and...@2ndquadrant.com) wrote: FWIW, argv0 is pretty much guaranteed to be shorter than MAXPGPATH since MAXPGPATH is the longest a path can be, and argv[0] is either the executable's name (if executed via PATH) or the

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: Sure, there can be longer paths, but postgres don't support them. In a *myriad* of places. It's just not worth spending code on it. Just about any of the places that use MAXPGPATH are vulnerable or produce confusing error messages if it's

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Andres Freund
On 2013-11-15 10:04:12 -0500, Stephen Frost wrote: * Andres Freund (and...@2ndquadrant.com) wrote: Sure, there can be longer paths, but postgres don't support them. In a *myriad* of places. It's just not worth spending code on it. Just about any of the places that use MAXPGPATH are

Re: [HACKERS] Turning recovery.conf into GUCs

2013-11-15 Thread Michael Paquier
On Fri, Nov 15, 2013 at 11:38 PM, Jaime Casanova ja...@2ndquadrant.com wrote: those are functions that are no longer used but Josh considered they could become useful before release. i can put them inside #ifdef _NOT_USED_ decorations or just remove them now and if/when we find some use for

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Alvaro Herrera
David Rowley escribió: On Fri, Nov 15, 2013 at 12:33 PM, Tomas Vondra t...@fuzzy.cz wrote: Be careful with 'Name' data type - it's not just a simple string buffer. AFAIK it needs to work with hashing etc. so the zeroing is actually needed here to make sure two values produce the same

Re: [HACKERS] Database disconnection and switch inside a single bgworker

2013-11-15 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: Currently, bgworkers offer the possibility to connect to a given database using BackgroundWorkerInitializeConnection in bgworker.h, but there is actually no way to disconnect from a given database inside the same bgworker process. That's

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: I didn't argue against s/strncpy/strlcpy/. That's clearly a sensible fix. I am arguing about introducing additional code and error messages about it, that need to be translated. And starting doing so in isolationtester of all places. I agree with

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Kevin Grittner
Alvaro Herrera alvhe...@2ndquadrant.com wrote: This code should probably be using namecpy().  Note namecpy() doesn't memset() after strncpy() and has survived the test of time, which strongly suggests that the memset is indeed superfluous. That argument would be more persuasive if I could

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Alvaro Herrera
Kevin Grittner escribió: Alvaro Herrera alvhe...@2ndquadrant.com wrote: This code should probably be using namecpy().  Note namecpy() doesn't memset() after strncpy() and has survived the test of time, which strongly suggests that the memset is indeed superfluous. That argument would

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Andres Freund and...@2ndquadrant.com writes: I didn't argue against s/strncpy/strlcpy/. That's clearly a sensible fix. I am arguing about introducing additional code and error messages about it, that need to be translated. And starting doing so in

Re: [HACKERS] SSL renegotiation

2013-11-15 Thread Andres Freund
On 2013-11-15 10:43:23 -0500, Tom Lane wrote: +1 to waiting awhile. I think if we don't see any problems in HEAD, then back-patching as-is would be the best solution. The other alternatives are essentially acknowledging that you're back-patching something you're afraid isn't production ready.

Re: [HACKERS] SSL renegotiation

2013-11-15 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: So I committed this patch without backpatching anything. ... ... should we wait longer for the new renegotiation code to be more battle-tested? +1 to waiting awhile. I think if we don't see any problems in HEAD, then back-patching as-is would be

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Rod Taylor
I tried again this morning using gin-packed-postinglists-16.patch and gin-fast-scan.6.patch. No crashes during index building. Pg was compiled with debug enabled in both cases. The data is a ~0.1% random sample of production data (10,000,000 records for the test) with the below structure.

Re: [HACKERS] strncpy is not a safe version of strcpy

2013-11-15 Thread Kevin Grittner
Alvaro Herrera alvhe...@2ndquadrant.com wrote: Kevin Grittner escribió: That argument would be more persuasive if I could find any current usage of the namecpy() function anywhere in the source code. Well, its cousin namestrcpy is used in a lot of places.  That one uses a regular C string

Re: [HACKERS] SSL renegotiation

2013-11-15 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-11-15 10:43:23 -0500, Tom Lane wrote: Another reason I'm not in a hurry is that the problem we're trying to solve doesn't seem to be causing real-world trouble. So by awhile, I'm thinking let's let it get through 9.4 beta testing. Well,

Re: [HACKERS] [PATCH] Add transforms feature

2013-11-15 Thread Dimitri Fontaine
Hi, Peter Eisentraut pete...@gmx.net writes: Rebased patch. No changes except that merge conflicts were resolved, and I had to add some Data::Dumper tweaks to the regression tests so that the results came out in consistent order on different versions of Perl. I just spent some time reading

Re: [HACKERS] SSL renegotiation

2013-11-15 Thread Andres Freund
On 2013-11-15 10:58:19 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-11-15 10:43:23 -0500, Tom Lane wrote: Another reason I'm not in a hurry is that the problem we're trying to solve doesn't seem to be causing real-world trouble. So by awhile, I'm thinking

Re: [HACKERS] writable FDWs / update targets confusion

2013-11-15 Thread Albe Laurenz
Tomas Vondra wrote: I'm working on adding write support to one of my FDWs. Adding INSERT went pretty fine, but when adding DELETE/UPDATE I got really confused about how the update targets are supposed to work. My understanding of how it's supposed to work is this: (1)

Re: [HACKERS] Minmax indexes (timings)

2013-11-15 Thread Andres Freund
On 2013-11-15 17:11:46 +0100, Erik Rijkers wrote: I've been messing with minmax indexes some more so here are some results of that. Perhaps someone finds these timings useful. Centos 5.7, 32 GB memory, 2 quadcores. '--prefix=/var/data1/pg_stuff/pg_installations/pgsql.minmax'

Re: [HACKERS] Minmax indexes (timings)

2013-11-15 Thread Kevin Grittner
Erik Rijkers e...@xs4all.nl wrote: Perhaps someone finds these timings useful. '--enable-cassert' Assertions can really distort the timings, and not always equally for all code paths.  Any chance of re-running those tests without that? -- Kevin Grittner EDB: http://www.enterprisedb.com The

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-11-15 Thread Peter Eisentraut
On 11/14/13, 2:50 AM, Amit Kapila wrote: Find the rebased version attached with this mail. Doesn't build: openjade -wall -wno-unused-param -wno-empty -wfully-tagged -D . -D . -c /usr/share/sgml/docbook/stylesheet/dsssl/modular/catalog -d stylesheet.dsl -t sgml -i output-html -V html-index

Re: [HACKERS] Storing pg_stat_statements query texts externally, pg_stat_statements in core

2013-11-15 Thread Peter Eisentraut
On 11/14/13, 3:17 AM, Peter Geoghegan wrote: Attached patch allows pg_stat_statements to store arbitrarily long query texts, using an external, transparently managed lookaside file. Compiler warnings with fortify settings: gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith

Re: [HACKERS] GIN improvements part 1: additional information

2013-11-15 Thread Peter Eisentraut
On 11/14/13, 6:00 AM, Alexander Korotkov wrote: Sorry, I posted buggy version of patch. Attached version is correct. This patch crashes the hstore the pg_trgm regression tests. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Optimize kernel readahead using buffer access strategy

2013-11-15 Thread Peter Eisentraut
On 11/14/13, 7:09 AM, KONDO Mitsumasa wrote: I create a patch that is improvement of disk-read and OS file caches. It can optimize kernel readahead parameter using buffer access strategy and posix_fadvice() in various disk-read situations. Various compiler warnings: tablecmds.c: In function

Re: [HACKERS] GIN improvements part 1: additional information

2013-11-15 Thread Alexander Korotkov
On Fri, Nov 15, 2013 at 8:58 PM, Peter Eisentraut pete...@gmx.net wrote: On 11/14/13, 6:00 AM, Alexander Korotkov wrote: Sorry, I posted buggy version of patch. Attached version is correct. This patch crashes the hstore the pg_trgm regression tests. What exact version did you try 14 or 16?

Re: [HACKERS] Transaction-lifespan memory leak with plpgsql DO blocks

2013-11-15 Thread Yeb Havinga
On 2013-11-14 22:23, Tom Lane wrote: So after some experimentation I came up with version 2, attached. Thanks for looking into this! I currently do not have access to a setup to try the patch. A colleague of mine will look into this next week. Thanks again, Yeb Havinga -- Sent via

Re: [HACKERS] writable FDWs / update targets confusion

2013-11-15 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes: Tom, could you show us a rope if there is one? What is it you actually need to fetch? IIRC, the idea was that most FDWs would do the equivalent of fetching the primary-key columns to use in an update. If that's what you need, then

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Alexander Korotkov
On Fri, Nov 15, 2013 at 6:57 PM, Rod Taylor p...@rbt.ca wrote: I tried again this morning using gin-packed-postinglists-16.patch and gin-fast-scan.6.patch. No crashes. It is about a 0.1% random sample of production data (10,000,000 records) with the below structure. Pg was compiled with

Re: [HACKERS] GIN improvements part 1: additional information

2013-11-15 Thread Peter Eisentraut
On 11/15/13, 12:24 PM, Alexander Korotkov wrote: On Fri, Nov 15, 2013 at 8:58 PM, Peter Eisentraut pete...@gmx.net mailto:pete...@gmx.net wrote: On 11/14/13, 6:00 AM, Alexander Korotkov wrote: Sorry, I posted buggy version of patch. Attached version is correct. This patch

[HACKERS] pre-commit triggers

2013-11-15 Thread Andrew Dunstan
Attached is a patch to provide a new event trigger that will fire on transaction commit. I have tried to make certain that it fires at a sufficiently early stage in the commit process that some of the evils mentioned in previous discussions on this topic aren't relevant. The triggers don't

Re: [HACKERS] Sequence Access Method WIP

2013-11-15 Thread Heikki Linnakangas
On 14.11.2013 22:10, Simon Riggs wrote: On 16 January 2013 00:40, Simon Riggs si...@2ndquadrant.com wrote: SeqAm allows you to specify a plugin that alters the behaviour for sequence allocation and resetting, aimed specifically at clustering systems. New command options on end of statement

Re: [HACKERS] trivial one-off memory leak in guc-file.l ParseConfigFile

2013-11-15 Thread Heikki Linnakangas
On 22.09.2013 22:40, didier wrote: Hi fix a small memory leak in guc-file.l ParseConfigFile AbsoluteConfigLocation() return a strdup string but it's never free or referenced outside ParseConfigFile Courtesy Valgrind and Noah Misch MEMPOOL work. I spotted and fixed this some time ago while

Re: [HACKERS] Sequence Access Method WIP

2013-11-15 Thread Andres Freund
On 2013-11-15 20:08:30 +0200, Heikki Linnakangas wrote: It's pretty hard to review the this without seeing the other implementation you're envisioning to use this API. But I'll try: We've written a distributed sequence implementation against it, so it works at least for that use case. While

Re: [HACKERS] GIN improvements part 1: additional information

2013-11-15 Thread Alexander Korotkov
On Fri, Nov 15, 2013 at 9:56 PM, Peter Eisentraut pete...@gmx.net wrote: On 11/15/13, 12:24 PM, Alexander Korotkov wrote: On Fri, Nov 15, 2013 at 8:58 PM, Peter Eisentraut pete...@gmx.net mailto:pete...@gmx.net wrote: On 11/14/13, 6:00 AM, Alexander Korotkov wrote: Sorry, I

Re: [HACKERS] Sequence Access Method WIP

2013-11-15 Thread Simon Riggs
On 15 November 2013 15:08, Heikki Linnakangas hlinnakan...@vmware.com wrote: I wonder if the level of abstraction is right. That is the big question and not something to shy away from. What is presented is not the first thought, by a long way. Andres' contribution to the patch is mainly around

Re: [HACKERS] Sequence Access Method WIP

2013-11-15 Thread Peter Eisentraut
On 11/14/13, 3:10 PM, Simon Riggs wrote: On 16 January 2013 00:40, Simon Riggs si...@2ndquadrant.com wrote: SeqAm allows you to specify a plugin that alters the behaviour for sequence allocation and resetting, aimed specifically at clustering systems. New command options on end of

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2013-11-15 Thread Peter Eisentraut
On 11/14/13, 9:40 PM, Michael Paquier wrote: Hi all, Please find attached updated patches for the support of REINDEX CONCURRENTLY, renamed 2.0 for the occasion: - 20131114_1_index_drop_comments.patch, patch that updates some comments in index_drop. This updates only a couple of comments in

Re: [HACKERS] Sequence Access Method WIP

2013-11-15 Thread Simon Riggs
On 15 November 2013 15:48, Peter Eisentraut pete...@gmx.net wrote: On 11/14/13, 3:10 PM, Simon Riggs wrote: On 16 January 2013 00:40, Simon Riggs si...@2ndquadrant.com wrote: SeqAm allows you to specify a plugin that alters the behaviour for sequence allocation and resetting, aimed

[HACKERS] Review:Patch: SSL: prefer server cipher order

2013-11-15 Thread Adrian Klaver
First review of the above patch as listed in current CommitFest as well as subsequent ECDH patch in the thread below: http://www.postgresql.org/message-id/1383782378-7342-1-git-send-email-mark...@gmail.com Platform OpenSuse 12.2 Both patches applied cleanly. Configured: ./configure

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Rod Taylor
2%. It's essentially sentence fragments from 1 to 5 words in length. I wasn't expecting it to be much smaller. 10 recent value selections: white vinegar reduce color running vinegar cure uti cane vinegar acidity depends parameter how remedy fir clogged shower use vinegar sensitive skin

Re: [HACKERS] Cannot allocate memory

2013-11-15 Thread Kevin Grittner
Heng Zhi Feng (zh...@hsr.ch) zh...@hsr.ch wrote: Virtual Machine – Ubuntu 13.10 1.92GB Memory 2 Parallel Processors work_mem = 11MB shared_buffers = 448MB max_connections = 80 2013-11-15 11:02:35 CET LOG:  could not fork autovacuum worker process: Cannot allocate memory 2013-11-15

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Alexander Korotkov
On Fri, Nov 15, 2013 at 11:18 PM, Rod Taylor rod.tay...@gmail.com wrote: 2%. It's essentially sentence fragments from 1 to 5 words in length. I wasn't expecting it to be much smaller. 10 recent value selections: white vinegar reduce color running vinegar cure uti cane vinegar acidity

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Rod Taylor
On Fri, Nov 15, 2013 at 2:26 PM, Alexander Korotkov aekorot...@gmail.comwrote: On Fri, Nov 15, 2013 at 11:18 PM, Rod Taylor rod.tay...@gmail.com wrote: 2%. It's essentially sentence fragments from 1 to 5 words in length. I wasn't expecting it to be much smaller. 10 recent value

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Alexander Korotkov
On Fri, Nov 15, 2013 at 11:39 PM, Rod Taylor rod.tay...@gmail.com wrote: On Fri, Nov 15, 2013 at 2:26 PM, Alexander Korotkov aekorot...@gmail.comwrote: On Fri, Nov 15, 2013 at 11:18 PM, Rod Taylor rod.tay...@gmail.comwrote: 2%. It's essentially sentence fragments from 1 to 5 words in

Re: [HACKERS] Review:Patch: SSL: prefer server cipher order

2013-11-15 Thread Marko Kreen
On Fri, Nov 15, 2013 at 11:16:25AM -0800, Adrian Klaver wrote: The description of the GUCs show up in the documentation but I am not seeing the GUCs themselves in postgresql.conf, so I could test no further. It is entirely possible I am missing a step and would appreciate enlightenment.

Re: [HACKERS] additional json functionality

2013-11-15 Thread David E. Wheeler
On Nov 15, 2013, at 6:35 AM, Merlin Moncure mmonc...@gmail.com wrote: Here are the options on the table: 1) convert existing json type to binary flavor (notwithstanding objections) 2) maintain side by side types, one representing binary, one text. unfortunately, i think the text one must get

Re: [HACKERS] pg_dump insert with column names speedup

2013-11-15 Thread Peter Eisentraut
src/bin/pg_dump/pg_dump.c:1604: trailing whitespace. + staticStmt = createPQExpBuffer(); src/bin/pg_dump/pg_dump.c:1612: trailing whitespace. + else src/bin/pg_dump/pg_dump.c:1614: trailing whitespace. +

Re: [HACKERS] Minmax indexes

2013-11-15 Thread Jeff Janes
On Fri, Nov 8, 2013 at 12:11 PM, Alvaro Herrera alvhe...@2ndquadrant.comwrote: Erik Rijkers wrote: On Thu, September 26, 2013 00:34, Erik Rijkers wrote: On Wed, September 25, 2013 22:34, Alvaro Herrera wrote: [minmax-5.patch] I have the impression it's not quite working

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

2013-11-15 Thread Andres Freund
On 2013-11-15 20:47:26 +0100, Andres Freund wrote: Hi, On 2013-09-27 00:55:45 +0200, Andres Freund wrote: So what's todo? The file header tells us: * - revive pure-spinlock implementation * - abstract away atomic ops, we really only need a few. * - CAS * - LOCK XADD * -

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2013-11-15 Thread Andres Freund
Hi, On 2013-11-15 11:40:17 +0900, Michael Paquier wrote: - 20131114_3_reindex_concurrently.patch, providing the core feature. Patch 3 needs to have patch 2 applied first. Regression tests, isolation tests and documentation are included with the patch. Have you addressed my concurrency

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Peter Eisentraut
On 11/14/13, 12:26 PM, Alexander Korotkov wrote: Revised version of patch is attached. This doesn't build: ginget.c: In function ‘scanPage’: ginget.c:1108:2: warning: implicit declaration of function ‘GinDataLeafPageGetPostingListEnd’ [-Wimplicit-function-declaration] ginget.c:1108:9: warning:

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Alexander Korotkov
On Sat, Nov 16, 2013 at 12:10 AM, Peter Eisentraut pete...@gmx.net wrote: On 11/14/13, 12:26 PM, Alexander Korotkov wrote: Revised version of patch is attached. This doesn't build: ginget.c: In function ‘scanPage’: ginget.c:1108:2: warning: implicit declaration of function

Re: [HACKERS] Extra functionality to createuser

2013-11-15 Thread Peter Eisentraut
On 11/14/13, 4:35 PM, Christopher Browne wrote: On Thu, Nov 14, 2013 at 5:41 AM, Sameer Thakur samthaku...@gmail.com wrote: So i think -g option is failing Right you are. I was missing a g: in the getopt_long() call. Attached is a revised patch that handles that.

Re: [HACKERS] Errors on missing pg_subtrans/ files with 9.3

2013-11-15 Thread Robert Haas
On Wed, Nov 13, 2013 at 12:29 PM, J Smith dark.panda+li...@gmail.com wrote: Looks like we got another set of errors overnight. Here's the log file from the errors. (Log file scrubbed slightly to remove private data, but still representative of the problem I believe.) Nov 13 05:34:34 dev

Re: [HACKERS] additional json functionality

2013-11-15 Thread Merlin Moncure
On Fri, Nov 15, 2013 at 1:51 PM, David E. Wheeler da...@justatheory.com wrote: On Nov 15, 2013, at 6:35 AM, Merlin Moncure mmonc...@gmail.com wrote: Here are the options on the table: 1) convert existing json type to binary flavor (notwithstanding objections) 2) maintain side by side types,

Re: [HACKERS] additional json functionality

2013-11-15 Thread Andrew Dunstan
On 11/15/2013 03:25 PM, Merlin Moncure wrote: On Fri, Nov 15, 2013 at 1:51 PM, David E. Wheeler da...@justatheory.com wrote: On Nov 15, 2013, at 6:35 AM, Merlin Moncure mmonc...@gmail.com wrote: Here are the options on the table: 1) convert existing json type to binary flavor

[HACKERS] postgres_fdw, remote triggers and schemas

2013-11-15 Thread Thom Brown
Hi, I've observed an issue whereby a parent table with a trigger that redirects inserts to a child table fails to run the trigger successfully if written to using a foreign table: Example: Database 1: CREATE TABLE parent (id int, content text); CREATE TABLE child () INHERITS (parent); CREATE

Re: [HACKERS] additional json functionality

2013-11-15 Thread Merlin Moncure
On Fri, Nov 15, 2013 at 2:37 PM, Andrew Dunstan and...@dunslane.net wrote: On 11/15/2013 03:25 PM, Merlin Moncure wrote: On Fri, Nov 15, 2013 at 1:51 PM, David E. Wheeler da...@justatheory.com wrote: On Nov 15, 2013, at 6:35 AM, Merlin Moncure mmonc...@gmail.com wrote: Here are the

Re: [HACKERS] additional json functionality

2013-11-15 Thread Josh Berkus
On 11/15/2013 12:25 PM, Merlin Moncure wrote: Kinda yes, kinda no. Here's a rough sketch of what I'm thinking: *) 'json' type internally has a binary as well a text representation. The text representation is basically the current type behavior snip long detailed explanation of

Re: [HACKERS] additional json functionality

2013-11-15 Thread Merlin Moncure
On Fri, Nov 15, 2013 at 2:54 PM, Josh Berkus j...@agliodbs.com wrote: On 11/15/2013 12:25 PM, Merlin Moncure wrote: Kinda yes, kinda no. Here's a rough sketch of what I'm thinking: *) 'json' type internally has a binary as well a text representation. The text representation is basically the

Re: [HACKERS] additional json functionality

2013-11-15 Thread Andres Freund
On 2013-11-15 12:54:53 -0800, Josh Berkus wrote: On 11/15/2013 12:25 PM, Merlin Moncure wrote: Kinda yes, kinda no. Here's a rough sketch of what I'm thinking: *) 'json' type internally has a binary as well a text representation. The text representation is basically the current type

Re: [HACKERS] Errors on missing pg_subtrans/ files with 9.3

2013-11-15 Thread J Smith
On Fri, Nov 15, 2013 at 3:21 PM, Robert Haas robertmh...@gmail.com wrote: I think what would help the most is if you could arrange to obtain a stack backtrace at the point when the error is thrown. Maybe put a long sleep call in just before the error happens, and when it gets stuck there,

Re: [HACKERS] postgres_fdw, remote triggers and schemas

2013-11-15 Thread Tom Lane
Thom Brown t...@linux.com writes: I've observed an issue whereby a parent table with a trigger that redirects inserts to a child table fails to run the trigger successfully if written to using a foreign table: That trigger is making unsafe assumptions about what search_path it's run under. If

Re: [HACKERS] pg_dump insert with column names speedup

2013-11-15 Thread David Rowley
On Sat, Nov 16, 2013 at 9:04 AM, Peter Eisentraut pete...@gmx.net wrote: src/bin/pg_dump/pg_dump.c:1604: trailing whitespace. + staticStmt = createPQExpBuffer(); src/bin/pg_dump/pg_dump.c:1612: trailing whitespace. + else

  1   2   >