Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1b776d5

Browse files
committed
more comments in test_decoding.c
1 parent215d047 commit1b776d5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎contrib/test_decoding/test_decoding.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,17 @@ pg_filter_prepare(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
311311
/*
312312
* For the sake of simplicity we just ignore in-progess transaction
313313
* in this extension, as they may abort during deconing.
314+
*
315+
* It is possible to move that LWLockRelease() to pg_decode_prepare_txn()
316+
* and allow decoding of running prepared tx, but such lock will prevent
317+
* any 2pc transaction commit during decoding time, that can be big
318+
* enough in case of massive changes/inserts in that tx.
319+
*
320+
* Better solution would be to use own custom lock here and register
321+
* XACT_EVENT_PRE_COMMIT callback in extension to conflict with this
322+
* lock. Decode should hold it in shared way, while commit in excluseve.
323+
* That will allow to lock stuff granularly ang block only tx that is
324+
* being decoded.
314325
*/
315326
LWLockRelease(TwoPhaseStateLock);
316327
return true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp