Re: check_recovery_target_lsn() does a PG_CATCH without a throw

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: check_recovery_target_lsn() does a PG_CATCH without a throw
Date: 2019-06-30 09:06:58
Message-ID: 595d0a74-923a-849f-77b0-f398138589e6@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This has been committed.

On 2019-06-24 06:06, Michael Paquier wrote:
> I have been looking at this patch set. Patch 0001 looks good to me.
> You are removing all traces of a set of timestamp keywords not
> supported anymore, and no objections from my side for this cleanup.
>
> +#define MAXPG_LSNCOMPONENT 8
> +
> static bool
> check_recovery_target_lsn(char **newval, void **extra, GucSource source)
> Let's avoid the duplication for the declarations. I would suggest to
> move the definitions of MAXPG_LSNLEN and MAXPG_LSNCOMPONENT to
> pg_lsn.h. Funny part, I was actually in need of this definition a
> couple of days ago for a LSN string in a frontend tool. I would
> suggest renames at the same time:
> - PG_LSN_LEN
> - PG_LSN_COMPONENT

I ended up rewriting this by extracting the parsing code into
pg_lsn_in_internal() and having both pg_lsn_in() and
check_recovery_target_lsn() calling it. This mirrors similar
arrangements in float.c

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2019-06-30 09:45:47 Add parallelism and glibc dependent only options to reindexdb
Previous Message Pavel Stehule 2019-06-30 08:47:09 Re: proposal - patch: psql - sort_by_size