Re: Set new system identifier using pg_resetxlog

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Set new system identifier using pg_resetxlog
Date: 2014-06-26 22:51:02
Message-ID: 53ACA3D6.9080304@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26/06/14 19:57, Sawada Masahiko wrote:
> $ pg_resetxlog -s0 data
> Transaction log reset
> $ pg_controldata data | grep "Database system identifier"
> Database system identifier: 6029284919152642525
>
> this patch dose not works fine with -s0.
>

Yes, this is a bug, 0 input should throw error, which it does now.

Also based on Alvaro's comment, I replaced the scanf parsing code with
strtoul(l) function.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
pg_resetxlog-sysid-v3.patch text/x-diff 5.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2014-06-26 23:01:22 Re: Window function optimisation, allow pushdowns of items matching PARTITION BY clauses
Previous Message Andres Freund 2014-06-26 22:40:26 Re: Spinlocks and compiler/memory barriers