Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-10-18 Thread Amit Kapila
On Fri, Oct 18, 2013 at 9:24 PM, Alvaro Herrera wrote: > Robert Haas escribió: > >> A broader complaint I have with this patch is that it almost but >> not-quite solves a problem I've had a few times in the past: namely, >> searching through the data directory for data blocks which have LSNs >> in

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-10-18 Thread Amit Kapila
On Fri, Oct 18, 2013 at 9:01 PM, Robert Haas wrote: > On Wed, Oct 9, 2013 at 2:28 PM, Robert Haas wrote: >> On Sat, Sep 14, 2013 at 3:03 AM, Amit Kapila wrote: On Monday, July 08, 2013 5:16 PM Andres Freund wrote: >On 2013-07-08 17:10:43 +0530, Amit Kapila wrote: >> On Monday, July 0

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-10-18 Thread Alvaro Herrera
Robert Haas escribió: > A broader complaint I have with this patch is that it almost but > not-quite solves a problem I've had a few times in the past: namely, > searching through the data directory for data blocks which have LSNs > in the future. This has come up a few times for me, and this too

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-10-18 Thread Robert Haas
On Wed, Oct 9, 2013 at 2:28 PM, Robert Haas wrote: > On Sat, Sep 14, 2013 at 3:03 AM, Amit Kapila wrote: >>>On Monday, July 08, 2013 5:16 PM Andres Freund wrote: On 2013-07-08 17:10:43 +0530, Amit Kapila wrote: > On Monday, July 08, 2013 4:26 PM Andres Freund wrote: > > On 2013-07-08

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-10-09 Thread Amit Kapila
On Wed, Oct 9, 2013 at 11:58 PM, Robert Haas wrote: > On Sat, Sep 14, 2013 at 3:03 AM, Amit Kapila wrote: >>>On Monday, July 08, 2013 5:16 PM Andres Freund wrote: On 2013-07-08 17:10:43 +0530, Amit Kapila wrote: > On Monday, July 08, 2013 4:26 PM Andres Freund wrote: > > On 2013-07-08

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-10-09 Thread Robert Haas
On Sat, Sep 14, 2013 at 3:03 AM, Amit Kapila wrote: >>On Monday, July 08, 2013 5:16 PM Andres Freund wrote: >>>On 2013-07-08 17:10:43 +0530, Amit Kapila wrote: On Monday, July 08, 2013 4:26 PM Andres Freund wrote: > On 2013-07-08 16:17:54 +0530, Hari Babu wrote: > > +This utilit

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-09-14 Thread Amit Kapila
>On Monday, July 08, 2013 5:16 PM Andres Freund wrote: >>On 2013-07-08 17:10:43 +0530, Amit Kapila wrote: >>> On Monday, July 08, 2013 4:26 PM Andres Freund wrote: >>> > On 2013-07-08 16:17:54 +0530, Hari Babu wrote: >>> > > +This utility can also be used to decide whether backup is >>> > requi

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-08 Thread Amit Kapila
On Monday, July 08, 2013 5:16 PM Andres Freund wrote: > On 2013-07-08 17:10:43 +0530, Amit Kapila wrote: > > On Monday, July 08, 2013 4:26 PM Andres Freund wrote: > > > On 2013-07-08 16:17:54 +0530, Hari Babu wrote: > > > > +This utility can also be used to decide whether backup is > > > requir

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-08 Thread Hari Babu
On Monday, July 08, 2013 5:16 PM Andres Freund wrote: >On 2013-07-08 17:10:43 +0530, Amit Kapila wrote: >> On Monday, July 08, 2013 4:26 PM Andres Freund wrote: >> > On 2013-07-08 16:17:54 +0530, Hari Babu wrote: >> > > +This utility can also be used to decide whether backup is >> > required or

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-08 Thread 'Andres Freund'
On 2013-07-08 17:10:43 +0530, Amit Kapila wrote: > On Monday, July 08, 2013 4:26 PM Andres Freund wrote: > > On 2013-07-08 16:17:54 +0530, Hari Babu wrote: > > > +This utility can also be used to decide whether backup is > > required or not when the data page > > > +in old-master precedes t

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-08 Thread Amit Kapila
On Monday, July 08, 2013 4:26 PM Andres Freund wrote: > On 2013-07-08 16:17:54 +0530, Hari Babu wrote: > > +This utility can also be used to decide whether backup is > required or not when the data page > > +in old-master precedes the last applied LSN in old-standby > (i.e., new-master) at

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-08 Thread 'Andres Freund'
On 2013-07-08 16:17:54 +0530, Hari Babu wrote: > +This utility can also be used to decide whether backup is required or > not when the data page > +in old-master precedes the last applied LSN in old-standby (i.e., > new-master) at the > +moment of the failover. > + > + I don't t

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-08 Thread Hari Babu
On Friday, July 05, 2013 6:48 PM Hari Babu wrote: >On Thursday, July 04, 2013 11:19 PM Robert Haas wrote: The patch is updated with the following changes. 1.If the input data is data directory, all the errors occurred are displayed at once instead of one error at a time. 2.Fixed the problem of r

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-05 Thread Hari Babu
On Thursday, July 04, 2013 11:19 PM Robert Haas wrote: >+ fprintf(stderr, _("%s: .. file \"%s\" for seeking: %s\n"), >+ progname, filename, strerror(errno)); >Weird error message style - what's with the ".."? >+ fprintf(stderr, _("%s: .. fil

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-04 Thread Robert Haas
This looks better. + fprintf(stderr, _("%s: .. file \"%s\" for seeking: %s\n"), + progname, filename, strerror(errno)); Weird error message style - what's with the ".."? + fprintf(stderr, _("%s: .. file \"%s\" length is more than segment

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-04 Thread Robert Haas
On Thu, Jul 4, 2013 at 2:14 AM, Amit Kapila wrote: > It can cause error "too many levels of symbolic links" Sure, so you report the error and exit. No problem. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-04 Thread Hari Babu
On Wednesday, July 03, 2013 1:26 AM Robert Haas Wrote: >On Tue, Jun 25, 2013 at 1:42 PM, Andres Freund wrote: >> I think the usecase for this utility isn't big enough to be included in >> postgres since it really can only help in a very limited >> circumstances. And I think it's too likely to be

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-03 Thread Amit Kapila
On Wednesday, July 03, 2013 7:41 PM Robert Haas wrote: > On Wed, Jul 3, 2013 at 9:51 AM, Amit Kapila > wrote: > > amit@linux:~> md test > > amit@linux:~> cd test > > amit@linux:~/test> ln -s ~/test link_test > > amit@linux:~/test> ls > > link_test > > amit@linux:~/test> cd link_test > > amit@linux

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-03 Thread Robert Haas
On Wed, Jul 3, 2013 at 9:51 AM, Amit Kapila wrote: > amit@linux:~> md test > amit@linux:~> cd test > amit@linux:~/test> ln -s ~/test link_test > amit@linux:~/test> ls > link_test > amit@linux:~/test> cd link_test > amit@linux:~/test/link_test> ls > link_test > amit@linux:~/test/link_test> cd link_

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-03 Thread Amit Kapila
> -Original Message- > From: Robert Haas [mailto:robertmh...@gmail.com] > Sent: Wednesday, July 03, 2013 6:40 PM > To: Amit Kapila > Cc: Andres Freund; Josh Berkus; pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-03 Thread Robert Haas
On Wed, Jul 3, 2013 at 8:44 AM, Amit Kapila wrote: >> Why does this patch need all of this fancy path-handling logic - >> specifically, remove_parent_refernces() and make_absolute_path()? >> Surely its needs are not that different from pg_ctl or pg_resetxlog or >> pg_controldata. If they all need

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-03 Thread Amit Kapila
On Wednesday, July 03, 2013 1:26 AM Robert Haas wrote: > On Tue, Jun 25, 2013 at 1:42 PM, Andres Freund > wrote: > > I think the usecase for this utility isn't big enough to be included > in > > postgres since it really can only help in a very limited > > circumstances. And I think it's too likely

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-07-02 Thread Robert Haas
On Tue, Jun 25, 2013 at 1:42 PM, Andres Freund wrote: > I think the usecase for this utility isn't big enough to be included in > postgres since it really can only help in a very limited > circumstances. And I think it's too likely to be misused for stuff it's > not useable for (e.g. remastering).

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-26 Thread Amit Kapila
On Thursday, June 27, 2013 11:26 AM Andres Freund wrote: > On 2013-06-27 11:16:25 +0530, Amit Kapila wrote: > > On Wednesday, June 26, 2013 10:19 PM Fujii Masao wrote: > > > On Wed, Jun 26, 2013 at 8:57 PM, Amit Kapila > > > > >> > One more use case for which this utility was done is as > below:

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-26 Thread 'Andres Freund'
On 2013-06-27 11:16:25 +0530, Amit Kapila wrote: > On Wednesday, June 26, 2013 10:19 PM Fujii Masao wrote: > > On Wed, Jun 26, 2013 at 8:57 PM, Amit Kapila > > >> > One more use case for which this utility was done is as below: > > >> > It will be used to decide that on new-standby (old-master

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-26 Thread Amit Kapila
On Wednesday, June 26, 2013 10:19 PM Fujii Masao wrote: > On Wed, Jun 26, 2013 at 8:57 PM, Amit Kapila > wrote: > > On Wednesday, June 26, 2013 4:40 PM Andres Freund wrote: > >> Hi Amit, > >> > >> On 2013-06-26 16:22:28 +0530, Amit Kapila wrote: > >> > On Wednesday, June 26, 2013 1:20 PM Andres Fr

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-26 Thread Fujii Masao
On Wed, Jun 26, 2013 at 8:57 PM, Amit Kapila wrote: > On Wednesday, June 26, 2013 4:40 PM Andres Freund wrote: >> Hi Amit, >> >> On 2013-06-26 16:22:28 +0530, Amit Kapila wrote: >> > On Wednesday, June 26, 2013 1:20 PM Andres Freund wrote: >> > > On 2013-06-26 08:50:27 +0530, Amit Kapila wrote: >>

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-26 Thread Amit Kapila
On Wednesday, June 26, 2013 4:40 PM Andres Freund wrote: > Hi Amit, > > On 2013-06-26 16:22:28 +0530, Amit Kapila wrote: > > On Wednesday, June 26, 2013 1:20 PM Andres Freund wrote: > > > On 2013-06-26 08:50:27 +0530, Amit Kapila wrote: > > > > On Tuesday, June 25, 2013 11:12 PM Andres Freund wrot

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-26 Thread Andres Freund
Hi Amit, On 2013-06-26 16:22:28 +0530, Amit Kapila wrote: > On Wednesday, June 26, 2013 1:20 PM Andres Freund wrote: > > On 2013-06-26 08:50:27 +0530, Amit Kapila wrote: > > > On Tuesday, June 25, 2013 11:12 PM Andres Freund wrote: > > > > On 2013-06-16 17:19:49 -0700, Josh Berkus wrote: > > > > >

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-26 Thread Amit Kapila
On Wednesday, June 26, 2013 1:20 PM Andres Freund wrote: > On 2013-06-26 08:50:27 +0530, Amit Kapila wrote: > > On Tuesday, June 25, 2013 11:12 PM Andres Freund wrote: > > > On 2013-06-16 17:19:49 -0700, Josh Berkus wrote: > > > > Amit posted a new version of this patch on January 23rd. But > last

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-26 Thread Andres Freund
On 2013-06-26 08:50:27 +0530, Amit Kapila wrote: > On Tuesday, June 25, 2013 11:12 PM Andres Freund wrote: > > On 2013-06-16 17:19:49 -0700, Josh Berkus wrote: > > > Amit posted a new version of this patch on January 23rd. But last > > > comment on it by Tom is "not sure everyone wants this". > >

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-25 Thread Amit Kapila
On Tuesday, June 25, 2013 11:12 PM Andres Freund wrote: > Hi, > > On 2013-06-16 17:19:49 -0700, Josh Berkus wrote: > > Amit posted a new version of this patch on January 23rd. But last > > comment on it by Tom is "not sure everyone wants this". > > > > https://commitfest.postgresql.org/action/pat

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-25 Thread Andres Freund
Hi, On 2013-06-16 17:19:49 -0700, Josh Berkus wrote: > Amit posted a new version of this patch on January 23rd. But last > comment on it by Tom is "not sure everyone wants this". > > https://commitfest.postgresql.org/action/patch_view?id=905 > ... so, what's the status of this patch? That comm

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-06-16 Thread Josh Berkus
Hackers, Amit posted a new version of this patch on January 23rd. But last comment on it by Tom is "not sure everyone wants this". https://commitfest.postgresql.org/action/patch_view?id=905 ... so, what's the status of this patch? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-01-21 Thread Amit kapila
On Sunday, January 20, 2013 10:50 AM Amit kapila wrote: On Sunday, January 20, 2013 4:04 AM Dickson S. Guedes wrote: 2013/1/18 Amit kapila : >>> Please find the rebased Patch for Compute MAX LSN. >>The function 'remove_parent_refernces' couldn't be called >>'remove_parent_references' ? > Shall f

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-01-20 Thread Dickson S. Guedes
2013/1/20 Amit kapila : > On Sunday, January 20, 2013 4:04 AM Dickson S. Guedes wrote: > 2013/1/18 Amit kapila : >>> Please find the rebased Patch for Compute MAX LSN. > >>The function 'remove_parent_refernces' couldn't be called >>'remove_parent_references' ? > > Shall fix this. > >> Why not an ex

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-01-19 Thread Amit kapila
On Sunday, January 20, 2013 4:04 AM Dickson S. Guedes wrote: 2013/1/18 Amit kapila : >> Please find the rebased Patch for Compute MAX LSN. >The function 'remove_parent_refernces' couldn't be called >'remove_parent_references' ? Shall fix this. > Why not an extension in PGXN instead of a contrib

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-01-19 Thread Dickson S. Guedes
2013/1/18 Amit kapila : > Please find the rebased Patch for Compute MAX LSN. The function 'remove_parent_refernces' couldn't be called 'remove_parent_references' ? Why not an extension in PGXN instead of a contrib? Regards, -- Dickson S. Guedes mail/xmpp: gue...@guedesoft.net - skype: guediz ht

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-01-18 Thread Amit kapila
Please find the rebased Patch for Compute MAX LSN. There was one compilation error as "undefined reference to XLByteLT " as earlier XLogRecPtr was a structure as typedef struct XLogRecPtr { uint32xl

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-12-08 Thread Amit kapila
On Saturday, December 08, 2012 9:44 AM Tom Lane wrote: Amit kapila writes: > On Friday, December 07, 2012 7:43 PM Muhammad Usama wrote: >>> Although I am thinking why are you disallowing the absolute path of file. >>> Any particular reason? >> The reason to disallow absolute path is that, we nee

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-12-07 Thread Tom Lane
Amit kapila writes: > On Friday, December 07, 2012 7:43 PM Muhammad Usama wrote: >> Although I am thinking why are you disallowing the absolute path of file. >> Any particular reason? > The reason to disallow absolute path is that, we need to test on multiple > platforms and to keep the scope l

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-12-07 Thread Amit kapila
Hi Muhammad, On Friday, December 07, 2012 7:43 PM Muhammad Usama wrote: >Hi Amit On Mon, Dec 3, 2012 at 6:56 PM, Amit kapila mailto:amit.kap...@huawei.com>> wrote: >>I think we should expect provided path to be relative to current directory >> or may consider it to be relative to either one of D

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-12-07 Thread Muhammad Usama
Hi Amit On Mon, Dec 3, 2012 at 6:56 PM, Amit kapila wrote: > >I think we should expect provided path to be relative to current > directory > > or may consider it to be relative to either one of Data or CWD. > >Because normally we expect path to be relative to CWD if some program is > > asking f

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-12-03 Thread Amit kapila
>I think we should expect provided path to be relative to current directory > or may consider it to be relative to either one of Data or CWD. >Because normally we expect path to be relative to CWD if some program is > asking for path in command line. Please find the attached patch to make the path

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-11-28 Thread Amit Kapila
On Wednesday, November 28, 2012 11:49 AM Muhammad Usama wrote: On Tue, Nov 27, 2012 at 5:52 PM, Amit kapila wrote: Friday, November 23, 2012 5:38 AM Muhammad Usama wrote:   >>> - For -p {file | dir}  option the utility expects the file path relative to >>> the specified data directory path which m

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-11-27 Thread Muhammad Usama
On Wed, Nov 28, 2012 at 3:06 AM, Alvaro Herrera wrote: > 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 rela

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-11-27 Thread Muhammad Usama
On Tue, Nov 27, 2012 at 5:52 PM, Amit kapila wrote: > Friday, November 23, 2012 5:38 AM Muhammad Usama wrote: > > > Observations and Comments > > --- > > > - If no option is given to pg_computemaxlsn utility then we get a wrong > > error message > > ./pg_c

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-11-27 Thread Amit Kapila
On Wednesday, November 28, 2012 3:36 AM Alvaro Herrera wrote: > 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 a

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-11-27 Thread Alvaro Herrera
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.nOr >

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-11-27 Thread Amit kapila
Friday, November 23, 2012 5:38 AM Muhammad Usama wrote: > Observations and Comments > --- > - If no option is given to pg_computemaxlsn utility then we get a wrong > error message > ./pg_computemaxlsn ../data > pg_computemaxlsn: file or directory "(null)" e

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-11-26 Thread Amit Kapila
Friday, November 23, 2012 5:38 AM Muhammad Usama wrote: > Hi Amit > I have reviewed and tested the patch, Following are my observations and comments. Thank you for the review. I need some clarification regarding some of the comments > Observations and Comments > --

[HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-11-22 Thread Muhammad Usama
Hi Amit I have reviewed and tested the patch, Following are my observations and comments. Basic stuff - - Patch applies OK - Compiles cleanly with no warnings - All regression tests pass. Observations and Comments --- - If no option is gi