Re: [PATCH 10/16] Introduce the concept that wal has a 'origin' node - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: [PATCH 10/16] Introduce the concept that wal has a 'origin' node
Date
Msg-id 4FE09B5C02000025000486F3@gw.wicourts.gov
Whole thread Raw
In response to Re: [PATCH 10/16] Introduce the concept that wal has a 'origin' node  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: [PATCH 10/16] Introduce the concept that wal has a 'origin' node
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> wrote:
> Robert Haas wrote:
>> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> However, if we're dead set on doing it that way, let us put
>>> information that is only relevant to logical replication records
>>> into only the logical replication records.
>> Right.  If we decide we need this, and if we did decide to
>> conflate the WAL stream, both of which I disagree with as noted
>> above, then we still don't need it on every record.  It would
>> probably be sufficient for local transactions to do nothing at
>> all (and we can implicitly assume that they have master node ID =
>> local node ID) and transactions which are replaying remote
>> changes to emit one record per XID per checkpoint cycle
>> containing the remote node ID.
> Youve gone from a pretty trivial 150 line patch without any
> runtime/space overhead to something *considerably* more complex in
> that case though. 
I think it might be worth it.  I've done a lot of MM replication,
and so far have not had to use a topology which allowed loops.  Not
only would you be reserving space in the WAL stream which was not
useful for those not using MM replication, you would be reserving it
when even many MM configurations would not need it.  Now you could
argue that the 16 bits you want to use are already there and are not
yet used for anything; but there are two counter-arguments to that:
you lose the opportunity to use them for something else, and you
might want more than 16 bits.
-Kevin


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [PATCH 04/16] Add embedded list interface (header only)
Next
From: Robert Haas
Date:
Subject: Re: performance regression in 9.2 when loading lots of small tables