Re: [HACKERS] Adding hook in BufferSync for backup purposes

2017-08-28 Thread Andrey Borodin
Hi hackers! > 8 авг. 2017 г., в 11:27, Tom Lane написал(а): > > My point is not to claim that we mustn't put a hook there. It's that what > such a hook could safely do is tightly constrained, and you've not offered > clear evidence that there's something useful to be done within those > constra

Re: [HACKERS] Adding hook in BufferSync for backup purposes

2017-08-07 Thread Tom Lane
Andrey Borodin writes: > 7 авг. 2017 г., в 18:37, Tom Lane написал(а): >> Yeah. Keep in mind that if the extension does anything at all that could >> possibly throw an error, and if that error condition persists across >> multiple tries, you will have broken the database completely: it will >> b

Re: [HACKERS] Adding hook in BufferSync for backup purposes

2017-08-07 Thread Andrey Borodin
Alvaro, Tom, thank you for your valuable comments. > Alvaro: > I remember discussing the topic of differential base-backups with > somebody (probably Marco and Gabriele). The idea we had was to have a > new relation fork which stores an LSN for each group of pages, > indicating the LSN of the ne

Re: [HACKERS] Adding hook in BufferSync for backup purposes

2017-08-07 Thread Tom Lane
Alvaro Herrera writes: > I suppose your hook idea lets you implement the LSN fork in an > extension, rather than having it be part of core. The idea of hooking > onto BufferSync makes me uneasy, though -- like it's not the correct > place to do it. Yeah. Keep in mind that if the extension does

Re: [HACKERS] Adding hook in BufferSync for backup purposes

2017-08-07 Thread Alvaro Herrera
Андрей Бородин wrote: > ==What== > I propose to add hook inside BufferSync() function it inform extensions that > we > are going to write pages to disk. Please see patch attached. I pass a > timestamp > of the checkpoint, but it would be good if we could also pass there number of > checkpoint or

[HACKERS] Adding hook in BufferSync for backup purposes

2017-08-06 Thread Андрей Бородин
Hi, hackers! I want to propose adding hook in BufferSync. ==Why==So that extensions could track pages changed between checkpoints. I think this can allow efficient differential backups taken right after checkpoint. And this functionality can be implemented as an extension. ==What==I propose to add