Re: Logical replication timeout

From: RECHTÉ Marc <marc(dot)rechte(at)meteo(dot)fr>
To: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Logical replication timeout
Date: 2024-12-23 13:56:51
Message-ID: 1819123360.217678156.1734962211053.JavaMail.zimbra@meteo.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I came up with an alternate approach. In this approach we keep track
> of wal segment the transaction is part of. This helps to iterate
> through only required files during clean up.
>
> On my machine, I am running the testcase provided by you in [1]. It is
> generating ~1.9 million spill files. For me the transaction completed
> in 56sec.
> Cleanup (deletion of spill files) took around following time:
> With HEAD : ~ 5min
> With latest patch (attached here) : ~2min
>
> Can you test if this improves performance for you?
>
> The patch applies on HEAD.

Thanks again for this new patch.

Unfortunately it does not compile (17.2 source):

reorderbuffer.c: In function 'ReorderBufferSerializeTXN':
reorderbuffer.c:3771:72: error: passing argument 2 of 'lappend' makes pointer from integer without a cast [-Wint-conversion]
3771 | txn->walsgmts = lappend(txn->walsgmts, curOpenSegNo);
| ^~~~~~~~~~~~
| |
| XLogSegNo {aka long unsigned int}

and

reorderbuffer.c: In function 'ReorderBufferRestoreChanges':
reorderbuffer.c:4304:31: error: assignment to 'XLogSegNo' {aka 'long unsigned int'} from 'void *' makes integer from pointer without a cast [-Wint-conversion]
4304 | segno = lfirst(lc);
| ^

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2024-12-23 15:39:13 Re: Use "protocol options" name instead of "protocol extensions" everywhere
Previous Message Alexander Lakhin 2024-12-23 13:00:00 Re: Make tuple deformation faster