Thread: Usage of pg_waldump

Usage of pg_waldump

From
Dang Minh Huong
Date:

Hi,

 

I am confused with the Usage of pg_waldump (or pg_xlogdump).

 

The syntax is known as,

 

  pg_waldump [OPTION]... [STARTSEG [ENDSEG]]

 

Mean that, it could work with no arguments.

But the "no arguments specified" ERROR will be returned in that case.

 

  $ pg_waldump

  pg_waldump: no arguments specified

  Try "pg_waldump --help" for more information.

 

I wonder it should be,

 

  pg_waldump { OPTION... [STARTSEG [ENDSEG]] } | { [OPTION]... STARTSEG [ENDSEG] }

 

Have any comments?

 

 

Thanks,

---

Dang Minh Huong




Avast logo

Phần mềm Avast antivirus đã kiểm tra virus cho email này.
www.avast.com


Re: Usage of pg_waldump

From
Andres Freund
Date:
Hi,

On 2018-05-01 16:41:04 +0900, Dang Minh Huong wrote:
> The syntax is known as,
> 
>   pg_waldump [OPTION]... [STARTSEG [ENDSEG]]
> 
> Mean that, it could work with no arguments.
> But the "no arguments specified" ERROR will be returned in that case.
> 
>   $ pg_waldump
>   pg_waldump: no arguments specified
>   Try "pg_waldump --help" for more information.
> 
> I wonder it should be,
> 
>   pg_waldump { OPTION... [STARTSEG [ENDSEG]] } | { [OPTION]... STARTSEG [ENDSEG] }
> 
> Have any comments?

To me that doesn't seem like an improvement, looks a good chunk more
complicated. You'll get the error and the docs also tell you that some
arguments are needed.

Greetings,

Andres Freund


Re: Usage of pg_waldump

From
Andres Freund
Date:
Hi,

On 2018-05-01 16:41:04 +0900, Dang Minh Huong wrote:
> The syntax is known as,
> 
>   pg_waldump [OPTION]... [STARTSEG [ENDSEG]]
> 
> Mean that, it could work with no arguments.
> But the "no arguments specified" ERROR will be returned in that case.
> 
>   $ pg_waldump
>   pg_waldump: no arguments specified
>   Try "pg_waldump --help" for more information.
> 
> I wonder it should be,
> 
>   pg_waldump { OPTION... [STARTSEG [ENDSEG]] } | { [OPTION]... STARTSEG [ENDSEG] }
> 
> Have any comments?

To me that doesn't seem like an improvement, looks a good chunk more
complicated. You'll get the error and the docs also tell you that some
arguments are needed.

Greetings,

Andres Freund


Re: Usage of pg_waldump

From
"David G. Johnston"
Date:
On Tue, May 1, 2018 at 9:26 AM, Andres Freund <andres@anarazel.de> wrote:
Hi,

On 2018-05-01 16:41:04 +0900, Dang Minh Huong wrote:
> The syntax is known as,
>
>   pg_waldump [OPTION]... [STARTSEG [ENDSEG]]
>
> Mean that, it could work with no arguments.
> But the "no arguments specified" ERROR will be returned in that case.
>
>   $ pg_waldump
>   pg_waldump: no arguments specified
>   Try "pg_waldump --help" for more information.
>
> I wonder it should be,
>
>   pg_waldump { OPTION... [STARTSEG [ENDSEG]] } | { [OPTION]... STARTSEG [ENDSEG] }
>
> Have any comments?

To me that doesn't seem like an improvement, looks a good chunk more
complicated. You'll get the error and the docs also tell you that some
arguments are needed.

​Reading the v10 docs...

​note: there is either an extra space between the two closing brackets or a missing space before startseg

I suppose it would help to understand why an argument is required - providing a startseg implicitly sets path and timeline but both of those have defaults and so even without a startseg those two aren't required.  Since no other options are required when startseg is specified it doesn't make sense that there would be others required when it is not.

IOW, the error message in the no-arg command invocation seems incorrect.

David J.

Re: Usage of pg_waldump

From
"David G. Johnston"
Date:
On Tue, May 1, 2018 at 9:26 AM, Andres Freund <andres@anarazel.de> wrote:
Hi,

On 2018-05-01 16:41:04 +0900, Dang Minh Huong wrote:
> The syntax is known as,
>
>   pg_waldump [OPTION]... [STARTSEG [ENDSEG]]
>
> Mean that, it could work with no arguments.
> But the "no arguments specified" ERROR will be returned in that case.
>
>   $ pg_waldump
>   pg_waldump: no arguments specified
>   Try "pg_waldump --help" for more information.
>
> I wonder it should be,
>
>   pg_waldump { OPTION... [STARTSEG [ENDSEG]] } | { [OPTION]... STARTSEG [ENDSEG] }
>
> Have any comments?

To me that doesn't seem like an improvement, looks a good chunk more
complicated. You'll get the error and the docs also tell you that some
arguments are needed.

​Reading the v10 docs...

​note: there is either an extra space between the two closing brackets or a missing space before startseg

I suppose it would help to understand why an argument is required - providing a startseg implicitly sets path and timeline but both of those have defaults and so even without a startseg those two aren't required.  Since no other options are required when startseg is specified it doesn't make sense that there would be others required when it is not.

IOW, the error message in the no-arg command invocation seems incorrect.

David J.

Re: Usage of pg_waldump

From
Peter Eisentraut
Date:
On 01/05/2018 18:39, David G. Johnston wrote:
> ​note: there is either an extra space between the two closing brackets
> or a missing space before startseg

I have committed a fix for this.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: Usage of pg_waldump

From
Peter Eisentraut
Date:
On 01/05/2018 18:39, David G. Johnston wrote:
> ​note: there is either an extra space between the two closing brackets
> or a missing space before startseg

I have committed a fix for this.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services