Re: pg_resetwal --next-transaction-id may cause database failed to restart. - Mailing list pgsql-hackers

From movead.li@highgo.ca
Subject Re: pg_resetwal --next-transaction-id may cause database failed to restart.
Date
Msg-id 2020070909314883952256@highgo.ca
Whole thread Raw
In response to pg_resetwal --next-transaction-id may cause database failed to restart.  ("movead.li@highgo.ca" <movead.li@highgo.ca>)
Responses Re: pg_resetwal --next-transaction-id may cause database failed to restart.
List pgsql-hackers

>> ISTM that a reasonable compromise is that if you use -x (or -c, -m, -O)
>> and the input value is outside the range supported by existing files,
>> then it's a fatal error; unless you use --force, which turns it into
>> just a warning.
 
>One potential problem is that you might be using --force for some
>other reason and end up forcing this, too. But maybe that's OK.
Yes it's true, so I try to add a new option to control this behavior, you
can see it in the last mail with attach.
 
>Perhaps we should consider the idea of having pg_resetwal create the
>relevant clog file and zero-fill it, if it doesn't exist already,
>rather than leaving that to to the DBA or the postmaster binary to do
>it. It seems like that is what people would want to happen in this
>situation.
I have considered this idea, but I think it produces files uncontrolled
by postmaster, so I think it may be unacceptable and give up.

In the case we force to write an unsafe value, we can create or extend
related files I think. Do you have any further idea, I can work out a new
patch.


Regards,
Highgo Software (Canada/China/Pakistan)
URL : www.highgo.ca
EMAIL: mailto:movead(dot)li(at)highgo(dot)ca

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: jsonpath versus NaN
Next
From: "movead.li@highgo.ca"
Date:
Subject: Re: A patch for get origin from commit_ts.