Thread: AW: Proposed WAL changes

AW: Proposed WAL changes

From
Zeugswetter Andreas SB
Date:
> >> Remove archdir from pg_control; it ought to be a GUC
> >> parameter, not a special case (not that it's implemented 
> yet anyway).
> 
> > Is archdir really a GUC parameter ?
> 
> Why shouldn't it be?  I see nothing wrong with changing it on-the-fly.

Yes, I think this is a good change, like all others except XID assignment :-)

Andreas


RE: Proposed WAL changes

From
"Hiroshi Inoue"
Date:
> -----Original Message-----
> From: Zeugswetter Andreas SB
> 
> > >> Remove archdir from pg_control; it ought to be a GUC
> > >> parameter, not a special case (not that it's implemented 
> > yet anyway).
> > 
> > > Is archdir really a GUC parameter ?
> > 
> > Why shouldn't it be?  I see nothing wrong with changing it on-the-fly.
> 
> Yes, I think this is a good change, like all others except XID 
> assignment :-)
> 

Could GUC parameters be changed permanently e.g. by SET command ?

For example,
1) start postmaster
2) set archdir to '....'
3) shutdown postmaster

Does PostgreSQL remember the archdir parameter ?

Regards,
Hiroshi Inoue


Re: Proposed WAL changes

From
Tom Lane
Date:
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> Could GUC parameters be changed permanently e.g. by SET command ?

That's what postgresql.conf is for ...
        regards, tom lane


Re: Proposed WAL changes

From
Hiroshi Inoue
Date:
Tom Lane wrote:
> 
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > Could GUC parameters be changed permanently e.g. by SET command ?
> 
> That's what postgresql.conf is for ...
> 

Do I have to send SIGHUP after changing postgresql.conf ?

Regards,
Hiroshi Inoue


Re: AW: Proposed WAL changes

From
Hiroshi Inoue
Date:
Zeugswetter Andreas SB wrote:
> 
> > Could GUC parameters be changed permanently e.g. by SET command ?
> >
> > For example,
> > 1) start postmaster
> > 2) set archdir to '....'
> > 3) shutdown postmaster
> 
> I thought the intended way to change a GUC parameter permanently was to
> edit data/postgresql.conf . No ?
> 

What I've thought is to implement a new command to
change archdir under WAL's control.
If it's different from Vadim's plan I don't object.

Regards,
Hiroshi Inoue


Re: AW: Proposed WAL changes

From
"Vadim Mikheev"
Date:
> > I thought the intended way to change a GUC parameter permanently was to
> > edit data/postgresql.conf . No ?
> > 
> 
> What I've thought is to implement a new command to
> change archdir under WAL's control.
> If it's different from Vadim's plan I don't object.

Actually, I have no concrete plans for archdir yet - this
one is for WAL based BAR we should discuss in future.
So, I don't see why to remove archdir from pg_control now.

Vadim




Re: AW: Proposed WAL changes

From
Bruce Momjian
Date:
> > > I thought the intended way to change a GUC parameter permanently was to
> > > edit data/postgresql.conf . No ?
> > > 
> > 
> > What I've thought is to implement a new command to
> > change archdir under WAL's control.
> > If it's different from Vadim's plan I don't object.
> 
> Actually, I have no concrete plans for archdir yet - this
> one is for WAL based BAR we should discuss in future.
> So, I don't see why to remove archdir from pg_control now.

Maybe we can get BAR in 7.1.X so maybe we should have the option to add
it.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: Proposed WAL changes

From
Tom Lane
Date:
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> Do I have to send SIGHUP after changing postgresql.conf ?

In general, yes.  I think that for the (still vaporware) archdir option,
you might not need to: archdir will only be looked at by the checkpoint
subprocess, and I think that a newly spawned backend will reread
postgresql.conf anyway.  Peter, is that correct?
        regards, tom lane


Re: AW: Proposed WAL changes

From
Tom Lane
Date:
"Vadim Mikheev" <vmikheev@sectorbase.com> writes:
> So, I don't see why to remove archdir from pg_control now.

I didn't like the space consumption.  I think it's important that the
pg_control data fit in less than 512 bytes so that it doesn't cross
physical sectors on the disk.  This reduces the odds of being left
with a corrupted pg_control due to partial write during power loss.

That's a second-order consideration, possibly, but I can see no
redeeming social advantage whatever to having archdir in pg_control
rather than in postgresql.conf where all the other system parameters
live.  Unless you've got one, it's coming out...
        regards, tom lane


Re: Proposed WAL changes

From
Peter Eisentraut
Date:
Tom Lane writes:

> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > Do I have to send SIGHUP after changing postgresql.conf ?
>
> In general, yes.  I think that for the (still vaporware) archdir option,
> you might not need to: archdir will only be looked at by the checkpoint
> subprocess, and I think that a newly spawned backend will reread
> postgresql.conf anyway.  Peter, is that correct?

Nope.  The configuration file is only read at postmaster start and after
SIGHUP.  If any starting backend would read it automatically, the admin
could never be sure about his edits.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/