Re: [HACKERS] Crash dumps

2011-07-06 Thread Radosław Smogura
Craig Ringer Thursday 07 of July 2011 01:05:48 > 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 >

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

2011-07-06 Thread Tom Lane
Peter Eisentraut 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 wher

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

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

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

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 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 > > some no-op ac

Re: [HACKERS] spinlock contention

2011-07-06 Thread Robert Haas
On Thu, Jun 23, 2011 at 11:42 AM, Robert Haas wrote: > On Wed, Jun 22, 2011 at 5:43 PM, Florian Pflug 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 to ProcArrayLock (25%). >>

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 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 >> wrote: >> > Excerpts from Robert Haas's message of mié jul 06 12:40:39 -0400 2011: >> > >> >> This patch removes an i

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 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 your last post

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] 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] 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 doe

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

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

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 c

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 To: Brar Piening 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 ... interesting ... way the web ui pre

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 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? I don't

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

2011-07-06 Thread Tom Lane
Jeff Davis writes: > On Wed, 2011-07-06 at 12:51 -0400, Robert Haas wrote: >> On Wed, Jul 6, 2011 at 12:22 PM, Jeff Davis 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 somet

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 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 conclusion. I t

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,

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 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 -Wmissin

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 m

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 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 of full disclosure

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 bias

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 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_i

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 wrote: > On Mon, Jun 6, 2011 at 10:11 PM, Gurjeet Singh > wrote: > > On Mon, Jun 6, 2011 at 9:48 PM, Josh Kupershmidt > wrote: > >> > >> On Sun, Jun 5, 2011 at 8:16 PM, Gurjeet Singh > >> wrote: > >> > Attached an updated patch. > >> > > >> > If you

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 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 how do we get t

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 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 >  - RemoveType

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 bound

Re: [HACKERS] Old postgresql repository

2011-07-06 Thread Robert Haas
On Wed, Jul 6, 2011 at 10:31 AM, 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] Review: psql include file using relative path

2011-07-06 Thread Robert Haas
On Mon, Jun 6, 2011 at 10:11 PM, Gurjeet Singh wrote: > On Mon, Jun 6, 2011 at 9:48 PM, Josh Kupershmidt wrote: >> >> On Sun, Jun 5, 2011 at 8:16 PM, Gurjeet Singh >> wrote: >> > Attached an updated patch. >> > >> > If you find it ready for committer, please mark it so in the commitfest >> > app

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 Haas wrote: On Mon, Jul 4, 2011 at 12:47 PM, Radosław Smogura wrote: I asked about crash reports becaus of at this time there was thread about crashing

[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] 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.

Re: [HACKERS] psql describe.c cleanup

2011-07-06 Thread Robert Haas
On Thu, Jun 16, 2011 at 10:05 AM, Merlin Moncure wrote: > On Wed, Jun 15, 2011 at 9:01 AM, Merlin Moncure wrote: >> On Tue, Jun 14, 2011 at 9:08 PM, Josh Kupershmidt wrote: >>> On Tue, Jun 14, 2011 at 12:15 PM, Merlin Moncure wrote: What I do wonder though is if the ; appending should real

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 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 -Wdeclaration-after-statement -Wendif-labels -

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 wrote: > On Tue, 2011-07-05 at 13:06 -0400, Robert Haas wrote: >> On Tue, Jul 5, 2011 at 12:54 PM, Jeff Davis wrote: >> > It would be something like: range_co(1,8)::int8range >> > >> > (just so we're comparing apples to apples) >> > >> > The intermediate

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 changes

Re: [HACKERS] Cascade replication

2011-07-06 Thread Simon Riggs
On Wed, Jul 6, 2011 at 12:27 PM, Fujii Masao wrote: > On Wed, Jul 6, 2011 at 4:53 PM, Fujii Masao wrote: >> On Wed, Jul 6, 2011 at 2:44 PM, Simon Riggs wrote: 1. De-archive the file to RECOVERYXLOG 2. If RECOVERYXLOG is valid, remove a pre-existing one and rename    RECOVERYXLOG t

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 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 message? > > I'd say t

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

2011-07-06 Thread Magnus Hagander
On Mon, Jul 4, 2011 at 17:29, Peter Eisentraut 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 online documentat

Re: [HACKERS] Cascade replication

2011-07-06 Thread Fujii Masao
On Wed, Jul 6, 2011 at 4:53 PM, Fujii Masao wrote: > On Wed, Jul 6, 2011 at 2:44 PM, Simon Riggs 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

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 ha

Re: [HACKERS] Cascade replication

2011-07-06 Thread Simon Riggs
On Wed, Jul 6, 2011 at 8:53 AM, Fujii Masao 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] Cascade replication

2011-07-06 Thread Fujii Masao
On Wed, Jul 6, 2011 at 2:44 PM, Simon Riggs 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 do. >>> Thos

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 pr

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 seem