Re: Deriving Recovery Snapshots

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Deriving Recovery Snapshots
Дата
Msg-id 1224708422.27145.484.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответ на Re: Deriving Recovery Snapshots  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: Deriving Recovery Snapshots  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Deriving Recovery Snapshots  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On Wed, 2008-10-22 at 22:38 +0300, Heikki Linnakangas wrote:
> Simon Riggs wrote:
> > If you don't mark subtrans, you will need to keep things in shared
> > memory. I agree you can defer marking subtrans until your shared memory
> > fills, but you will still need to keep track of the parent for each
> > subtransaction until you do. If you don't *know* the parent, how will
> > you do this? You haven't explained how you will write the relationship
> > between a subtransaction and its parent into WAL, for each
> > subtransaction and for an arbitrarily large number of subtransactions.
> 
> I was thinking that it's done in AssignTransactionId(). Similarly to 
> what you're doing in your patch, but instead of just one xid with it's 
> parent, a list of (xid, parent) pairs would be stored in the WAL record.

> Upon replaying that WAL record, those parent-child relationships are 
> recorded in subtrans, and the child xids are removed from UnobservedXids.

But once you reach 64 transactions, you'll need to write an extra WAL
record for every subtransaction, which currently I've managed to avoid.

I understand what you hope to achieve, but right now my focus is on
achieving correctness within next few days, not on reworking parts of
the patch that seem to work correctly and are reasonably well optimised.
We can discuss rework in more detail in a couple of weeks. It's been a
worthwhile discussion, but lets look somewhere else now. I could really
use your help in thinking about prepared transactions.

Forgive me please, I don't wish to be rude, though I probably am.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Rework subtransaction commit protocol for hot standby.
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Rework subtransaction commit protocol for hot standby.