Actually, I think this may be the way Oracle Hot Backups work. It was my impression that feature temporarily suspends writes into a specific tablespace so you can take a snapshot of it. It has been a few years since I've had to do Oracle work though and I could be mis-remembering. People may be confusing Oracle and PostgreSQL.
On Tue, Jan 24, 2017 at 10:55 AM, Jeff Janes <jeff.ja...@gmail.com> wrote: > On Mon, Jan 23, 2017 at 9:43 AM, Simon Riggs <si...@2ndquadrant.com> > wrote: > >> On 23 January 2017 at 17:12, Jeff Janes <jeff.ja...@gmail.com> wrote: >> >> >> Just to make sure anyone reading the mailing list archives isn't >> >> confused, running pg_start_backup does *not* make PG stop writing to >> >> BASEDIR (or DATADIR, or anything, really). PG *will* continue to write >> >> data into BASEDIR after pg_start_backup has been called. >> > >> > >> > >> > Correct. Unfortunately it is a very common myth that it does cause >> > PostgreSQL to stop writing to the base dir. >> >> Never heard that one before. Wow. Who's been saying that? >> >> It's taken me years to hunt down all invalid backup memes and terminate >> them. >> >> Never fails to surprise me how many people don't read the docs. >> > > I've seen it on stackexchange, and a few times on the pgsql mailing lists, > and talking to people in person. I've never traced it back some > "authoritative" source who is making the claim, I think many people just > independently think up "How would I implement pg_start_backup if I were > doing it" and then come up with the same false conclusion, and then all > reinforce each other. > > I don't think the docs are particularly clear on this. There is the > comment "Some file system backup tools emit warnings or errors if the > files they are trying to copy change while the copy proceeds. When taking a > base backup of an active database, this situation is normal and not an > error" but the reader could think that comment could apply to any of the > files in the datadirectory (in particular, pg_xlog), and could think that > it doesn't apply to the files in datadirectory/base in particular. In > other words, once they form the wrong understanding, the docs (if read) > don't force them to change it, as they could interpret it in ways that are > consistent. > > Of course the docs aren't a textbook and aren't trying to fully describe > the theory of operation; just give the people a recipe they can follow. But > people will make inferences from that recipe anyway. I don't know if it is > worth trying preemptively dispel these mistakes in the docs. > > Cheers, > > Jeff > >