Re: Win32 link() function
От | Bruce Momjian |
---|---|
Тема | Re: Win32 link() function |
Дата | |
Msg-id | 200906010357.n513v8321575@momjian.us обсуждение исходный текст |
Ответ на | Re: Win32 link() function (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Win32 link() function
|
Список | pgsql-hackers |
Tom Lane wrote: > Bruce Momjian <bruce@momjian.us> writes: > >> Tom Lane wrote: > >>> Hmm, interesting. Are we requiring our DBs to be on NTFS already? > > > Oh, yea, we only support tablespaces on Win32 using NTFS. > > Well, the important point there is that we fail gracefully if you try to > use tablespaces when not on NTFS. So you're going to have to make sure > that pg_migrator's --link option fails gracefully when not on NTFS. I will just check the return code and exit on error. > (Come to think of it, --link can fail on Unix too, if the user tries to > put the new database on a different filesystem. Have you got guards in > there to make sure this is discovered before the point of no return?) Of course: if ((msg = linkAndUpdateFile(ctx, pageConverter, oldfile, newfile)) != NULL) pg_log(ctx, PG_FATAL, "error while creating link from %s.%s(%s) to %s.%s(%s): %s\n", oldnspname, oldrelname, oldfile,newnspname, newrelname, newfile, msg); ... if (pg_link_file(src, dst) == -1) return strerror(errno); though you have to delete the new cluster directory and remove the _old suffixes to get your old cluster back. I don't check before starting the migration. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-hackers по дате отправления: