Thread: xlogdump behaviour translating dropped relations

xlogdump behaviour translating dropped relations

From
"Diogo Biazus"
Date:
I'm not sure about how the xlogdump should behave when translating oids of dropped relations.<br />Now  I'm just
showingthe oid, and ignoring the translation in these cases.<br />But may be it's a good idea to giva a hint to the
user(printing dropped). <br /><br />Any advices?<br />-- <br />Diogo Biazus - <a
href="mailto:diogob@gmail.com">diogob@gmail.com</a><br/>Móvel Consultoria<br /><a
href="http://www.movelinfo.com.br">http://www.movelinfo.com.br</a><br/><a href="http://www.postgresql.org.br">
http://www.postgresql.org.br</a>

Re: xlogdump behaviour translating dropped relations

From
Tom Lane
Date:
"Diogo Biazus" <diogob@gmail.com> writes:
> I'm not sure about how the xlogdump should behave when translating oids of
> dropped relations.

I'm not sure it should be making any attempt to translate anything.
What makes you think the oids even refer to the current database?
        regards, tom lane


Re: xlogdump behaviour translating dropped relations

From
"Diogo Biazus"
Date:

On 7/26/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Diogo Biazus" <diogob@gmail.com> writes:
> I'm not sure about how the xlogdump should behave when translating oids of
> dropped relations.

I'm not sure it should be making any attempt to translate anything.
What makes you think the oids even refer to the current database?

I'm getting a new database connection based on the dbNode of the current xlog record. And I expect that the user informed a connection to the backend that originated the xlog files. Is this not going to work?

I know that we can have some problem with the db user (if he does not have access to all databases), but we can advise the user on the docs about it.


--
Diogo Biazus - diogob@gmail.com
Móvel Consultoria
http://www.movelinfo.com.br
http://www.postgresql.org.br

Re: xlogdump behaviour translating dropped relations

From
Tom Lane
Date:
"Diogo Biazus" <diogob@gmail.com> writes:
> On 7/26/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm not sure it should be making any attempt to translate anything.
>> What makes you think the oids even refer to the current database?

> I'm getting a new database connection based on the dbNode of the current
> xlog record. And I expect that the user informed a connection to the backend
> that originated the xlog files. Is this not going to work?

No.  I for one need this thing to analyze WAL dumps from databases
I don't even have access to, let alone have up-and-running locally.
It's really not going to be acceptable for the program to fail if it
can't have access to a database matching what it sees in the log.
The dropped-relation problem is just the first manifestation you happen
to have run into of why that's an unacceptable restriction, but there
are other reasons.
        regards, tom lane


Re: xlogdump behaviour translating dropped relations

From
"Diogo Biazus"
Date:


On 7/26/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Diogo Biazus" <diogob@gmail.com> writes:
> On 7/26/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm not sure it should be making any attempt to translate anything.
>> What makes you think the oids even refer to the current database?

> I'm getting a new database connection based on the dbNode of the current
> xlog record. And I expect that the user informed a connection to the backend
> that originated the xlog files. Is this not going to work?

No.  I for one need this thing to analyze WAL dumps from databases
I don't even have access to, let alone have up-and-running locally.
It's really not going to be acceptable for the program to fail if it
can't have access to a database matching what it sees in the log.
The dropped-relation problem is just the first manifestation you happen
to have run into of why that's an unacceptable restriction, but there
are other reasons.

Agree, but this is only an option, and not even the default behavior.
So the program could still be used to analyze logs without access to the database.
But if you do have access to the cluster it might be useful to translate names if you are looking for some specific operation in order to recover a previous database state.
And if it isn't what other functionality would be good to help users determining a target xid for recovery?

--
Diogo Biazus - diogob@gmail.com
Móvel Consultoria
http://www.movelinfo.com.br
http://www.postgresql.org.br