Re: Logical replication timeout - Mailing list pgsql-hackers

From RECHTÉ Marc
Subject Re: Logical replication timeout
Date
Msg-id 1819123360.217678156.1734962211053.JavaMail.zimbra@meteo.fr
Whole thread Raw
In response to Logical replication timeout  (RECHTÉ Marc <marc.rechte@meteo.fr>)
List 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
pointerwithout a cast [-Wint-conversion]
 
 4304 |                         segno = lfirst(lc);
      |                               ^

pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: Make tuple deformation faster
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: Use "protocol options" name instead of "protocol extensions" everywhere