Re: [HACKERS] Credit in the release notes WAS: Draft release notes complete

2012-05-13 Thread Josh Berkus
I haven't yet heard any very good argument for deviating from our past practice, which is to credit just the principal author(s) of each patch, not reviewers. Is that what people want? Reviewers are easily removed. What about committers who adjust the patch? Well, I still think we

Re: [HACKERS] Analyzing foreign tables memory problems

2012-05-13 Thread Noah Misch
On Wed, May 02, 2012 at 12:20:39PM +0200, Albe Laurenz wrote: 1) Expose WIDTH_THRESHOLD in commands/vacuum.h and add documentation so that the authors of foreign data wrappers are aware of the problem and can avoid it on their side. This would be quite simple. Seems

[HACKERS] Bugs in our Windows socket code

2012-05-13 Thread Tom Lane
I've been trying to figure out why my recent attempt to latch-ify the stats collector didn't work well on the Windows buildfarm machines. After a good deal of staring at our code and Microsoft's documentation I have a theory, which I intend to try out shortly. However, it appears to me that this

[HACKERS] Foreign keys in pgbench

2012-05-13 Thread Jeff Janes
I think that pgbench should it make it easy to assess the impact of foreign key constraints. The attached adds a --foreign-keys option to initialization mode which creates all the relevant constraints between the default tables. I changed the order of the table DDLs so that upon reinitialization

Re: [HACKERS] WaitLatchOrSocket API needs more thought for socket error conditions

2012-05-13 Thread Peter Geoghegan
On 13 May 2012 02:48, Tom Lane t...@sss.pgh.pa.us wrote: One possible answer is to just legislate that callers mustn't specify WL_SOCKET_WRITABLE without WL_SOCKET_READABLE (either just as documentation, or probably better with an Assert check).  The existing callers would all be fine with

Re: [HACKERS] WaitLatchOrSocket API needs more thought for socket error conditions

2012-05-13 Thread Tom Lane
Peter Geoghegan pe...@2ndquadrant.com writes: I think that we might have avoided accepting the poll()-based implementation in the first place if these subtleties were considered earlier, since IIRC the justification for introducing it was rather weak. I'm not exactly sure that the

Re: [HACKERS] Foreign keys in pgbench

2012-05-13 Thread Peter Geoghegan
On 13 May 2012 18:07, Jeff Janes jeff.ja...@gmail.com wrote: I think that pgbench should it make it easy to assess the impact of foreign key constraints. I agree in principle. I favour being more inclusive about pgbench options, even if the need for such options is only marginal, which this

[HACKERS] Strange issues with 9.2 pg_basebackup replication

2012-05-13 Thread Josh Berkus
Doing some beta testing, managed to produce this issue using the daily snapshot from Tuesday: 1. Created master server, loaded it with a couple dummy databases. 2. Created standby server. 3. Did pg_basebackup -x stream on standby server 4. Started standby server. 5. Realized I'd forgotten to

Re: [HACKERS] Strange issues with 9.2 pg_basebackup replication

2012-05-13 Thread Josh Berkus
More issues: the pg_basebackup -x stream on the cascading replica won't complete until the xlog rotates on the master. (again, this is Tuesday's snapshot). Servers: .226 == master-master, the writeable master .227 == master-replica, a direct replica of master-master .228 == replica-replica, a

Re: [HACKERS] Draft release notes complete

2012-05-13 Thread Peter Geoghegan
On 12 May 2012 01:37, Robert Haas robertmh...@gmail.com wrote: Right.  It's not a new feature; it's a performance improvement.  We've had group commit for a long time; it just didn't work very well before.  And it's not batching the commits better; it's reducing the lock contention around

Re: [HACKERS] Strange issues with 9.2 pg_basebackup replication

2012-05-13 Thread Josh Berkus
More issues: promoting intermediate standby breaks replication. To be a bit blunt here, has anyone tested cascading replication *at all* before this? So, same setup as previous message. 1. Shut down master-master. 2. pg_ctl promote master-replica 3. replication breaks. error message on

Re: [HACKERS] Strange issues with 9.2 pg_basebackup replication

2012-05-13 Thread Thom Brown
On 13 May 2012 20:23, Josh Berkus j...@agliodbs.com wrote: More issues: the pg_basebackup -x stream on the cascading replica won't complete until the xlog rotates on the master.  (again, this is Tuesday's snapshot). This is already on the open items list:

[HACKERS] Update comments for PGPROC/PGXACT split

2012-05-13 Thread Noah Misch
Many comment references to PGPROC and MyProc should now refer to PGXACT and MyPgXact. This patch attempts to cover all such cases. In some places, a comment refers collectively to all the xid-related fields, which span both structures. I variously changed those to refer to either or both

Re: [HACKERS] Exclusion Constraints on Arrays?

2012-05-13 Thread Robert Haas
On Sun, May 13, 2012 at 12:12 AM, David E. Wheeler da...@justatheory.com wrote: I need a constraint that ensures that a text[] column has only unique values -- that is, that there is no overlap of values between rows. I thought this was a made-to-order for an exclusion constraint. So I tried

[HACKERS] Why do we still have commit_delay and commit_siblings?

2012-05-13 Thread Peter Geoghegan
This code is our pre-9.2 group commit implementation, pretty much in its entirety: if (CommitDelay 0 enableFsync MinimumActiveBackends(CommitSiblings)) pg_usleep(CommitDelay); This code is placed directly before the RecordTransactionCommit() call of XLogFlush(). It seeks to

Re: [HACKERS] Why do we still have commit_delay and commit_siblings?

2012-05-13 Thread Robert Haas
On Sun, May 13, 2012 at 7:17 PM, Peter Geoghegan pe...@2ndquadrant.com wrote: Have I missed something? Why do we keep around this foot-gun that now appears to me to be at best useless and at worst harmful? I can see why the temptation to keep this setting around used to exist, since it

Re: [HACKERS] [BUG] Checkpointer on hot standby runs without looking checkpoint_segments

2012-05-13 Thread Kyotaro HORIGUCHI
Hello, I've returned from my overseas trip for just over one week. # and I'll leave Japan again after this...     restorePtr = replayPtr = receivePtr But XLByteLT(recievePtr, replayPtr) this should not return true under the condition above.. Something wrong in my assumption? When

Re: [HACKERS] Gsoc2012 idea, tablesample

2012-05-13 Thread Qi Huang
Date: Fri, 11 May 2012 15:59:51 +0200 From: s...@keybit.net To: robertmh...@gmail.com CC: kevin.gritt...@wicourts.gov; a...@cybertec.at; j...@agliodbs.com; and...@anarazel.de; alvhe...@commandprompt.com; heikki.linnakan...@enterprisedb.com; cbbro...@gmail.com; neil.con...@gmail.com;

Re: [HACKERS] Bugs in our Windows socket code

2012-05-13 Thread james
That is, if you request FD_WRITE events for a pre-existing socket with WSAEventSelect, you will not get one until the outbound network buffer has been filled and then has partially emptied. (This is incredibly broken, but Microsoft evidently has no intention of fixing it.) I think you should