Skip site navigation (1) Skip section navigation (2)

Re: Enabling archive_mode without restart

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Enabling archive_mode without restart
Date: 2008-10-31 19:08:49
Message-ID: 1225480129.3971.587.camel@ebony.2ndQuadrant (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Fri, 2008-10-31 at 13:14 -0400, Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> > archive_mode = on disables the optimization to skip WAL-logging when 
> > loading into a new table that was created in the same transaction. 
> ... and affects a whole bunch of other behaviors too, in processes all
> across the database that could not possibly adopt a new setting
> synchronously.  That's exactly why it was made a postmaster-start option
> to begin with.  Simon's given no argument at all why it would be safe to
> flip it on-the-fly.

First, you are right my initial sketch missed a couple of obvious
mechanisms. But those aren't correctness issues.

Flipping in mid-execution wasn't really what I was proposing. That would
clearly be a big problem. Even between statements could be a problem.

The number of places that test XLogArchivingActive() is fairly small and
infrequently executed, so it would be OK to check a shared memory value
at those points and retain the setting for the rest of the transaction.

Anyway, I think this is worth fixing before release but it clearly isn't
worth attempting to rush a patch in the next few hours. I don't think
we'll find anyone who is happy with making it a restart-required option.

 Simon Riggs 
 PostgreSQL Training, Services and Support

In response to


pgsql-hackers by date

Next:From: Aidan Van DykDate: 2008-10-31 19:11:48
Subject: Re: Decreasing WAL size effects
Previous:From: Emmanuel CecchetDate: 2008-10-31 18:42:00
Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group