Re: [HACKERS] Forcing current WAL file to be archived

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>, Hannu Krosing <hannu(at)skype(dot)net>
Subject: Re: [HACKERS] Forcing current WAL file to be archived
Date: 2006-08-15 18:55:22
Message-ID: 20060815185522.GF21363@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Tue, Aug 15, 2006 at 07:11:24PM +0100, Simon Riggs wrote:
> On Tue, 2006-08-15 at 12:13 -0500, Jim C. Nasby wrote:
> > On Tue, Aug 15, 2006 at 06:07:12PM +0100, Simon Riggs wrote:
> > > On Tue, 2006-08-15 at 11:10 -0400, Alvaro Herrera wrote:
> > > > Simon Riggs wrote:
> > > >
> > > >
> > > >
> > > > > postgres=# select pg_xlogfile_name_offset(pg_switch_xlog());
> > > > > pg_xlogfile_name_offset
> > > > > -----------------------------------
> > > > > 000000010000000000000001 16777216
> > > > > (1 row)
> > > >
> > > > > I've not taken up Jim Nasby's suggestion to make this an SRF with
> > > > > multiple return rows/columns since that much complexity isn't justified
> > > > > IMHO.
> > > >
> > > > Hum, but two columns here seem warranted, don't they?
> > >
> > > Maybe. People can write any function they like though, so I'm loathe to
> > > agonize over this too much.
> >
> > True, but making people parse the output of a function to seperate the
> > two fields seems pretty silly. Is there some reason why
> > pg_xlogfile_name_offset shouldn't be a SRF, or use two out parameters?
>
> If this makes a difference, then I'll do it. Does it make a difference?

Well, many languages make it easier to grab data from seperate fields
than to parse out the contents of the field, and even on ones that don't
it's not like it's hard to combine the two fields together like
pg_xlogfile_name_offset() does right now. But more to the point, I can't
see any use case for combining them together... if you want both pieces
of info, you want them for different reasons, so cramming them together
doesn't make any sense to me.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-15 19:08:09 Re: [PATCHES] PL instrumentation plugin and Rendezvous variable support - version 2
Previous Message dror 2006-08-15 18:50:40 Re: [PATCHES] [Patch] - Fix for bug #2558, InitDB failed

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-08-15 19:08:09 Re: [PATCHES] PL instrumentation plugin and Rendezvous variable support - version 2
Previous Message Simon Riggs 2006-08-15 18:11:24 Re: [HACKERS] Forcing current WAL file to be archived