Timeline for archive_command: Can hardlink (ln) be used instead of cp?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 16, 2020 at 8:49 | comment | added | rsmoorthy |
Yes, I got that. wal_keep_segments is low now, But having understood it now, no point in pursuing that. Doing rsync / cp to another server and then archive to S3 is a saner option.
|
|
Nov 16, 2020 at 8:15 | comment | added | Laurenz Albe |
You could set wal_keep_segments high to delay the recycling, but it is not a guarantee - if your sync is delayed for whatever reason, you might still hot the problem.
|
|
Nov 16, 2020 at 8:13 | comment | added | rsmoorthy | Thanks @LaurenzAlbe. It seemed a good idea to me (using ln), but I can see the point about possible data corruption. | |
Nov 16, 2020 at 7:50 | vote | accept | rsmoorthy | ||
Nov 15, 2020 at 12:25 | comment | added | Laurenz Albe |
@Colin'tHart Yes, but OP didn't say anything about having replication slots. Rather than doing something complicated like that, why not write the data to S3 in archive_command ?
|
|
Nov 15, 2020 at 11:52 | comment | added | Colin 't Hart | As I mentioned in my comments, the recycling won't happen as long as there's an active replication slot needing it. The asker is basically trying to reinvent the wheel: Postgres will already do what he wants if he copies the WAL file directly to another server in the archive command. In addition, I believe many of his performance problems will go away if he switches to a much larger WAL size: 16MB files are just silly when maintaining a 10+TB database. | |
Nov 15, 2020 at 10:46 | history | answered | Laurenz Albe | CC BY-SA 4.0 |