Amit Kapila escribió:
>
> Friday, November 23, 2012 5:38 AM Muhammad Usama wrote:
> >- I think when finding the max LSN of single file the utility should
> > consider all relation segments.
> Would you like to find for all relation related segments:
> Like 12345, 12345.1 ... 12345.n Or
> 12345, 12345.1 ... and 12345_vm, 12345.1_vm
>
> But how about if user asks for 12345.4, do we need to find all greater
> than 12345.4?
>
> IMHO, as this utility is not aware of relation or any other logical
> entity and deals with only file or directory, it is okay to find
> only for that file.
Hmm. I think I'd expect that if I give pg_computemaxlsn a number, it
should consider that it is a relfilenode, and so it should get a list of
all segments for all forks of it. So if I give "12345" it should get
12345, 12345.1 and so on, and also 12345_vm 12345_vm.1 and so on.
However, if what I give it is a path, i.e. it contains a slash, I think
it should only consider the specific file mentioned. In that light, I'm
not sure that command line options chosen are the best set.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services