From: | Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Issues with two-server Synch Rep |
Date: | 2010-10-12 02:17:10 |
Message-ID: | AANLkTineHKm3RqBYyxxiim9LCH4gLOa+UOmdQfcc1-yV@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Oct 11, 2010 at 7:16 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Mon, 2010-10-11 at 16:07 -0400, Robert Haas wrote:
> > >> It would be far better if we could decouple master cleanup from
> > >> standby cleanup, so that only the machine that actually has the old
> > >> query gets bloated. However, no one seems excited about writing that
> > >> code.
> > >
> > > That doesn't seem just a matter of code, it seems like a major design
> > > conflict.
> >
> > Yes. I had the idea of trying to fix this by allowing the standby to
> > retain old versions of entire pages that got cleaned up on the master,
> > until the transactions that might want to read the old pages were
> > gone. But that may be prohibitively difficult, not sure.
>
> I think you'd end up having a notion of a snapshot of block information
> (like a FS with snapshots) inside of postgres.
>
> Sounds like a lot of complexity to me, and the only benefit I see is
> moving bloat from the primary to the standby. Granted, that would be
> nice, but I would expect some costs aside from just the complexity.
>
I had this idea when HS was being initially implemented, and I saw two
problems with it.
.) Identifying block versions in buffers. Our XID based MVCC like scheme
would work, but we already have a block header which we would want to trim.
.) Effectively every block cleanup will have to create a copy of the block
because more often than not there's at least one transaction in the system,
and when it asks, we need to hand it the old version.
Regards,
--
gurjeet.singh
@ EnterpriseDB - The Enterprise Postgres Company
http://www.EnterpriseDB.com
singh(dot)gurjeet(at){ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet
Mail sent from my BlackLaptop device
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2010-10-12 02:19:04 | Re: Slow count(*) again... |
Previous Message | Scott Carey | 2010-10-12 02:02:51 | Re: Slow count(*) again... |