Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-06-18 Thread Daniel Farina
On Thu, Mar 22, 2012 at 5:26 PM, Daniel Farina dan...@heroku.com wrote: Some time ago I reported bug 6291[0], which reported a Xid wraparound, both as reported in pg_controldata and by txid_current_snapshot. Unfortunately, nobody could reproduce it. Today, the same system of ours just passed

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-30 Thread Andrey Velikoredchanin
2012/3/29 Marko Kreen mark...@gmail.com I can't find a place where WAL replay updates values under XLogCtl. If that really does not happen, that would explain why standbys can see wrong epoch. No clue yet how master can get broken. Details about environment: Debian Linux db

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Marko Kreen
On Wed, Mar 28, 2012 at 10:54:58PM +0100, Simon Riggs wrote: On Wed, Mar 28, 2012 at 10:24 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Mar 28, 2012 at 9:48 PM, Marko Kreen mark...@gmail.com wrote: On Fri, Mar 23, 2012 at 08:52:40AM +, Simon Riggs wrote: Master pg_controldata -

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Simon Riggs
On Wed, Mar 28, 2012 at 10:54 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Mar 28, 2012 at 10:24 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Mar 28, 2012 at 9:48 PM, Marko Kreen mark...@gmail.com wrote: On Fri, Mar 23, 2012 at 08:52:40AM +, Simon Riggs wrote: Master

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Marko Kreen
On Thu, Mar 29, 2012 at 10:37:54AM +0100, Simon Riggs wrote: When the standby receives the checkpoint record, it stores the information in 2 places: i) directly into ControlFile-checkPointCopy ii) and then into XLogCtl when a safe restartpoint occurs In RecoveryRestartPoint() I see: -

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Simon Riggs
On Thu, Mar 29, 2012 at 11:12 AM, Marko Kreen mark...@gmail.com wrote: On Thu, Mar 29, 2012 at 10:37:54AM +0100, Simon Riggs wrote: When the standby receives the checkpoint record, it stores the information in 2 places: i) directly into ControlFile-checkPointCopy ii) and then into XLogCtl

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Simon Riggs
On Thu, Mar 29, 2012 at 12:06 PM, Simon Riggs si...@2ndquadrant.com wrote: Patch coming in a few hours. This is more straightforward than I was thinking. We just need to initialise XLogCtl at the right place. --  Simon Riggs   http://www.2ndQuadrant.com/  PostgreSQL

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Marko Kreen
On Thu, Mar 29, 2012 at 02:46:23PM +0100, Simon Riggs wrote: On Thu, Mar 29, 2012 at 12:06 PM, Simon Riggs si...@2ndquadrant.com wrote: Patch coming in a few hours. This is more straightforward than I was thinking. We just need to initialise XLogCtl at the right place. Looks good to me.

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Simon Riggs
On Thu, Mar 29, 2012 at 3:04 PM, Marko Kreen mark...@gmail.com wrote: On Thu, Mar 29, 2012 at 02:46:23PM +0100, Simon Riggs wrote: On Thu, Mar 29, 2012 at 12:06 PM, Simon Riggs si...@2ndquadrant.com wrote: Patch coming in a few hours. This is more straightforward than I was thinking. We just

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Marko Kreen
On Thu, Mar 29, 2012 at 03:23:01PM +0100, Simon Riggs wrote: On Thu, Mar 29, 2012 at 3:04 PM, Marko Kreen mark...@gmail.com wrote: Next question: how can flipping archive_mode on and off, with restarts, near wraparound point, break epoch on master?  

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-28 Thread Marko Kreen
On Fri, Mar 23, 2012 at 08:52:40AM +, Simon Riggs wrote: Master pg_controldata - OK txid_current_snapshot() - OK Standby pg_controldata - OK txid_current_snapshot() - lower value On Skytools list is report about master with slaves, but the lower value appears on master too:

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-28 Thread Simon Riggs
On Wed, Mar 28, 2012 at 9:48 PM, Marko Kreen mark...@gmail.com wrote: On Fri, Mar 23, 2012 at 08:52:40AM +, Simon Riggs wrote: Master pg_controldata - OK txid_current_snapshot() - OK Standby pg_controldata - OK txid_current_snapshot() - lower value On Skytools list is report about master

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-28 Thread Simon Riggs
On Wed, Mar 28, 2012 at 10:24 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Mar 28, 2012 at 9:48 PM, Marko Kreen mark...@gmail.com wrote: On Fri, Mar 23, 2012 at 08:52:40AM +, Simon Riggs wrote: Master pg_controldata - OK txid_current_snapshot() - OK Standby pg_controldata - OK

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-23 Thread Simon Riggs
On Fri, Mar 23, 2012 at 12:26 AM, Daniel Farina dan...@heroku.com wrote: Some time ago I reported bug 6291[0], which reported a Xid wraparound, both as reported in pg_controldata and by txid_current_snapshot. Unfortunately, nobody could reproduce it. Today, the same system of ours just

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-23 Thread Daniel Farina
On Fri, Mar 23, 2012 at 1:52 AM, Simon Riggs si...@2ndquadrant.com wrote: So we have this? Master pg_controldata - OK txid_current_snapshot() - OK Standby pg_controldata - OK txid_current_snapshot() - lower value Are there just 2 standbys? So all standbys have acted identically? Yes, I

[HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-22 Thread Daniel Farina
Some time ago I reported bug 6291[0], which reported a Xid wraparound, both as reported in pg_controldata and by txid_current_snapshot. Unfortunately, nobody could reproduce it. Today, the same system of ours just passed the wraparound mark successfully at this time, incrementing the epoch.