Re: Logical insert/update/delete WAL records for custom table AMs
| От | Jeff Davis | 
|---|---|
| Тема | Re: Logical insert/update/delete WAL records for custom table AMs | 
| Дата | |
| Msg-id | 81447acaeea9afe73fb5a28e463aaa670a5158e3.camel@j-davis.com обсуждение исходный текст | 
| Ответ на | Re: Logical insert/update/delete WAL records for custom table AMs (Robert Haas <robertmhaas@gmail.com>) | 
| Список | pgsql-hackers | 
On Thu, 2022-03-31 at 09:05 -0400, Robert Haas wrote:
> 1. An AM that doesn't care about having anything happening during
> recovery, but wants to be able to get logical decoding to do some
> work. Maybe the intention of the AM is that data is available only
> when the server is not in recovery and all data is lost on shutdown,
> or maybe the AM has its own separate durability mechanism.
This is a speculative use case that is not what I would use it for, but
perhaps someone wants to do that with a table AM or maybe an FDW.
> 2. An AM that wants things to happen during recovery, but handles
> that
> separately. For example, maybe it logs all the data changes via
> log_newpage() and then separately emits these log records.
Yes, or Generic WAL. Generic WAL seems like a half-feature without this
Logical WAL patch, because it's hopeless to support logical
decoding/replication of whatever data you're logging with Generic WAL.
That's probably the strongest argument for this patch.
> 3. An AM that wants things to happen during recovery, and expects
> these records to serve that purpose. That would require getting
> control during WAL replay as well as during decoding, and would
> probably only work for an AM whose data is not block-structured (e.g.
> an in-memory btree that is dumped to disk at every checkpoint).
This patch would not work in this case because the records are ignored
during REDO.
Regards,
    Jeff Davis
		
	В списке pgsql-hackers по дате отправления: