Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-06-18 Thread Daniel Farina
On Thu, Mar 22, 2012 at 5:26 PM, Daniel Farina 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 the wraparoun

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-30 Thread Andrey Velikoredchanin
2012/3/29 Marko Kreen > 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 2.6.32-5-amd64 #1 SMP Fr

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 wrote: > > Next question: how can flipping archive_mode on and off, > > with restarts, near wraparound point, break epoch on master? > > > >  http://lists.pgfoundry.org/pipermail/skytools-us

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Simon Riggs
On Thu, Mar 29, 2012 at 3:04 PM, Marko Kreen 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 wrote: >> > Patch coming in a few hours. >> >> This is more straightforward than I was thinking. We just need to >> initialise XLogCt

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 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. That should fix t

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Simon Riggs
On Thu, Mar 29, 2012 at 12:06 PM, Simon Riggs 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 Development, 24x7 Support, Tra

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Simon Riggs
On Thu, Mar 29, 2012 at 11:12 AM, Marko Kreen 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 when a safe

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

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-29 Thread Simon Riggs
On Wed, Mar 28, 2012 at 10:54 PM, Simon Riggs wrote: > On Wed, Mar 28, 2012 at 10:24 PM, Simon Riggs wrote: >> On Wed, Mar 28, 2012 at 9:48 PM, Marko Kreen wrote: >>> On Fri, Mar 23, 2012 at 08:52:40AM +, Simon Riggs wrote: Master pg_controldata - OK txid_current_snapshot() - OK St

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 wrote: > > On Wed, Mar 28, 2012 at 9:48 PM, Marko Kreen wrote: > >> On Fri, Mar 23, 2012 at 08:52:40AM +, Simon Riggs wrote: > >>> Master pg_controldata - OK txid_current_snapshot() -

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-28 Thread Simon Riggs
On Wed, Mar 28, 2012 at 10:24 PM, Simon Riggs wrote: > On Wed, Mar 28, 2012 at 9:48 PM, Marko Kreen 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 va

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-28 Thread Simon Riggs
On Wed, Mar 28, 2012 at 9:48 PM, Marko Kreen 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 with slaves

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: http://lists

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-23 Thread Daniel Farina
On Fri, Mar 23, 2012 at 1:52 AM, Simon Riggs 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 believe this is the

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-23 Thread Simon Riggs
On Fri, Mar 23, 2012 at 12:26 AM, Daniel Farina 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 the wraparo

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