Re: [PATCHES] Forcing current WAL file to be archived - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] Forcing current WAL file to be archived
Date
Msg-id 26543.1155681737@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] Forcing current WAL file to be archived  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] Forcing current WAL file to be archived
List pgsql-hackers
I wrote:
> It'd definitely be nicer that way, but given the current limitations of
> bootstrap mode I see no non-kluge way to make a built-in function have
> OUT parameters.  (Hint: array_in doesn't work in bootstrap mode.)

Actually, that turns out not to be so hard to fix as I thought.
array_in only needs to work for the array types used in the core system
tables, and bootstrap.c already has a hard-wired table of that info ...
we only have to make it available to array_in.   Which I just did.

So let's fix pg_xlogfile_name_offset() to have two OUT parameters
instead of returning a smushed-together string.

The reason I knew about the array_in problem was I'd tried to make some
other built-in function have OUT parameters ... I think it was probably
one of the ones that we currently have underneath system views.  It
might be worthwhile converting some or all of these to use OUT
parameters and not need the crutch of an AS clause in the view:

 pg_show_all_settings
 pg_lock_status
 pg_prepared_xact
 pg_stat_file
 pg_prepared_statement
 pg_cursor
 pg_timezonenames

            regards, tom lane

pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: BugTracker (Was: Re: 8.2 features status)
Next
From: "Greg Sabino Mullane"
Date:
Subject: Index bloat and the need to REINDEX