Enabling archive_mode without restart
От
Simon Riggs
Тема
Enabling archive_mode without restart
Дата
Msg-id
1225465453.3971.574.camel@ebony.2ndQuadrant
Список
Дерево обсуждения
Enabling archive_mode without restart Simon Riggs <simon@2ndQuadrant.com>
Re: Enabling archive_mode without restart Bruce Momjian <bruce@momjian.us>
Re: Enabling archive_mode without restart Tom Lane <tgl@sss.pgh.pa.us>
Re: Enabling archive_mode without restart Peter Eisentraut <peter_e@gmx.net>
Re: Enabling archive_mode without restart Brad Nicholson <bnichols@ca.afilias.info>
Re: Enabling archive_mode without restart "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Enabling archive_mode without restart "Joshua D. Drake" <jd@commandprompt.com>
Re: Enabling archive_mode without restart "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Enabling archive_mode without restart "Joshua D. Drake" <jd@commandprompt.com>
Re: Enabling archive_mode without restart "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Enabling archive_mode without restart Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Enabling archive_mode without restart Tom Lane <tgl@sss.pgh.pa.us>
Re: Enabling archive_mode without restart Simon Riggs <simon@2ndQuadrant.com>
Re: Enabling archive_mode without restart "Jonah H. Harris" <jonah.harris@gmail.com>
Re: Enabling archive_mode without restart Simon Riggs <simon@2ndQuadrant.com>
Re: Enabling archive_mode without restart Greg Smith <gsmith@gregsmith.com>
Re: Enabling archive_mode without restart "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Currently we enable archive_mode only at server start. The reason for this was to protect against people enabling archive_mode half way through somebody else running a bulk load without WAL and then having an incomplete backup. All we need to do is this: * When we change archive_mode to "on" get the next xid and place it in xlogctl. When we turn archive_mode "off" clear the value. * When we run pg_start_backup() check the xid and then wait for all transactions to end that can still see that xid before returning. This means there may be a delay after enabling archive_mode before we can run a backup, but normal running will not be interrupted. It's a fairly small change, touching just guc.c and xlog.c, using same code as DefineIndex() to wait. Objections? -- Simon Riggs www.2ndQuadrant.comPostgreSQL Training, Services and Support
В списке pgsql-hackers по дате отправления