Fork me on GitHub
#xtdb
<
2023-09-10
>
Martynas Maciulevičius05:09:24

I have my local tx log and I think about migrating it to some kind of persistent store, like postgres. Does this github issue mean that I can't do it easily? https://github.com/xtdb/xtdb/issues/1386 I don't talk about checkpoints because they're on-demand. I'm thinking about migrating the tx log. Or do you think that I shouldn't bother and instead create a snapshot?

Martynas Maciulevičius05:09:18

How does checkpointing work if I want to have Lucene index but I'd enable this index already after the database has advanced a little bit? Would it try to reindex the unindexed documents or would it only index items from newly ingested tx log? i.e. would it pick up old docs?

tatut17:09:20

Lucene will have its own checkpoints so yes it would index from start

tatut17:09:46

You need to configure the checkpointer for it separately

Martynas Maciulevičius02:09:02

But what if I would destroy the txlog and only then enable lucene? Then there would not be any tx log to pick it up :thinking_face:

tatut06:09:18

destroy the txlog? you would intentionally lose your data

Martynas Maciulevičius07:09:23

> destroy the txlog? you would intentionally lose your data This doesn't answer the question. If I have a long tx log and make a snapshot, can I throw away the first part of it? If I don't lose the snapshot. i.e. I'd only have the snapshot and tx-log after it. I'm not trying to get rid of the tx log.

tatut07:09:56

no, you should never throw away the tx-log or document store

Martynas Maciulevičius07:09:41

So even if I create a snapshot I should still have the tx log? Oh

tatut07:09:24

yes… snapshots can be thrown away as they can always be recreated from the golden stores… but not the other way around

Martynas Maciulevičius07:09:20

What I thought about was that I'd throw away the tx log before the snapshot and then the new index would have to somehow iterate through each indexed doc in the memory. It could also work but I was trying to make sure if this is the right idea.

Martynas Maciulevičius07:09:42

I'll have another question about txlog storage in separate comment.