Re: logical decoding and replication of sequences, take 2

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: logical decoding and replication of sequences, take 2
Дата
Msg-id aa04d6e1-1cb2-c1f1-a8d7-df546ae14fa7@enterprisedb.com
обсуждение исходный текст
Ответ на Re: logical decoding and replication of sequences, take 2  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
On 7/19/23 12:53, Tomas Vondra wrote:
> ...
> 
> I did however look at the proposed alternative to the "created" flag.
> The attached 0006 part ditches the flag with XLOG_SMGR_CREATE decoding.
> The smgr_decode code needs a review (I'm not sure the
> skipping/fast-forwarding part is correct), but it seems to be working
> fine overall, although we need to ensure the WAL record has the correct XID.
> 

cfbot reported two issues in the patch - compilation warning, due to
unused variable in sequence_decode, and a failing test in test_decoding.

The second thing happens because when creating the relfilenode, it may
happen before we know the XID. The patch already does ensure the WAL
with the sequence data has XID, but that's later. And when the CREATE
record did not have the correct XID, that broke the logic deciding which
increments should be "transactional".

This forces us to assign XID a bit earlier (it'd happen anyway, when
logging the increment). There's a bit of a drawback, because we don't
have the relation yet, so we can't do RelationNeedsWAL ...


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Extracting cross-version-upgrade knowledge from buildfarm client
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Use of additional index columns in rows filtering