Re: Don't choke on files that are removed while pg_rewind runs.
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, Justin Pryzby <pryzby@telsasoft.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Heikki Linnakangas <heikki.linnakangas@iki.fi>, Fujii Masao <masao.fujii@oss.nttdata.com>
Date: 2020-07-13T12:18:24Z
Lists: pgsql-hackers
On Mon, Jul 13, 2020 at 10:12:54AM +0200, Daniel Gustafsson wrote: > Does it? PGgetvalue will return an empty string and not NULL, so atol will > convert that to zero wont it? It can be argued whether zero is the right size > for a missing file, but it shouldn't crash at least. Nay, you are right. Thanks. > It does convey the meaning of code to do it after, since the data isn't useful > in case the filesize is zero, but I don't have strong feelings for/against. > Question is, rather than discard rows pulled from the server, should the query > be tweaked to not include it in the first place instead? That sounds like a good idea with an extra qual in the first part of the inner CTE, if coupled with a check to make sure that we never get a NULL result. Now there is IMO an argument to not complicate more this query as it is not like a lot of tuples would get filtered out anyway because of a NULL set of values? I don't have strong feelings for one approach or the other, but if I were to choose, I would just let the code as-is, without the change in the CTE. -- Michael
Commits
-
Fix handling of missing files when using pg_rewind with online source
- 18ec25412c08 9.5.23 landed
- 14fe8041395c 9.6.19 landed
- 23924feca065 10.14 landed
- c6d33d144086 11.9 landed
- 92927477ff70 12.4 landed
- 5f89bb4cf010 13.0 landed
- 1d09fb1f0a9c 14.0 landed
-
Don't choke on files that are removed while pg_rewind runs.
- b36805f3c54f 9.5.0 cited