Re: [HACKERS] Small documentation issue

2011-07-06 Thread Albe Laurenz
Tom Lane wrote: In fdwhandler.sgml, chapter fdwhandler has only one subsection (fdw-routines). If there is only one subsection, no table of contents is generated in the chapter. [...] I don't know how to change the doc toolchain to do that either. But on reflection it seemed to me that

Re: [HACKERS] fixing PQsetvalue()

2011-07-06 Thread Pavel Golub
Hello. Any news on these issues? Becuase beta3 is scheduled for July 11th... You wrote: MM On Jun 6 MM (http://archives.postgresql.org/pgsql-hackers/2011-06/msg00272.php), MM Pavel discovered an issue with PQsetvalue that could cause libpq to MM wander off into unallocated memory that was

Re: [HACKERS] Cascade replication

2011-07-06 Thread Fujii Masao
On Wed, Jul 6, 2011 at 2:44 PM, Simon Riggs si...@2ndquadrant.com wrote: 1. De-archive the file to RECOVERYXLOG 2. If RECOVERYXLOG is valid, remove a pre-existing one and rename    RECOVERYXLOG to the correct name 3. Replay the file with the correct name Yes please, that makes sense. Will

Re: [HACKERS] Cascade replication

2011-07-06 Thread Simon Riggs
On Wed, Jul 6, 2011 at 8:53 AM, Fujii Masao masao.fu...@gmail.com wrote: What about outputing something like the following message in that case?    if (walsender receives SIGUSR2)        ereport(LOG, terminating walsender process due to administrator command); ...which doesn't explain the

Re: [HACKERS] patch: enhanced get diagnostics statement 2

2011-07-06 Thread Shigeru Hanada
(2011/06/02 17:39), Pavel Stehule wrote: This patch enhances a GET DIAGNOSTICS statement functionality. It adds a possibility of access to exception's data. These data are stored on stack when exception's handler is activated - and these data are access-able everywhere inside handler. It has a

Re: [HACKERS] Cascade replication

2011-07-06 Thread Fujii Masao
On Wed, Jul 6, 2011 at 4:53 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Jul 6, 2011 at 2:44 PM, Simon Riggs si...@2ndquadrant.com wrote: 1. De-archive the file to RECOVERYXLOG 2. If RECOVERYXLOG is valid, remove a pre-existing one and rename    RECOVERYXLOG to the correct name 3.

Re: [HACKERS] proper format for printing GetLastError()

2011-07-06 Thread Magnus Hagander
On Mon, Jul 4, 2011 at 17:29, Peter Eisentraut pete...@gmx.net wrote: About half of our code prints GetLastError() using %d after casting it to int (actually, about half of that half uses %i, another thing to sort out, perhaps), and the other half uses %lu without casting.  I gather from

Re: [HACKERS] proper format for printing GetLastError()

2011-07-06 Thread Peter Geoghegan
Yeah, I noticed that myself recently. On 6 July 2011 12:48, Magnus Hagander mag...@hagander.net wrote: Nope. I think it's only in there because of lazyness, in general. %lu seems to be the correct choice. Yes, it's the correct choice. Thirdly, why are we not trying to print a textual

Re: [HACKERS] Cascade replication

2011-07-06 Thread Simon Riggs
On Wed, Jul 6, 2011 at 12:27 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Jul 6, 2011 at 4:53 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Jul 6, 2011 at 2:44 PM, Simon Riggs si...@2ndquadrant.com wrote: 1. De-archive the file to RECOVERYXLOG 2. If RECOVERYXLOG is valid, remove

Re: [HACKERS] Review of VS 2010 support patches

2011-07-06 Thread Craig Ringer
On 6/07/2011 2:15 AM, Brar Piening wrote: I've replied on-list see: http://archives.postgresql.org/pgsql-hackers/2011-07/msg00066.php Ah, sorry I missed that. I generally can't keep up with -hackers and have to rely on being cc'd. The patch (VS2010v7.patch) seems to mix significant

Re: [HACKERS] Range Types, constructors, and the type system

2011-07-06 Thread Robert Haas
On Wed, Jul 6, 2011 at 1:19 AM, Jeff Davis pg...@j-davis.com wrote: On Tue, 2011-07-05 at 13:06 -0400, Robert Haas wrote: On Tue, Jul 5, 2011 at 12:54 PM, Jeff Davis pg...@j-davis.com wrote: It would be something like: range_co(1,8)::int8range (just so we're comparing apples to apples)

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-06 Thread Robert Haas
On Thu, Jun 30, 2011 at 1:02 PM, Robert Haas robertmh...@gmail.com wrote: On first blush, that looks a whole lot cleaner.  I'll try to find some time for a more detailed review soon. This seems not to compile for me: gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith

Re: [HACKERS] psql describe.c cleanup

2011-07-06 Thread Robert Haas
On Thu, Jun 16, 2011 at 10:05 AM, Merlin Moncure mmonc...@gmail.com wrote: On Wed, Jun 15, 2011 at 9:01 AM, Merlin Moncure mmonc...@gmail.com wrote: On Tue, Jun 14, 2011 at 9:08 PM, Josh Kupershmidt schmi...@gmail.com wrote: On Tue, Jun 14, 2011 at 12:15 PM, Merlin Moncure mmonc...@gmail.com

Re: [HACKERS] storing TZ along timestamps

2011-07-06 Thread Alexey Klyukin
Hi, On May 27, 2011, at 11:43 PM, Alvaro Herrera wrote: One of our customers is interested in being able to store original timezone along with a certain timestamp. It is currently possible to store a TZ in a separate column, but this is a bit wasteful and not very convenient anyway.

[HACKERS] Old postgresql repository

2011-07-06 Thread Magnus Hagander
When we did the migration to git, we decided to leave the old postgresql git repository around for a while, for people who had clones around it. This is the repository that was live updated from cvs while we were using cvs, and does *not* correspond to the current git repository when it comes to

Re: [HACKERS] Crash dumps

2011-07-06 Thread Radosław Smogura
On Wed, 06 Jul 2011 07:59:12 +0800, Craig Ringer wrote: On 5/07/2011 9:05 PM, Magnus Hagander wrote: On Tue, Jul 5, 2011 at 15:02, Robert Haasrobertmh...@gmail.com wrote: On Mon, Jul 4, 2011 at 12:47 PM, Radosław Smogura rsmog...@softperience.eu wrote: I asked about crash reports becaus of

Re: [HACKERS] Review: psql include file using relative path

2011-07-06 Thread Robert Haas
On Mon, Jun 6, 2011 at 10:11 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: On Mon, Jun 6, 2011 at 9:48 PM, Josh Kupershmidt schmi...@gmail.com wrote: On Sun, Jun 5, 2011 at 8:16 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: Attached an updated patch. If you find it ready for

Re: [HACKERS] Old postgresql repository

2011-07-06 Thread Robert Haas
On Wed, Jul 6, 2011 at 10:31 AM, Magnus Hagander mag...@hagander.net wrote: When we did the migration to git, we decided to leave the old postgresql git repository around for a while, for people who had clones around it. This is the repository that was live updated from cvs while we were using

Re: [HACKERS] Range Types, constructors, and the type system

2011-07-06 Thread Jeff Davis
On Wed, 2011-07-06 at 09:10 -0400, Robert Haas wrote: There's some slight ugliness around the NULL/infinity business, but I think that I could be convinced. I'd like to avoid confusion between NULL and infinity if possible. I was thinking that if you passed 'i' for one of the bounds, it

Re: [HACKERS] [v9.2] DROP Reworks Part.1 - Consolidate routines to handle DropStmt

2011-07-06 Thread Robert Haas
On Tue, Jun 28, 2011 at 4:17 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: The attached patch is rebased one to consolidate routines to remove objects using the revised get_object_address(). The new RemoveObjects() replaces the following routines; having similar structure.  - RemoveRelations  

Re: [HACKERS] Range Types, constructors, and the type system

2011-07-06 Thread Robert Haas
On Wed, Jul 6, 2011 at 12:22 PM, Jeff Davis pg...@j-davis.com wrote: To get into some more details: how exactly would this constructor be generated on the fly? Clearly we want only one underlying C function that accepts something like:  range_internal(lower, upper, flags, Oid rangetype) So

Re: [HACKERS] Review: psql include file using relative path

2011-07-06 Thread Gurjeet Singh
On Wed, Jul 6, 2011 at 11:58 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jun 6, 2011 at 10:11 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: On Mon, Jun 6, 2011 at 9:48 PM, Josh Kupershmidt schmi...@gmail.com wrote: On Sun, Jun 5, 2011 at 8:16 PM, Gurjeet Singh

Re: [HACKERS] Range Types, constructors, and the type system

2011-07-06 Thread Jeff Davis
On Wed, 2011-07-06 at 12:51 -0400, Robert Haas wrote: On Wed, Jul 6, 2011 at 12:22 PM, Jeff Davis pg...@j-davis.com wrote: To get into some more details: how exactly would this constructor be generated on the fly? Clearly we want only one underlying C function that accepts something like:

Re: [HACKERS] [v9.2] DROP Reworks Part.1 - Consolidate routines to handle DropStmt

2011-07-06 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié jul 06 12:40:39 -0400 2011: This patch removes an impressive amount of boilerplate code and replaces it with something much more compact. I like that. In the interest of full disclosure, I suggested this approach to KaiGai at PGCon, so I'm biased:

Re: [HACKERS] [v9.2] DROP Reworks Part.1 - Consolidate routines to handle DropStmt

2011-07-06 Thread Robert Haas
On Wed, Jul 6, 2011 at 1:09 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mié jul 06 12:40:39 -0400 2011: This patch removes an impressive amount of boilerplate code and replaces it with something much more compact.   I like that.  In the interest

Re: [HACKERS] reducing the overhead of frequent table locks, v4

2011-07-06 Thread Jeff Davis
On Thu, 2011-06-30 at 19:25 -0400, Robert Haas wrote: I'm really hurting for is some code review. I'm trying to get my head into this patch. I have a couple questions: Does this happen to be based on some academic research? I don't necessarily expect it to be; just thought I'd ask. Here is my

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-06 Thread Noah Misch
On Wed, Jul 06, 2011 at 09:55:01AM -0400, Robert Haas wrote: On Thu, Jun 30, 2011 at 1:02 PM, Robert Haas robertmh...@gmail.com wrote: On first blush, that looks a whole lot cleaner. ?I'll try to find some time for a more detailed review soon. This seems not to compile for me: gcc -O2

Re: [HACKERS] Old postgresql repository

2011-07-06 Thread David Fetter
On Wed, Jul 06, 2011 at 04:31:53PM +0200, Magnus Hagander wrote: When we did the migration to git, we decided to leave the old postgresql git repository around for a while, for people who had clones around it. This is the repository that was live updated from cvs while we were using cvs, and

Re: [HACKERS] Make relation_openrv atomic wrt DDL

2011-07-06 Thread Robert Haas
On Sun, Jun 19, 2011 at 11:42 PM, Noah Misch n...@leadboat.com wrote: On Sun, Jun 19, 2011 at 11:44:35PM +0100, Greg Stark wrote: So I was the victim assigned to review this patch. Thanks for doing so. This discussion seems to have died off. Let's see if we can drive this forward to some

Re: [HACKERS] Range Types, constructors, and the type system

2011-07-06 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: On Wed, 2011-07-06 at 12:51 -0400, Robert Haas wrote: On Wed, Jul 6, 2011 at 12:22 PM, Jeff Davis pg...@j-davis.com wrote: To get into some more details: how exactly would this constructor be generated on the fly? Clearly we want only one underlying C

Re: [HACKERS] reducing the overhead of frequent table locks, v4

2011-07-06 Thread Robert Haas
On Wed, Jul 6, 2011 at 2:02 PM, Jeff Davis pg...@j-davis.com wrote: On Thu, 2011-06-30 at 19:25 -0400, Robert Haas wrote: I'm really hurting for is some code review. I'm trying to get my head into this patch. I have a couple questions: Does this happen to be based on some academic research?

Re: [HACKERS] Review of VS 2010 support patches

2011-07-06 Thread Brar Piening
Original Message Subject: Re: [HACKERS] Review of VS 2010 support patches From: Craig Ringer cr...@postnewspapers.com.au To: Brar Piening b...@gmx.de Date: 06.07.2011 14:56 It turns out that VS2010v8.patch is also attached to the same message. Not that you'd know it from the

Re: [HACKERS] Review of VS 2010 support patches

2011-07-06 Thread Andrew Dunstan
On 07/06/2011 04:41 PM, Brar Piening wrote: I certainly could. But as those files are Andrew's work which isn't really related to VS2010 build and could as well be commited seperately I don't want to take credit for it. I'll remove my versions from the patch (v9 probably) if those files get

Re: [HACKERS] [v9.2] DROP Reworks Part.1 - Consolidate routines to handle DropStmt

2011-07-06 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié jul 06 14:02:13 -0400 2011: On Wed, Jul 6, 2011 at 1:09 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mié jul 06 12:40:39 -0400 2011: This patch removes an impressive amount of boilerplate code and

Re: [HACKERS] Make relation_openrv atomic wrt DDL

2011-07-06 Thread Noah Misch
On Wed, Jul 06, 2011 at 03:06:40PM -0400, Robert Haas wrote: On Sun, Jun 19, 2011 at 11:42 PM, Noah Misch n...@leadboat.com wrote: On Sun, Jun 19, 2011 at 11:44:35PM +0100, Greg Stark wrote: So I was the victim assigned to review this patch. Thanks for doing so. This discussion seems

Re: [HACKERS] Old postgresql repository

2011-07-06 Thread Jeff Davis
On Wed, 2011-07-06 at 16:31 +0200, Magnus Hagander wrote: When we did the migration to git, we decided to leave the old postgresql git repository around for a while, for people who had clones around it. This is the repository that was live updated from cvs while we were using cvs, and does

Re: [HACKERS] Crash dumps

2011-07-06 Thread Craig Ringer
On 6/07/2011 11:00 PM, Radosław Smogura wrote: I think IPC for fast shout down all backends and wait for report processing is quite enaugh. How do you propose to make that reliable, though? -- Craig Ringer POST Newspapers 276 Onslow Rd, Shenton Park Ph: 08 9381 3088 Fax: 08 9388 2258 ABN:

Re: [HACKERS] [v9.2] Fix leaky-view problem, part 1

2011-07-06 Thread Noah Misch
On Wed, Jul 06, 2011 at 10:25:12PM +0200, Kohei KaiGai wrote: *** a/src/backend/commands/view.c --- b/src/backend/commands/view.c --- 227,257 atcmd-def = (Node *) lfirst(c); atcmds = lappend(atcmds, atcmd);

Re: [HACKERS] Make relation_openrv atomic wrt DDL

2011-07-06 Thread Robert Haas
On Wed, Jul 6, 2011 at 6:32 PM, Noah Misch n...@2ndquadrant.com wrote: Maybe this is a stupid idea, but what about changing the logic so that, if we get back InvalidOid, we AcceptInvalidationMessages() and retry if the counter has advanced?  ISTM that might cover the example you mentioned in

Re: [HACKERS] [v9.2] DROP Reworks Part.1 - Consolidate routines to handle DropStmt

2011-07-06 Thread Robert Haas
On Wed, Jul 6, 2011 at 5:06 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mié jul 06 14:02:13 -0400 2011: On Wed, Jul 6, 2011 at 1:09 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mié jul 06 12:40:39

Re: [HACKERS] spinlock contention

2011-07-06 Thread Robert Haas
On Thu, Jun 23, 2011 at 11:42 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jun 22, 2011 at 5:43 PM, Florian Pflug f...@phlo.org wrote: On Jun12, 2011, at 23:39 , Robert Haas wrote: So, the majority (60%) of the excess spinning appears to be due to SInvalReadLock.  A good chunk are due

Re: [HACKERS] Make relation_openrv atomic wrt DDL

2011-07-06 Thread Noah Misch
On Wed, Jul 06, 2011 at 08:35:55PM -0400, Robert Haas wrote: On Wed, Jul 6, 2011 at 6:32 PM, Noah Misch n...@2ndquadrant.com wrote: While a mere LOCK bar.x is sufficient to get a clean cutover with respect to parsing, it fails to invalidate plans.  To really cover all bases, you need

Re: [HACKERS] Range Types, constructors, and the type system

2011-07-06 Thread Jeff Davis
On Wed, 2011-07-06 at 15:14 -0400, Tom Lane wrote: I ran into problems with that before... I think with the I/O functions. I don't think that's a problem here, but I thought I'd ask. I think it'd probably be all right to do that. The places where you might find shortcuts being taken are

[HACKERS] 9.2 CF2: 20 days in

2011-07-06 Thread Josh Berkus
Hackers, Commitfest 2 continues to progress ... slowly. At this point, we have no hope of wrapping it up early; my best hope is to at least finish on time. Statistics: * 1/2 of patches are still pending development: 12 waiting on author, and 18 waiting for review. In addition, 7 patches are

[HACKERS] spurious use of %m format in pg_upgrade

2011-07-06 Thread Peter Eisentraut
pg_upgrade's pg_scandir_internal() makes use of the non-standard %m format: pg_log(PG_FATAL, could not open directory \%s\: %m\n, dirname); Is this an oversight, or is there an undocumented assumption that this code will only be used on platforms where %m works? (Which platforms don't have

Re: [HACKERS] spurious use of %m format in pg_upgrade

2011-07-06 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: pg_upgrade's pg_scandir_internal() makes use of the non-standard %m format: pg_log(PG_FATAL, could not open directory \%s\: %m\n, dirname); Is this an oversight, or is there an undocumented assumption that this code will only be used on platforms