Re: [HACKERS] Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2013-01-28 Thread Dean Rasheed
On 26 January 2013 10:58, Pavel Stehule pavel.steh...@gmail.com wrote: updated patches due changes for better variadic any function. apply fix_mixing_positinal_ordered_placeholders_warnings_20130126.patch first Hi, No one is listed as a reviewer for this patch so I thought I would take a

Re: [HACKERS] unlogged tables vs. GIST

2013-01-28 Thread Heikki Linnakangas
On 23.01.2013 17:30, Robert Haas wrote: On Wed, Jan 23, 2013 at 4:04 AM, Jeevan Chalke jeevan.cha...@enterprisedb.com wrote: I guess my earlier patch, which was directly incrementing ControlFile-unloggedLSN counter was the concern as it will take ControlFileLock several times. In this version

Re: [HACKERS] pg_ctl promote exit status

2013-01-28 Thread Heikki Linnakangas
On 26.01.2013 23:44, Aaron W. Swenson wrote: On Fri, Jan 25, 2013 at 01:54:06PM -0500, Peter Eisentraut wrote: On 1/12/13 3:30 PM, Aaron W. Swenson wrote: The Linux Standard Base Core Specification 3.1 says this should return '3'. [1] [1]

Re: Review of pg_basebackup and pg_receivexlog to use non-blocking socket communication, was: Re: [HACKERS] Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2013-01-28 Thread Magnus Hagander
On Tue, Jan 22, 2013 at 7:31 AM, Amit Kapila amit.kap...@huawei.com wrote: On Monday, January 21, 2013 6:22 PM Magnus Hagander On Fri, Jan 18, 2013 at 7:50 AM, Amit Kapila amit.kap...@huawei.com wrote: On Wednesday, January 16, 2013 4:02 PM Heikki Linnakangas wrote: On 07.01.2013 16:23,

[HACKERS] Re: logical changeset generation v4 - Heikki's thoughts about the patch state

2013-01-28 Thread Heikki Linnakangas
On 24.01.2013 00:30, Andres Freund wrote: Also, while the apply side surely isn't benchmarkable without any being submitted, the changeset generation can very well be benchmarked. A very, very adhoc benchmark: -c max_wal_senders=10 -c max_logical_slots=10 --disabled for anything but logical

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-01-28 Thread Andres Freund
On 2013-01-27 07:54:43 +0900, Michael Paquier wrote: On Sun, Jan 27, 2013 at 1:52 AM, Andres Freund and...@2ndquadrant.comwrote: On 2013-01-25 13:48:50 +0900, Michael Paquier wrote: As far as I understand that code its purpose is to enforce that all potential users have an up2date

Re: [HACKERS] logical changeset generation v4 - Heikki's thoughts about the patch state

2013-01-28 Thread Andres Freund
On 2013-01-26 16:20:33 -0500, Steve Singer wrote: On 13-01-24 11:15 AM, Steve Singer wrote: On 13-01-24 06:40 AM, Andres Freund wrote: Fair enough. I am also working on a user of this infrastructure but that doesn't help you very much. Steve Singer seemed to make some stabs at writing an

[HACKERS] Number of buckets in a hash join

2013-01-28 Thread Heikki Linnakangas
While testing Alexander's gistchoose patch, perf report showed that the test case spent a surprisingly large amount of CPU time in ExecScanHashBucket. That function just scans a hash bucket for matches, and it should be very quick as long as there are not many collisions. It turns out that

Re: [HACKERS] pg_dump --pretty-print-views

2013-01-28 Thread Jeevan Chalke
Hi Marko, I could not apply the patch with git apply, but able to apply it by patch -p1 command. However, will you please justify the changes done in xml.out ? I guess they are not needed. You might need to configure your sources with libxml. Also, I am not sure about putting

Re: [HACKERS] logical changeset generation v4 - Heikki's thoughts about the patch state

2013-01-28 Thread Andres Freund
Hi, On 2013-01-27 23:07:51 -0500, Steve Singer wrote: A few more comments; In decode.c DecodeDelete + if (r-xl_len = (SizeOfHeapDelete + SizeOfHeapHeader)) + { + elog(DEBUG2, huh, no primary key for a delete on wal_level = logical?); + return; + } + I think we

Re: [HACKERS] logical changeset generation v4

2013-01-28 Thread Andres Freund
On 2013-01-27 12:28:21 -0500, Steve Singer wrote: On 13-01-22 11:30 AM, Andres Freund wrote: Hi, I pushed a new rebased version (the xlogreader commit made it annoying to merge). The main improvements are * way much coherent code internally for intializing logical rep * explicit control

Re: [HACKERS] pg_dump --pretty-print-views

2013-01-28 Thread Marko Tiikkaja
On 1/28/13 12:14 PM, Jeevan Chalke wrote: I could not apply the patch with git apply, but able to apply it by patch -p1 command. IME that's normal for patches that went through filterdiff. I do: git diff |filterdiff --format=context to re-format the patches to the context diff preferred on

Re: [HACKERS] Re: logical changeset generation v4 - Heikki's thoughts about the patch state

2013-01-28 Thread Andres Freund
On 2013-01-28 11:59:52 +0200, Heikki Linnakangas wrote: On 24.01.2013 00:30, Andres Freund wrote: Also, while the apply side surely isn't benchmarkable without any being submitted, the changeset generation can very well be benchmarked. A very, very adhoc benchmark: -c max_wal_senders=10

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-01-28 Thread Michael Paquier
On Mon, Jan 28, 2013 at 7:39 PM, Andres Freund and...@2ndquadrant.comwrote: On 2013-01-27 07:54:43 +0900, Michael Paquier wrote: I think you're misunderstanding how this part works a bit. We don't acquire locks on the table itself, but we get a list of all transactions we would conflict with

Re: [HACKERS] pg_dump --pretty-print-views

2013-01-28 Thread Jan Urbański
On 28/01/13 12:31, Marko Tiikkaja wrote: On 1/28/13 12:14 PM, Jeevan Chalke wrote: I could not apply the patch with git apply, but able to apply it by patch -p1 command. IME that's normal for patches that went through filterdiff. I do: git diff |filterdiff --format=context to re-format the

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-01-28 Thread Andres Freund
Hi, On 2013-01-28 20:31:48 +0900, Michael Paquier wrote: On Mon, Jan 28, 2013 at 7:39 PM, Andres Freund and...@2ndquadrant.comwrote: On 2013-01-27 07:54:43 +0900, Michael Paquier wrote: I think you're misunderstanding how this part works a bit. We don't acquire locks on the table itself,

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-01-28 Thread Michael Paquier
On Mon, Jan 28, 2013 at 8:44 PM, Andres Freund and...@anarazel.de wrote: Another argument that would be enough for a rejection of this patch by a committer is the problem of invalid toast indexes that cannot be removed up cleanly by an operator. As long as there is not a clean solution for

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-01-28 Thread Andres Freund
On 2013-01-28 20:50:21 +0900, Michael Paquier wrote: On Mon, Jan 28, 2013 at 8:44 PM, Andres Freund and...@anarazel.de wrote: Another argument that would be enough for a rejection of this patch by a committer is the problem of invalid toast indexes that cannot be removed up cleanly

[HACKERS] pg_catalog

2013-01-28 Thread Graham Little
Hi, I have tried other sources but to no avail. Could someone please tell me which tables in pg_catalog are effected by creating or dropping a trigger. If there is a work flow diagram or source code location you want to point me to rather than listing them that will be fine also. Some plonker

Re: [HACKERS] pg_catalog

2013-01-28 Thread Fabrízio de Royes Mello
On Mon, Jan 28, 2013 at 10:24 AM, Graham Little graham.lit...@aspone.co.uk wrote: Hi, I have tried other sources but to no avail. Could someone please tell me which tables in pg_catalog are effected by creating or dropping a trigger. If there is a work flow diagram or source code location

Re: [HACKERS] autovacuum not prioritising for-wraparound tables

2013-01-28 Thread Josh Berkus
So I think we need to sort by age(relfrozenxid) in tables that are over the anti-wraparound limit. Given your code that doesn't seem to be that hard? I might also suggest that we think about changing the defaults for wraparound vacuum behavior. Partcularly, the fact that

[HACKERS] Re: Patches for TODO item: Avoid truncating empty OCDR temp tables on COMMIT

2013-01-28 Thread Heikki Linnakangas
On 15.01.2013 21:03, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On the third hand, the fact that a table is OCDR is recorded in backend-local storage somewhere, and that storage (unlike the relcache) had better be reliable. So maybe there's some way to finesse it that way. Hm,

Re: [HACKERS] lazy_vacuum_heap()'s removal of HEAPTUPLE_DEAD tuples

2013-01-28 Thread Pavan Deolasee
On Wed, Jan 23, 2013 at 10:05 AM, Noah Misch n...@leadboat.com wrote: You're the second commentator to be skittish about the patch's correctness, so I won't argue against a conservatism-motivated bounce of the patch. Can you please rebase the patch against the latest head ? I see Alvaro's and

Re: [HACKERS] autovacuum not prioritising for-wraparound tables

2013-01-28 Thread Andres Freund
On 2013-01-29 00:11:12 +1100, Josh Berkus wrote: So I think we need to sort by age(relfrozenxid) in tables that are over the anti-wraparound limit. Given your code that doesn't seem to be that hard? I might also suggest that we think about changing the defaults for wraparound vacuum

Re: [HACKERS] lazy_vacuum_heap()'s removal of HEAPTUPLE_DEAD tuples

2013-01-28 Thread Simon Riggs
On 23 January 2013 04:35, Noah Misch n...@leadboat.com wrote: Also, perhaps we should consider Simon's one-liner fix for backpatching this instead of the original patch you posted? I have no nontrivial preference between the two approaches. Sorry, I didn't see this. I guess you saw I

Re: [HACKERS] Re: Doc patch making firm recommendation for setting the value of commit_delay

2013-01-28 Thread Noah Misch
On Mon, Jan 28, 2013 at 04:48:56AM +, Peter Geoghegan wrote: On 28 January 2013 03:34, Noah Misch n...@leadboat.com wrote: Would you commit to the same git repository the pgbench-tools data for the graphs appearing in that blog post? I couldn't readily tell what was happening below 16

Re: [HACKERS] Strange Windows problem, lock_timeout test request

2013-01-28 Thread Hari Babu
On Saturday, January 19, 2013 11:23 AM Amit kapila wrote: On Saturday, January 19, 2013 4:13 AM Boszormenyi Zoltan wrote: Hi, Unfortunately, I won't have time to do anything with my lock_timeout patch for about 3 weeks. Does anyone have a little spare time to test it on Windows? I shall try

Re: [HACKERS] pg_catalog

2013-01-28 Thread Graham Little
Fabrizio, Thank you very much for your email, I was able to run a script to generate update statements to the tables you mentioned and this has fixed my problem for me. select'UPDATE pg_catalog.pg_class SET reltriggers=' || b.reltriggers-1 || ' WHERE relname=' || || a.table_name ||

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-01-28 Thread Michael Paquier
On Mon, Jan 28, 2013 at 8:59 PM, Andres Freund and...@2ndquadrant.comwrote: On 2013-01-28 20:50:21 +0900, Michael Paquier wrote: On Mon, Jan 28, 2013 at 8:44 PM, Andres Freund and...@anarazel.de wrote: Another argument that would be enough for a rejection of this patch by a

Re: [HACKERS] pg_ctl promote exit status

2013-01-28 Thread Kevin Grittner
Heikki Linnakangas hlinnakan...@vmware.com wrote: Not sure if that LSB section is relevant anyway. It specifies the exit codes for init scripts, but pg_ctl is not an init script. Except that when I went to the trouble of wrapping pg_ctl with an init script which was thoroughly LSB compliant

Re: [HACKERS] Number of buckets in a hash join

2013-01-28 Thread Simon Riggs
On 28 January 2013 10:47, Heikki Linnakangas hlinnakan...@vmware.com wrote: There's also some overhead from empty buckets when scanning the hash table Seems like we should measure that overhead. That way we can plot the cost against number per bucket, which sounds like it has a minima at 1.0,

Re: [HACKERS] pg_ctl promote exit status

2013-01-28 Thread Peter Eisentraut
On 1/26/13 4:44 PM, Aaron W. Swenson wrote: You are right. Had I read a little further down, it seems that the exit status should actually be 7. 7 is OK for not running, but what should we use when the server is not in standby mode? Using the idempotent argument that we are discussing for the

Re: [HACKERS] pg_ctl promote exit status

2013-01-28 Thread Tom Lane
Kevin Grittner kgri...@ymail.com writes: Heikki Linnakangas hlinnakan...@vmware.com wrote: Not sure if that LSB section is relevant anyway. It specifies the exit codes for init scripts, but pg_ctl is not an init script. Except that when I went to the trouble of wrapping pg_ctl with an init

Re: [HACKERS] plpgsql_check_function - rebase for 9.3

2013-01-28 Thread Peter Eisentraut
On 1/26/13 1:53 PM, Tom Lane wrote: [ pokes around... ] Hm, it appears that that does work on Linux, because for some reason we're specifying RTLD_GLOBAL to dlopen(). TBH that seems like a truly horrid idea that we should reconsider. Aside from the danger of unexpected symbol collisions

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Asif Naeem
I am working on reviewing the patch. Patch apply without warning/error on master branch. My findings are as following i.e. 1. Behavior change in pg_ctl return value i.e. * * * Server already running* a. Without Patch inst asif$ ./bin/pg_ctl -D data_test/ -l data_test.log start pg_ctl:

Re: [HACKERS] plpgsql_check_function - rebase for 9.3

2013-01-28 Thread Andrew Dunstan
On 01/28/2013 10:11 AM, Peter Eisentraut wrote: On 1/26/13 1:53 PM, Tom Lane wrote: [ pokes around... ] Hm, it appears that that does work on Linux, because for some reason we're specifying RTLD_GLOBAL to dlopen(). TBH that seems like a truly horrid idea that we should reconsider. Aside from

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Simon Riggs
On 14 January 2013 15:29, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running

Re: [HACKERS] Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2013-01-28 Thread Pavel Stehule
Hello 2013/1/28 Dean Rasheed dean.a.rash...@gmail.com: On 26 January 2013 10:58, Pavel Stehule pavel.steh...@gmail.com wrote: updated patches due changes for better variadic any function. apply fix_mixing_positinal_ordered_placeholders_warnings_20130126.patch first Hi, No one is listed

Re: [HACKERS] autovacuum not prioritising for-wraparound tables

2013-01-28 Thread Kevin Grittner
Andres Freund and...@2ndquadrant.com wrote: On 2013-01-29 00:11:12 +1100, Josh Berkus wrote: So I think we need to sort by age(relfrozenxid) in tables that are over the anti-wraparound limit. Given your code that doesn't seem to be that hard? I might also suggest that we think about

Re: [HACKERS] [PATCH] pg_isready (was: [WIP] pg_ping utility)

2013-01-28 Thread Fujii Masao
On Mon, Jan 28, 2013 at 4:47 AM, Phil Sorber p...@omniti.com wrote: On Sun, Jan 27, 2013 at 2:38 PM, Phil Sorber p...@omniti.com wrote: On Fri, Jan 25, 2013 at 11:20 AM, Fujii Masao masao.fu...@gmail.com wrote: On Fri, Jan 25, 2013 at 4:10 AM, Phil Sorber p...@omniti.com wrote: On Thu, Jan 24,

Re: [HACKERS] Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2013-01-28 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2013/1/28 Dean Rasheed dean.a.rash...@gmail.com: Starting with the first patch - it issues a new WARNING if the format string contains a mixture of format specifiers with and without parameter indexes (e.g., 'Hello %s, %1$s'). Having thought

Re: [HACKERS] autovacuum not prioritising for-wraparound tables

2013-01-28 Thread Andres Freund
On 2013-01-28 08:15:29 -0800, Kevin Grittner wrote: Andres Freund and...@2ndquadrant.com wrote: On 2013-01-29 00:11:12 +1100, Josh Berkus wrote: So I think we need to sort by age(relfrozenxid) in tables that are over the anti-wraparound limit. Given your code that doesn't seem to be

Re: [HACKERS] [PATCH] pg_isready (was: [WIP] pg_ping utility)

2013-01-28 Thread Phil Sorber
On Mon, Jan 28, 2013 at 11:20 AM, Fujii Masao masao.fu...@gmail.com wrote: Maybe. But I'm not inclined to add new libpq interface at this stage. Because we are in the last CommitFest and I'm not sure whether we have enough time to implement that. Instead, how about using both PQconninfoParse()

Re: [HACKERS] Number of buckets in a hash join

2013-01-28 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: The first question is, why do we aim at 10 tuples per bucket? I see nothing particularly wrong with that. The problem here is with having 1000 tuples per bucket. Ideally, the planner would always make a good guess the number of rows, but

Re: [HACKERS] in-catalog Extension Scripts and Control parameters (templates?)

2013-01-28 Thread Dimitri Fontaine
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Please find attached a new version of the patch, answering to most of your reviewing points. I'll post another version shortly with support for pg_dump and alter owner/rename. So, as far as pg_dump is concerned, I have a trick question here. We

Re: [HACKERS] Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2013-01-28 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Both. If we had done this when we first implemented format(), it'd be fine, but it's too late to change it now. There very likely are applications out there that depend on the current behavior. As Dean says, it's not incompatible with SUS, just a

Re: [HACKERS] WIP: index support for regexp search

2013-01-28 Thread Alexander Korotkov
On Sun, Jan 27, 2013 at 10:40 PM, Alexander Korotkov aekorot...@gmail.comwrote: Now I'm working on additional comments. Some comments were added for addKey and addArc(s). I hope they clarify something. -- With best regards, Alexander Korotkov. trgm-regexp-0.12.patch.gz Description: GNU

Re: [HACKERS] enhanced error fields

2013-01-28 Thread Tom Lane
A couple more things about this patch ... I went back through the thread and reviewed all the angst about which fields to provide, especially whether we need CONSTRAINT_SCHEMA. I agree with the conclusion that we don't. It's in the spec because the spec supposes that

Re: [HACKERS] [PATCH] pg_isready (was: [WIP] pg_ping utility)

2013-01-28 Thread Alvaro Herrera
Phil Sorber escribió: On Mon, Jan 28, 2013 at 11:20 AM, Fujii Masao masao.fu...@gmail.com wrote: Maybe. But I'm not inclined to add new libpq interface at this stage. Because we are in the last CommitFest and I'm not sure whether we have enough time to implement that. Instead, how about

Re: [HACKERS] [PATCH] pg_isready (was: [WIP] pg_ping utility)

2013-01-28 Thread Phil Sorber
On Mon, Jan 28, 2013 at 1:12 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Phil Sorber escribió: On Mon, Jan 28, 2013 at 11:20 AM, Fujii Masao masao.fu...@gmail.com wrote: Maybe. But I'm not inclined to add new libpq interface at this stage. Because we are in the last CommitFest and I'm

Re: [HACKERS] in-catalog Extension Scripts and Control parameters (templates?)

2013-01-28 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Now that I've written this in that email, I think I'm going to go for the new command. But maybe we have some precedent for objects that we list in pg_dump only for solving several steps dependency lookups? Yes, pg_dump has lots of objects that

Re: [HACKERS] SYSV shared memory vs mmap performance

2013-01-28 Thread YAMAMOTO Takashi
hi, I'm less optimistic on the NetBSD front: even though I reported major show-stopper bugs (system died under load and was unable to complete a pgbench run), no one seemed to care. can you give me a pointer? YAMAMOTO Takashi -- Sent via pgsql-hackers mailing list

Re: [HACKERS] SYSV shared memory vs mmap performance

2013-01-28 Thread Francois Tigeot
Hi, On Mon, Jan 28, 2013 at 03:27:28PM +, YAMAMOTO Takashi wrote: can you give me a pointer? This bug report for a start: http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46833 This is the only one I've filled; I also remember having irc discussions with some netbsd developers

Re: [HACKERS] enhanced error fields

2013-01-28 Thread Pavel Stehule
2013/1/28 Tom Lane t...@sss.pgh.pa.us: A couple more things about this patch ... I went back through the thread and reviewed all the angst about which fields to provide, especially whether we need CONSTRAINT_SCHEMA. I agree with the conclusion that we don't. It's in the spec because the

Re: [HACKERS] proposal - assign result of query to psql variable

2013-01-28 Thread Pavel Stehule
Hello 2013/1/26 Tom Lane t...@sss.pgh.pa.us: Andrew Dunstan and...@dunslane.net writes: +1. This looks quite nifty. Maybe useful too to have a default prefix via some setting. Meh. I would expect that \gset :foo would work to specify a computed prefix if you wanted it --- isn't that

Re: [HACKERS] enhanced error fields

2013-01-28 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2013/1/28 Tom Lane t...@sss.pgh.pa.us: ... The current patch provides sufficient information to uniquely identify a table constraint, but not so much domain constraints. Should we fix that? I think it'd be legitimate to re-use SCHEMA_NAME for

Re: [HACKERS] enhanced error fields

2013-01-28 Thread Pavel Stehule
2013/1/28 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: 2013/1/28 Tom Lane t...@sss.pgh.pa.us: ... The current patch provides sufficient information to uniquely identify a table constraint, but not so much domain constraints. Should we fix that? I think it'd be

Re: [HACKERS] Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2013-01-28 Thread Dean Rasheed
On 28 January 2013 17:32, Stephen Frost sfr...@snowman.net wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Both. If we had done this when we first implemented format(), it'd be fine, but it's too late to change it now. There very likely are applications out there that depend on the current

Re: [HACKERS] Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2013-01-28 Thread Pavel Stehule
2013/1/28 Dean Rasheed dean.a.rash...@gmail.com: On 28 January 2013 17:32, Stephen Frost sfr...@snowman.net wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Both. If we had done this when we first implemented format(), it'd be fine, but it's too late to change it now. There very likely are

Re: [HACKERS] Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2013-01-28 Thread Dean Rasheed
On 28 January 2013 20:40, Pavel Stehule pavel.steh...@gmail.com wrote: 2013/1/28 Dean Rasheed dean.a.rash...@gmail.com: On 28 January 2013 17:32, Stephen Frost sfr...@snowman.net wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Both. If we had done this when we first implemented format(), it'd

Re: [HACKERS] Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2013-01-28 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: On 28 January 2013 20:40, Pavel Stehule pavel.steh...@gmail.com wrote: 2013/1/28 Dean Rasheed dean.a.rash...@gmail.com: flags - not currently implemented. Pavel's second patch adds support for the '-' flag for left justified string output. However,

Re: [HACKERS] Performance Improvement by reducing WAL for Update Operation

2013-01-28 Thread Heikki Linnakangas
On 28.01.2013 15:39, Amit Kapila wrote: Rebased the patch as per HEAD. I don't like the way heap_delta_encode has intimate knowledge of how the lz compression works. It feels like a violent punch through the abstraction layers. Ideally, you would just pass the old and new tuple to pglz as

Re: [HACKERS] [PERFORM] pgbench to the MAXINT

2013-01-28 Thread Gurjeet Singh
On Sat, Jan 26, 2013 at 11:24 PM, Satoshi Nagayasu sn...@uptime.jp wrote: Hi, I have reviewed this patch. https://commitfest.postgresql.org/action/patch_view?id=1068 2012/12/21 Gurjeet Singh singh.gurj...@gmail.com: The patch is very much what you had posted, except for a couple of

Re: [HACKERS] enhanced error fields

2013-01-28 Thread Peter Eisentraut
On 1/5/13 12:48 PM, Peter Geoghegan wrote: is there agreement of routine_name and trigger_name fields? Well, Tom and I are both opposed to including those fields. Peter E seemed to support it in some way, but didn't respond to Tom's criticisms (which were just a restatement of my own). So, it

Re: [HACKERS] logical changeset generation v4 - Heikki's thoughts about the patch state

2013-01-28 Thread Steve Singer
On 13-01-28 06:17 AM, Andres Freund wrote: Hi, 3. Pass the delete (with no key values) onto the replication client and let it deal with it (see 1 and 2) Hm. While I agree that nicer behaviour would be good I think the real enforcement should happen on a higher level, e.g. with event triggers

Re: [HACKERS] enhanced error fields

2013-01-28 Thread Peter Geoghegan
On 28 January 2013 21:33, Peter Eisentraut pete...@gmx.net wrote: Another point, in case someone wants to revisit this in the future, is that these fields were applied in a way that is contrary to the SQL standard, I think. The presented patch interpreted ROUTINE_NAME as: the error happened

Re: [HACKERS] logical changeset generation v4

2013-01-28 Thread Steve Singer
On 13-01-28 06:23 AM, Andres Freund wrote: The CF is also there to find UI warts and such, so something like this seems perfectly fine. Even moreso as it doesn't look this will get into 9.3 anyway. I wanted to add such an option, but I was too lazy^Wbusy to think about the sematics. Your

Re: [HACKERS] error C2011 in Visual Studio 2012

2013-01-28 Thread Andrew Dunstan
On 01/26/2013 12:14 PM, Anderson C. Carniel wrote: Hi, I'm trying to build a. dll file to extend the postgres server with C functions. I'm using visual studio 2012 to build the dll, and PostgreSQL 9.2. I imported all directories postgres \include\server* But I'm having the errors: In

Re: [HACKERS] Event Triggers: adding information

2013-01-28 Thread Christopher Browne
I'm poking at event triggers a bit; would like to set up some examples (and see if they work, or break down badly; both are interesting results) to do some validation of schema for Slony. What I'm basically thinking about is to set up some event triggers that run on DROP TABLE / DROP SEQUENCE,

Re: [HACKERS] Event Triggers: adding information

2013-01-28 Thread Dimitri Fontaine
Christopher Browne cbbro...@gmail.com writes: I'm poking at event triggers a bit; would like to set up some examples (and see if they work, or break down badly; both are interesting results) to do some validation of schema for Slony. Cool, thanks! What I'm basically thinking about is to

Re: [HACKERS] error C2011 in Visual Studio 2012

2013-01-28 Thread Craig Ringer
On 01/27/2013 01:14 AM, Anderson C. Carniel wrote: Hi, I'm trying to build a. dll file to extend the postgres server with C functions. I'm using visual studio 2012 to build the dll, and PostgreSQL 9.2. I imported all directories postgres \include\server* But I'm having the errors:

[HACKERS] Hm, table constraints aren't so unique as all that

2013-01-28 Thread Tom Lane
Over in the thread about enhanced error fields, I claimed that constraints are uniquely named among those associated with a table, or with a domain. But it turns out that that ain't necessarily so, because the code path for index constraints doesn't pay any attention to pre-existing check

Re: [HACKERS] Hm, table constraints aren't so unique as all that

2013-01-28 Thread Peter Geoghegan
On 29 January 2013 00:25, Tom Lane t...@sss.pgh.pa.us wrote: Of course this wouldn't be material for back-patching, but it seems to me there's still time to fix this for 9.3, and we should do so if we want to claim that the enhanced-errors patch uniquely identifies constraints. I can see the

Re: [HACKERS] logical changeset generation v4

2013-01-28 Thread Andres Freund
On 2013-01-28 12:23:02 +0100, Andres Freund wrote: On 2013-01-27 12:28:21 -0500, Steve Singer wrote: On 13-01-22 11:30 AM, Andres Freund wrote: Hi, I pushed a new rebased version (the xlogreader commit made it annoying to merge). The main improvements are * way much coherent

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Bruce Momjian
On Mon, Jan 28, 2013 at 03:40:08PM +, Simon Riggs wrote: On 14 January 2013 15:29, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl

Re: [HACKERS] Enabling Checksums

2013-01-28 Thread Robert Haas
On Sun, Jan 27, 2013 at 5:28 PM, Jeff Davis pg...@j-davis.com wrote: There's a maximum of one FPI per page per cycle, and we need the FPI for any modified page in this design regardless. So, deferring the XLOG_HINT WAL record doesn't change the total number of FPIs emitted. The only savings

Re: [HACKERS] allowing privileges on untrusted languages

2013-01-28 Thread Robert Haas
On Sun, Jan 27, 2013 at 11:15 PM, Craig Ringer cr...@2ndquadrant.com wrote: On 01/28/2013 02:15 AM, Robert Haas wrote: I am not sure whether it's really true that a capability mechanism could never really satisfy anyone. It worked for Linux. I have no concern about using a capabilities

Re: [HACKERS] unlogged tables vs. GIST

2013-01-28 Thread Robert Haas
On Mon, Jan 28, 2013 at 4:04 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Do we need to do anything to unloggedLSN in pg_resetxlog? Does the server go into recovery after pg_resetxlog? If so, no. If not, probably, but I have no idea what. There's no safe value in that case; what we

Re: [HACKERS] Patches for TODO item: Avoid truncating empty OCDR temp tables on COMMIT

2013-01-28 Thread Robert Haas
On Mon, Jan 28, 2013 at 8:39 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 15.01.2013 21:03, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On the third hand, the fact that a table is OCDR is recorded in backend-local storage somewhere, and that storage (unlike the

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Bruce Momjian
On Mon, Jan 28, 2013 at 09:29:35PM -0500, Bruce Momjian wrote: On Mon, Jan 28, 2013 at 03:40:08PM +, Simon Riggs wrote: On 14 January 2013 15:29, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an

Re: [HACKERS] autovacuum not prioritising for-wraparound tables

2013-01-28 Thread Robert Haas
On Sun, Jan 27, 2013 at 2:17 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Fri, Jan 25, 2013 at 9:19 AM, Robert Haas robertmh...@gmail.com wrote: I think that to do this right, we need to consider not only the status quo but the trajectory. For example, suppose we have two tables to process,

Re: [HACKERS] Hm, table constraints aren't so unique as all that

2013-01-28 Thread Tom Lane
Peter Geoghegan peter.geoghega...@gmail.com writes: On 29 January 2013 00:25, Tom Lane t...@sss.pgh.pa.us wrote: Of course this wouldn't be material for back-patching, but it seems to me there's still time to fix this for 9.3, and we should do so if we want to claim that the enhanced-errors

Re: [HACKERS] lazy_vacuum_heap()'s removal of HEAPTUPLE_DEAD tuples

2013-01-28 Thread Noah Misch
On Mon, Jan 28, 2013 at 02:12:33PM +, Simon Riggs wrote: On 23 January 2013 04:35, Noah Misch n...@leadboat.com wrote: Also, perhaps we should consider Simon's one-liner fix for backpatching this instead of the original patch you posted? I have no nontrivial preference between the

Re: [HACKERS] autovacuum not prioritising for-wraparound tables

2013-01-28 Thread Robert Haas
On Mon, Jan 28, 2013 at 8:11 AM, Josh Berkus j...@agliodbs.com wrote: So I think we need to sort by age(relfrozenxid) in tables that are over the anti-wraparound limit. Given your code that doesn't seem to be that hard? I might also suggest that we think about changing the defaults for

Re: [HACKERS] Hm, table constraints aren't so unique as all that

2013-01-28 Thread Robert Haas
On Mon, Jan 28, 2013 at 10:23 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think that we'll soon be buried in gripes if they're not. Pretty much the whole point of this patch is to allow applications to get rid of ad-hoc, it-usually-works coding techniques. I'd argue that not checking the entire

Re: [HACKERS] Re: Doc patch making firm recommendation for setting the value of commit_delay

2013-01-28 Thread Noah Misch
On Mon, Jan 28, 2013 at 04:29:12AM +, Peter Geoghegan wrote: On 28 January 2013 03:34, Noah Misch n...@leadboat.com wrote: On the EBS configuration with volatile fsync timings, the variability didn't go away with 15s runs. On systems with stable fsync times, 15s was no better than

Re: [HACKERS] enhanced error fields

2013-01-28 Thread Tom Lane
I wrote: Rather what we've got is that constraints are uniquely named among those associated with a table, or with a domain. So the correct unique key for a table constraint is table schema + table name + constraint name, whereas for a domain constraint it's domain schema + domain name +

Re: [HACKERS] Hm, table constraints aren't so unique as all that

2013-01-28 Thread David Rowley
Tom Lane Wrote: Peter Geoghegan peter.geoghega...@gmail.com writes: On 29 January 2013 00:25, Tom Lane t...@sss.pgh.pa.us wrote: I can see the case for fixing this, but I don't feel that it's particularly important that constraints be uniquely identifiable from the proposed new errdata

Re: [HACKERS] autovacuum not prioritising for-wraparound tables

2013-01-28 Thread Josh Berkus
I have to admit, I fail to see why this is a good idea. There isn't much of an efficiency bonus in freezing early (due to hint bits) and vacuums over vacuum_freeze_table_age are considerably more expensive as they have to scan the whole heap instead of using the visibilitymap. And if you

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Josh Berkus
OK, I had some time to think about this. Basically, we have three outcomes for pg_ctl start: server not running and pg_ctl start success server start failed server already running Can't we just assign different return values to these cases, e.g. 0, 1, 2? We already

Re: [HACKERS] psql \l to accept patterns

2013-01-28 Thread Peter Eisentraut
On Mon, 2013-01-07 at 07:14 -0500, Peter Eisentraut wrote: Here is a patch for psql's \l command to accept patterns, like \d commands do. While at it, I also added an S option to show system objects and removed system objects from the default display. This might be a bit controversial, but

Re: [HACKERS] BUG #7493: Postmaster messages unreadable in a Windows console

2013-01-28 Thread Alexander Law
Hello, Thanks for fixing bug #6510! Please look at the following l10n bug: http://www.postgresql.org/message-id/502a26f1.6010...@gmail.com and the proposed patch. Best regards, Alexander From 1e2d5f712744d4731b665724703c0da4971ea41e Mon Sep 17 00:00:00 2001 From: Alexander Lakhin

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Ashutosh Bapat
On Tue, Jan 29, 2013 at 10:49 AM, Josh Berkus j...@agliodbs.com wrote: OK, I had some time to think about this. Basically, we have three outcomes for pg_ctl start: server not running and pg_ctl start success server start failed server already running Can't we