Re: Review: Patch to compute Max LSN of Data Pages

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: 'Muhammad Usama' <m(dot)usama(at)gmail(dot)com>, 'Robert Haas' <robertmhaas(at)gmail(dot)com>, 'Fujii Masao' <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Review: Patch to compute Max LSN of Data Pages
Date: 2012-11-27 22:06:09
Message-ID: 20121127220609.GS4227@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2012-11-27 22:09:15 Re: MySQL search query is not executing in Postgres DB
Previous Message Peter Eisentraut 2012-11-27 22:05:58 Re: MySQL search query is not executing in Postgres DB