Re: [HACKERS] [GENERAL] Multiple Slave Failover with PITR

2012-09-03 Thread Daniel Farina
On Sun, Sep 2, 2012 at 5:12 AM, Bruce Momjian br...@momjian.us wrote: Do we ever want to document a way to connect slaves to a new master, rather than recreating the slave? Please, please please do so. And hopefully it'll be less tricky sooner than later. -- fdr -- Sent via pgsql-hackers

[HACKERS] Is this non-volatile pointer access OK?

2012-09-03 Thread Daniel Farina
http://doxygen.postgresql.org/xlog_8c_source.html#l08197 On line 8197 of xlog.c: 08194 /* Get a local copy of the last safe checkpoint record. */ 08195 SpinLockAcquire(xlogctl-info_lck); 08196 lastCheckPointRecPtr = xlogctl-lastCheckPointRecPtr; 08197 memcpy(lastCheckPoint,

Re: [HACKERS] _USE_32BIT_TIME_T Patch

2012-09-03 Thread Dave Page
On Sat, Sep 1, 2012 at 1:35 AM, Andrew Dunstan and...@dunslane.net wrote: On 08/31/2012 06:39 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: I'm not sure what we need to do to progress on this, especially re the back branches. The calendar might help us here. 9.2 is due

Re: [HACKERS] [GENERAL] Multiple Slave Failover with PITR

2012-09-03 Thread Sergey Konoplev
On Sun, Sep 2, 2012 at 4:12 PM, Bruce Momjian br...@momjian.us wrote: Do we ever want to document a way to connect slaves to a new master, rather than recreating the slave? I have written an instruction for myself and I am planning to publish it on http://code.google.com/p/pgcookbook/. See the

[HACKERS] 9.2: Describing a security barrier view in psql

2012-09-03 Thread Dean Rasheed
Hi, Unless I'm missing something, it is not possible in psql to tell whether a view has the security_barrier option. I think that this is something that ought to be possible from psql, otherwise the new feature is not visible. This patch displays any reloptions for a view at the end, if \d+ is

Re: [HACKERS] Is this non-volatile pointer access OK?

2012-09-03 Thread Peter Geoghegan
On 3 September 2012 08:10, Daniel Farina dan...@heroku.com wrote: http://doxygen.postgresql.org/xlog_8c_source.html#l08197 On line 8197 of xlog.c: 08194 /* Get a local copy of the last safe checkpoint record. */ 08195 SpinLockAcquire(xlogctl-info_lck); 08196 lastCheckPointRecPtr

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

2012-09-03 Thread Magnus Hagander
On Mon, Sep 3, 2012 at 6:42 AM, Tom Lane t...@sss.pgh.pa.us wrote: Noah Misch n...@leadboat.com writes: Windows does not have socketpair(), nor a strict pipe() equivalent. I expect switching to socketpair() makes the Windows side trickier in some ways and simpler in others. +1 for exploring

Re: [HACKERS] pg_upgrade bugs

2012-09-03 Thread Andrew Dunstan
On 09/03/2012 12:00 AM, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Maybe, to reduce future backpatching pain, we could backpatch the change to exec_prog() API now that you have fixed the implementation? I'm inclined to think this is a good idea, but keep in mind we're

Re: [HACKERS] pg_upgrade test mods for Windows/Mingw

2012-09-03 Thread Andrew Dunstan
On 09/02/2012 11:53 PM, Gurjeet Singh wrote: On Sun, Sep 2, 2012 at 11:29 PM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: The attached patch is what I had to do to get pg_upgrade's make check to run on Windows under Mingw. Mostly the changes have to do

Re: [HACKERS] [bugfix] sepgsql didn't follow the latest core API changes

2012-09-03 Thread Alvaro Herrera
Excerpts from Kohei KaiGai's message of dom sep 02 15:53:22 -0300 2012: This patch fixes a few portions on which sepgsql didn't follow the latest core API changes. I think you should get a buildfarm animal installed that builds and tests sepgsql, to avoid this kind of problem in the future. --

Re: [HACKERS] 9.2: Describing a security barrier view in psql

2012-09-03 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: Unless I'm missing something, it is not possible in psql to tell whether a view has the security_barrier option. I think that this is something that ought to be possible from psql, otherwise the new feature is not visible. This patch displays any

Re: [HACKERS] 9.2: Describing a security barrier view in psql

2012-09-03 Thread Magnus Hagander
On Mon, Sep 3, 2012 at 3:48 PM, Tom Lane t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com writes: Unless I'm missing something, it is not possible in psql to tell whether a view has the security_barrier option. I think that this is something that ought to be possible from psql,

Re: [HACKERS] Yet another failure mode in pg_upgrade

2012-09-03 Thread Bruce Momjian
On Sun, Sep 2, 2012 at 11:47:06PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Updated patch attached. [ looks at that for a bit... ] Now I see why you were on about that: the method you used here requires both clusters to have the same socket directory. Which is silly

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

2012-09-03 Thread Amit Kapila
5. The fork/exec code is pretty primitive with respect to error handling. I didn't put much time into it since I'm afraid we may need to refactor it entirely before a Windows equivalent can be written. (And I need somebody to write/test the Windows equivalent - any volunteers?) I think part

Re: [HACKERS] pg_upgrade test mods for Windows/Mingw

2012-09-03 Thread Andrew Dunstan
On 09/03/2012 09:16 AM, Andrew Dunstan wrote: On 09/02/2012 11:53 PM, Gurjeet Singh wrote: On Sun, Sep 2, 2012 at 11:29 PM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: The attached patch is what I had to do to get pg_upgrade's make check to run on Windows

Re: [HACKERS] 9.2: Describing a security barrier view in psql

2012-09-03 Thread Dean Rasheed
On 3 September 2012 14:48, Tom Lane t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com writes: Unless I'm missing something, it is not possible in psql to tell whether a view has the security_barrier option. I think that this is something that ought to be possible from psql,

Re: [HACKERS] Yet another failure mode in pg_upgrade

2012-09-03 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Also, I don't see my doc addition on your patch; was that intentional? It's not necessary, no? The code now gets socket directory right without help. regards, tom lane -- Sent via pgsql-hackers mailing list

[HACKERS] [WIP PATCH] for Performance Improvement in Buffer Management

2012-09-03 Thread Amit kapila
This patch is based on below Todo Item: Consider adding buffers the background writer finds reusable to the free list I have tried implementing it and taken the readings for Select when all the data is in either OS buffers or Shared Buffers. The Patch has simple implementation for

[HACKERS] Caught up

2012-09-03 Thread Bruce Momjian
I spent the month of August going through 1.7k emails I had saved from the previous year that required my attention. I want to thank everyone for helping me close many open items, and for tolerating my questions. Ideally I would have dealt with many of these emails earlier, but time constraints

Re: [HACKERS] Yet another failure mode in pg_upgrade

2012-09-03 Thread Bruce Momjian
On Mon, Sep 3, 2012 at 10:07:43AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Also, I don't see my doc addition on your patch; was that intentional? It's not necessary, no? The code now gets socket directory right without help. Well, the doc comment is: +If

Re: [HACKERS] Yet another failure mode in pg_upgrade

2012-09-03 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Mon, Sep 3, 2012 at 10:07:43AM -0400, Tom Lane wrote: It's not necessary, no? The code now gets socket directory right without help. Well, the doc comment is: +If running check on an old pre-9.1 Unix-like running server, and the +old and

Re: [HACKERS] Yet another failure mode in pg_upgrade

2012-09-03 Thread Bruce Momjian
On Mon, Sep 3, 2012 at 10:42:38AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Mon, Sep 3, 2012 at 10:07:43AM -0400, Tom Lane wrote: It's not necessary, no? The code now gets socket directory right without help. Well, the doc comment is: +If running check

Re: [HACKERS] Is this non-volatile pointer access OK?

2012-09-03 Thread Tom Lane
Peter Geoghegan pe...@2ndquadrant.com writes: On 3 September 2012 08:10, Daniel Farina dan...@heroku.com wrote: On line 8197 of xlog.c: 08194 /* Get a local copy of the last safe checkpoint record. */ 08195 SpinLockAcquire(xlogctl-info_lck); 08196 lastCheckPointRecPtr =

Re: [HACKERS] [COMMITTERS] pgsql: Make a cut at a major-features list for 9.2.

2012-09-03 Thread Magnus Hagander
On Wed, Aug 22, 2012 at 11:58 PM, Tom Lane t...@sss.pgh.pa.us wrote: Make a cut at a major-features list for 9.2. This is open to debate of course, but it's past time we had *something* here. (yes, i've been backlogged) We have cascading replication as a major feature, which I agree it is.

Re: [HACKERS] [COMMITTERS] pgsql: Make a cut at a major-features list for 9.2.

2012-09-03 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Aug 22, 2012 at 11:58 PM, Tom Lane t...@sss.pgh.pa.us wrote: Make a cut at a major-features list for 9.2. This is open to debate of course, but it's past time we had *something* here. We have cascading replication as a major feature,

Re: [HACKERS] Yet another failure mode in pg_upgrade

2012-09-03 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: I am working on an additional enhancement that also pulls the live cluster's port number from the postmaster.pid file. I am attaching the part of my patch that was modified to add that feature. This allows live checks without requiring any port numbers

Re: [HACKERS] Yet another failure mode in pg_upgrade

2012-09-03 Thread Bruce Momjian
On Mon, Sep 3, 2012 at 12:16:04PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: I am working on an additional enhancement that also pulls the live cluster's port number from the postmaster.pid file. I am attaching the part of my patch that was modified to add that feature.

[HACKERS] 9.2 pg_upgrade regression tests on WIndows

2012-09-03 Thread Andrew Dunstan
The attached very small patch allows pg_upgrade's make check to succeed on REL9_2_STABLE on my Mingw system. However, I consider the issue I mentioned earlier regarding use of forward slashes in the argument to rmdir to be a significant blocker, so I'm going to go and fix that and then pull

Re: [HACKERS] [COMMITTERS] pgsql: Make a cut at a major-features list for 9.2.

2012-09-03 Thread Bruce Momjian
On Mon, Sep 3, 2012 at 12:11:45PM -0400, Tom Lane wrote: Magnus Hagander mag...@hagander.net writes: On Wed, Aug 22, 2012 at 11:58 PM, Tom Lane t...@sss.pgh.pa.us wrote: Make a cut at a major-features list for 9.2. This is open to debate of course, but it's past time we had *something*

Re: [HACKERS] 9.2 pg_upgrade regression tests on WIndows

2012-09-03 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: The attached very small patch allows pg_upgrade's make check to succeed on REL9_2_STABLE on my Mingw system. However, I consider the issue I mentioned earlier regarding use of forward slashes in the argument to rmdir to be a significant blocker, so

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

2012-09-03 Thread Tom Lane
Amit Kapila amit.kap...@huawei.com writes: I think part of the code for windows can be written by referring function internal_forkexec(), If you are okay, I can take up this. Please confirm. Nobody else volunteered, so have at it. Note that I'm planning to redo that code to use socketpair(),

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

2012-09-03 Thread Magnus Hagander
On Mon, Sep 3, 2012 at 7:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kap...@huawei.com writes: 8. PQcancel needs some work - it can't do what it does now, but it could do kill(conn-postgres_pid, SIGINT) instead. At least in Unix. I have no idea what we'd do in Windows. This

Re: [HACKERS] Cascading replication and recovery_target_timeline='latest'

2012-09-03 Thread Fujii Masao
On Sat, Sep 1, 2012 at 2:32 AM, Fujii Masao masao.fu...@gmail.com wrote: On Fri, Aug 31, 2012 at 5:03 PM, Heikki Linnakangas hlinn...@iki.fi wrote: When a cascading standby launches a new walsender, it fetches the current recovery timeline: /* * Use the recovery target

Re: [HACKERS] 9.2 pg_upgrade regression tests on WIndows

2012-09-03 Thread Andrew Dunstan
On 09/03/2012 12:58 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: The attached very small patch allows pg_upgrade's make check to succeed on REL9_2_STABLE on my Mingw system. However, I consider the issue I mentioned earlier regarding use of forward slashes in the argument to

Re: [HACKERS] 9.2 pg_upgrade regression tests on WIndows

2012-09-03 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 09/03/2012 12:58 PM, Tom Lane wrote: My intentions over the next hour or two are to commit the unix-socket-directory fix and then sync 9.2 pg_upgrade with HEAD (ie, back-patch everything that's in HEAD except the int64-XLogRecPtr changes). Will

[HACKERS] pg_upgrade del/rmdir path fix

2012-09-03 Thread Andrew Dunstan
Here is a patch against 9.2 sources (it applies with offsets to HEAD too) to fix the problem that pg_upgrade can write paths in arguments for Windows builtin commands (specifically DEL and RMDIR) with the wrong path separator style. This should be applied all the way back to 9.0. cheers

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

2012-09-03 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Mon, Sep 3, 2012 at 7:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: Hmm, after looking at src/port/kill.c it doesn't seem like there's much of a problem with doing that. I had had the idea that our kill emulation only worked within the backend

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

2012-09-03 Thread Magnus Hagander
On Mon, Sep 3, 2012 at 8:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Mon, Sep 3, 2012 at 7:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: Hmm, after looking at src/port/kill.c it doesn't seem like there's much of a problem with doing that. I had had the

Re: [HACKERS] pg_upgrade del/rmdir path fix

2012-09-03 Thread Andrew Dunstan
On 09/03/2012 02:30 PM, Andrew Dunstan wrote: Here is a patch against 9.2 sources (it applies with offsets to HEAD too) to fix the problem that pg_upgrade can write paths in arguments for Windows builtin commands (specifically DEL and RMDIR) with the wrong path separator style. This should be

Re: [HACKERS] 9.2 pg_upgrade regression tests on WIndows

2012-09-03 Thread Tom Lane
I wrote: Andrew Dunstan and...@dunslane.net writes: No, go for it. I can sync up without difficulty. Does that include backpatching the exec_prog changes to 9.2? Yes, nobody objected, so I'll do that too. And done. Please apply the other open fixes to both HEAD and 9.2. Should be easy at

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

2012-09-03 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Mon, Sep 3, 2012 at 8:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: I have another question after thinking about that for awhile: is there any security concern there? On Unix-oid systems, we expect the kernel to restrict who can do a kill() on a

Re: [HACKERS] [WIP PATCH] for Performance Improvement in Buffer Management

2012-09-03 Thread Jeff Janes
On Mon, Sep 3, 2012 at 7:15 AM, Amit kapila amit.kap...@huawei.com wrote: This patch is based on below Todo Item: Consider adding buffers the background writer finds reusable to the free list I have tried implementing it and taken the readings for Select when all the data is in either OS

Re: [HACKERS] pg_upgrade del/rmdir path fix

2012-09-03 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: This time with a patch. Nitpicky gripe: fix_path is a mighty generic name. How about fix_path_for_windows or something like that? I don't think I'd mark it inline, either. More generally, the behavior of combining two (maybe) filename segments seems

Re: [HACKERS] Multiple setup steps for isolation tests

2012-09-03 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: I just today found that the index-only scan feature has broken SSI. I don't think it will take much to fix, and I'm looking at that, but the first thing I wanted was a test to show the breakage. Ugh. That sounds like a release-blocker.

[HACKERS] Multiple setup steps for isolation tests

2012-09-03 Thread Kevin Grittner
I just today found that the index-only scan feature has broken SSI. I don't think it will take much to fix, and I'm looking at that, but the first thing I wanted was a test to show the breakage. I couldn't find a way to do that without running VACUUM after loading data to the test tables, and

Re: [HACKERS] pg_upgrade del/rmdir path fix

2012-09-03 Thread Andrew Dunstan
On 09/03/2012 03:22 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: This time with a patch. Nitpicky gripe: fix_path is a mighty generic name. How about fix_path_for_windows or something like that? I don't think I'd mark it inline, either. More generally, the behavior of

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

2012-09-03 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Mon, Sep 03, 2012 at 12:11:20AM -0400, Tom Lane wrote: One easy thing we could do that would at least narrow the risks is to only allow the executable's *directory* to be specified, hardwiring the executable file name to postgres (or postgres.exe I

Re: [HACKERS] pg_upgrade del/rmdir path fix

2012-09-03 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: OK, revised patch attached. Looks good to me. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

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

2012-09-03 Thread Andrew Dunstan
On 09/03/2012 04:23 PM, Tom Lane wrote: I'm reluctantly coming to the conclusion that we can't pass these parameters through the regular libpq connection string mechanism, and will have to invent something else. That's awfully nasty though; it will pretty much cripple the idea that this would

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

2012-09-03 Thread Andres Freund
Hi, On Monday, September 03, 2012 10:23:52 PM Tom Lane wrote: I'm reluctantly coming to the conclusion that we can't pass these parameters through the regular libpq connection string mechanism, and will have to invent something else. That's awfully nasty though; it will pretty much cripple

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

2012-09-03 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 09/03/2012 04:23 PM, Tom Lane wrote: I'm reluctantly coming to the conclusion that we can't pass these parameters through the regular libpq connection string mechanism, and will have to invent something else. That's awfully nasty though; it will

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

2012-09-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On Monday, September 03, 2012 10:23:52 PM Tom Lane wrote: I'm reluctantly coming to the conclusion that we can't pass these parameters through the regular libpq connection string mechanism, and will have to invent something else. That's awfully

[HACKERS] Yet another issue with pg_upgrade vs unix_socket_directories

2012-09-03 Thread Tom Lane
I went back for another try at building the Fedora packages with 9.2 branch tip ... and it still failed at pg_upgrade's make check. The reason for this is that test.sh starts a couple of random postmasters, and those postmasters expect to put their sockets in the configured default location (which

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

2012-09-03 Thread Andres Freund
On Monday, September 03, 2012 10:54:23 PM Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On Monday, September 03, 2012 10:23:52 PM Tom Lane wrote: I'm reluctantly coming to the conclusion that we can't pass these parameters through the regular libpq connection string

Re: [HACKERS] Multiple setup steps for isolation tests

2012-09-03 Thread Kevin Grittner
Tom Lane wrote: Kevin Grittner writes: I just today found that the index-only scan feature has broken SSI. I don't think it will take much to fix, and I'm looking at that, but the first thing I wanted was a test to show the breakage. Ugh. That sounds like a release-blocker. What's your

[HACKERS] index-only scans versus serializable transactions

2012-09-03 Thread Kevin Grittner
By not visiting the heap page for tuples, index-only scans fail to acquire all of the necessary predicate locks for correct behavior at the serializable transaction isolation level. The tag for the tuple-level predicate locks includes the xmin, to avoid possible problems with tid re-use. (This

Re: [HACKERS] Cascading replication and recovery_target_timeline='latest'

2012-09-03 Thread Heikki Linnakangas
On 03.09.2012 10:43, Fujii Masao wrote: On Sat, Sep 1, 2012 at 2:32 AM, Fujii Masaomasao.fu...@gmail.com wrote: On Fri, Aug 31, 2012 at 5:03 PM, Heikki Linnakangashlinn...@iki.fi wrote: Aside from the missing locking, I wonder what that does to a cascaded standby. If there is an active

Re: [HACKERS] pg_upgrade del/rmdir path fix

2012-09-03 Thread Andrew Dunstan
On 09/03/2012 04:32 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: OK, revised patch attached. Looks good to me. OK. I will try to get the test script wrapped up tonight or tomorrow, that's the only thing left. cheers andrew -- Sent via

Re: [HACKERS] Cascading replication and recovery_target_timeline='latest'

2012-09-03 Thread Fujii Masao
On Tue, Sep 4, 2012 at 7:07 AM, Heikki Linnakangas hlinn...@iki.fi wrote: On 03.09.2012 10:43, Fujii Masao wrote: On Sat, Sep 1, 2012 at 2:32 AM, Fujii Masaomasao.fu...@gmail.com wrote: On Fri, Aug 31, 2012 at 5:03 PM, Heikki Linnakangashlinn...@iki.fi wrote: Aside from the missing

Re: [HACKERS] Cascading replication and recovery_target_timeline='latest'

2012-09-03 Thread Heikki Linnakangas
On 03.09.2012 16:25, Fujii Masao wrote: On Tue, Sep 4, 2012 at 7:07 AM, Heikki Linnakangashlinn...@iki.fi wrote: Hmm, I was thinking that when walsender gets the position it can send the WAL up to, in GetStandbyFlushRecPtr(), it could atomically check the current recovery timeline. If it has

Re: [HACKERS] Cascading replication and recovery_target_timeline='latest'

2012-09-03 Thread Heikki Linnakangas
On 03.09.2012 16:26, Heikki Linnakangas wrote: On 03.09.2012 16:25, Fujii Masao wrote: On Tue, Sep 4, 2012 at 7:07 AM, Heikki Linnakangashlinn...@iki.fi wrote: Hmm, I was thinking that when walsender gets the position it can send the WAL up to, in GetStandbyFlushRecPtr(), it could atomically

Re: [HACKERS] Is this non-volatile pointer access OK?

2012-09-03 Thread Peter Eisentraut
On Mon, 2012-09-03 at 11:14 +0100, Peter Geoghegan wrote: Come to think of it, the whole convention of using a lower-case variant of the original pointer variable name seems like a foot-gun, given the harmful and indeed very subtle consequences of making this error. With some inventive macro

Re: [HACKERS] Yet another failure mode in pg_upgrade

2012-09-03 Thread Bruce Momjian
On Mon, Sep 3, 2012 at 09:52:22AM -0400, Bruce Momjian wrote: On Sun, Sep 2, 2012 at 11:47:06PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Updated patch attached. [ looks at that for a bit... ] Now I see why you were on about that: the method you used here

Re: [HACKERS] pg_upgrade del/rmdir path fix

2012-09-03 Thread Bruce Momjian
On Mon, Sep 3, 2012 at 02:30:18PM -0400, Andrew Dunstan wrote: Here is a patch against 9.2 sources (it applies with offsets to HEAD too) to fix the problem that pg_upgrade can write paths in arguments for Windows builtin commands (specifically DEL and RMDIR) with the wrong path separator

Re: [HACKERS] [GENERAL] Date conversion using day of week

2012-09-03 Thread Bruce Momjian
Patch applied. --- On Sat, Sep 1, 2012 at 05:14:39PM -0400, Bruce Momjian wrote: [Properly posted to hackers list] On Fri, Apr 1, 2011 at 02:27:02AM +1100, Brendan Jurd wrote: On 1 April 2011 02:00, Adrian Klaver

Re: [HACKERS] pg_upgrade del/rmdir path fix

2012-09-03 Thread Andrew Dunstan
On 09/03/2012 10:41 PM, Bruce Momjian wrote: On Mon, Sep 3, 2012 at 02:30:18PM -0400, Andrew Dunstan wrote: Here is a patch against 9.2 sources (it applies with offsets to HEAD too) to fix the problem that pg_upgrade can write paths in arguments for Windows builtin commands (specifically DEL

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

2012-09-03 Thread Amit Kapila
On Monday, September 03, 2012 10:37 PM Tom Lane wrote: Amit Kapila amit.kap...@huawei.com writes: I think part of the code for windows can be written by referring function internal_forkexec(), If you are okay, I can take up this. Please confirm. Nobody else volunteered, so have at it. Note

Re: [HACKERS] Multiple setup steps for isolation tests

2012-09-03 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Tom Lane wrote: The grammar changes look wrong: I think you eliminated the ability to have zero setup steps, no? Instead, setup_list should expand to either empty or setup_list setup. I tried that first, but had shift/reduce conflicts. [

Re: [HACKERS] index-only scans versus serializable transactions

2012-09-03 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: By not visiting the heap page for tuples, index-only scans fail to acquire all of the necessary predicate locks for correct behavior at the serializable transaction isolation level. The tag for the tuple-level predicate locks includes the

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

2012-09-03 Thread Robert Haas
On Mon, Sep 3, 2012 at 4:38 PM, Andres Freund and...@2ndquadrant.com wrote: On Monday, September 03, 2012 10:23:52 PM Tom Lane wrote: I'm reluctantly coming to the conclusion that we can't pass these parameters through the regular libpq connection string mechanism, and will have to invent

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

2012-09-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I tend to agree. Another idea here might be to stick with Tom's original idea of making it a connection parameter, but have it be turned off by default. In other words, if an application wants to allow those parameters to be used, it would need to do

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

2012-09-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: I can see why that would be nice, but is it really realistic? Don't we expect some more diligence in applications using this against letting such a child continue to run after ctrl-c/SIGTERMing e.g. pg_dump in comparison to closing a normal database

Re: [HACKERS] pg_upgrade del/rmdir path fix

2012-09-03 Thread Andrew Dunstan
On 09/03/2012 11:05 PM, Andrew Dunstan wrote: On 09/03/2012 10:41 PM, Bruce Momjian wrote: On Mon, Sep 3, 2012 at 02:30:18PM -0400, Andrew Dunstan wrote: Here is a patch against 9.2 sources (it applies with offsets to HEAD too) to fix the problem that pg_upgrade can write paths in arguments

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

2012-09-03 Thread Noah Misch
On Tue, Sep 04, 2012 at 12:01:17AM -0400, Robert Haas wrote: Another idea here might be to stick with Tom's original idea of making it a connection parameter, but have it be turned off by default. In other words, if an application wants to allow those parameters to be used, it would need to

Re: [HACKERS] [GENERAL] Multiple Slave Failover with PITR

2012-09-03 Thread Robert Haas
On Mon, Sep 3, 2012 at 2:58 AM, Daniel Farina dan...@heroku.com wrote: On Sun, Sep 2, 2012 at 5:12 AM, Bruce Momjian br...@momjian.us wrote: Do we ever want to document a way to connect slaves to a new master, rather than recreating the slave? Please, please please do so. And hopefully

[HACKERS] Some whitespaces in utility.c

2012-09-03 Thread Michael Paquier
Hi all, I found some whitespace characters in utility.c introduced by commit 3a0e4d3. Please find attached a patch fixing that which can be applied on postgres master (commit 2f0c7d5). Thanks, -- Michael Paquier http://michael.otacoo.com 20120906_utility_whitespace.patch Description: Binary

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

2012-09-03 Thread Andres Freund
On Tuesday, September 04, 2012 06:20:59 AM Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: I can see why that would be nice, but is it really realistic? Don't we expect some more diligence in applications using this against letting such a child continue to run after