- Dec 27, 2009
-
-
Magnus Hagander authored
-
Magnus Hagander authored
system and local environments anyway, instead of aborting. (This will happen in a MSVC build with no or very few external libraries linked in)
-
- Nov 14, 2009
-
-
Magnus Hagander authored
Win32. Also refactor the code around it to be more clear. Jesse Morris
-
- Nov 12, 2009
-
-
Tom Lane authored
will work. Per buildfarm results.
-
Tom Lane authored
Per discussion, this should result in defaulting to SQL_ASCII encoding. The original coding could not support that because it conflated selection of SQL_ASCII encoding with not being able to determine the encoding. Adjust pg_get_encoding_from_locale()'s API to distinguish these cases, and fix callers appropriately. Only initdb actually changes behavior, since the other callers were perfectly content to consider these cases equivalent. Per bug #5178 from Boh Yap. Not going to bother back-patching, since no one has complained before and there's an easy workaround (namely, specify the encoding you want).
-
- Sep 13, 2009
-
-
Heikki Linnakangas authored
of checkpoint. Although the checkpoint has been written to WAL at that point already, so that all data is safe, and we'll retry removing the WAL segment at the next checkpoint, if such a failure persists we won't be able to remove any other old WAL segments either and will eventually run out of disk space. It's better to treat the failure as non-fatal, and move on to clean any other WAL segment and continue with any other end-of-checkpoint cleanup. We don't normally expect any such failures, but on Windows it can happen with some anti-virus or backup software that lock files without FILE_SHARE_DELETE flag. Also, the loop in pgrename() to retry when the file is locked was broken. If a file is locked on Windows, you get ERROR_SHARE_VIOLATION, not ERROR_ACCESS_DENIED, at least on modern versions. Fix that, although I left the check for ERROR_ACCESS_DENIED in there as well (presumably it was correct in some environment), and added ERROR_LOCK_VIOLATION to be consistent with similar checks in pgwin32_open(). Reduce the timeout on the loop from 30s to 10s, on the grounds that since it's been broken, we've effectively had a timeout of 0s and no-one has complained, so a smaller timeout is actually closer to the old behavior. A longer timeout would mean that if recycling a WAL file fails because it's locked for some reason, InstallXLogFileSegment() will hold ControlFileLock for longer, potentially blocking other backends, so a long timeout isn't totally harmless. While we're at it, set errno correctly in pgrename(). Backpatch to 8.2, which is the oldest version supported on Windows. The xlog.c changes would make sense on other platforms and thus on older versions as well, but since there's no such locking issues on other platforms, it's not worth it.
-
- Aug 27, 2009
-
-
Peter Eisentraut authored
Update install-sh to that from Autoconf 2.63, plus our Darwin-specific changes (which I simplified a bit). install-sh is now able to install multiple files in one run, so we could simplify our makefiles sometime. install-sh also now has a -d option to create directories, so we don't need mkinstalldirs anymore. Use AC_PROG_MKDIR_P in configure.in, so we can use mkdir -p when available instead of install-sh -d. For consistency with the rest of the world, the corresponding make variable has been renamed from $(mkinstalldirs) to $(MKDIR_P).
-
- Jul 27, 2009
-
-
Magnus Hagander authored
since it's only called during process startup, thus no backpatch. Found by TAKATSUKA Haruka, patch by Magnus Hagander and Andrew Chernow
-
- Jul 16, 2009
-
-
Tom Lane authored
and extend configure to test for it properly instead of hard-wiring an assumption that everybody but Windows has the rand48 functions. (We do cheat to the extent of assuming that probing for erand48 will do for the entire rand48 family.) erand48() is unused as of this commit, but a followon patch will cause GEQO to depend on it. Andres Freund, additional hacking by Tom
-
- Jul 02, 2009
-
-
Tom Lane authored
-
- Jun 11, 2009
-
-
Bruce Momjian authored
provided by Andrew.
-
- May 04, 2009
-
-
Magnus Hagander authored
-
- Apr 05, 2009
- Apr 04, 2009
-
-
Tom Lane authored
probe for opterr (exactly like the one for optreset) and have getopt.c define the variables only if configure doesn't find them in libc.
-
Tom Lane authored
Windows without that, but we shouldn't put bad examples where people might copy them. Also, reformat slightly to improve the odds that pgindent won't go nuts on this.
-
- Apr 03, 2009
-
-
Magnus Hagander authored
This method will not catch all different ways since the locale handling in NTFS doesn't provide an easy way to do that, but it will hopefully solve the most common cases causing startup problems when the backend is found in the system PATH. Attempts to fix bug #4694.
-
- Feb 15, 2009
-
-
Magnus Hagander authored
since it can be transient failures, causing kill() to not properly send signals. Original patch from Steve Marshall, modified by me.
-
- Feb 12, 2009
-
-
Magnus Hagander authored
as this seems to crash on at least some versions of MingW. Our current usage of this function does not require it, so it should be ok to ignore.
-
- Feb 10, 2009
-
-
Peter Eisentraut authored
-
- Jan 21, 2009
-
-
Magnus Hagander authored
Also, if linked against other versions than the default MSVCRT library (for example the MSVC build which links against MSVCRT80), also update the cache in the default MSVCRT at the same time. This should fix the issues with setting LC_MESSAGES on the MSVC build. Original patch from Hiroshi Inoue and Hiroshi Saito, much rewritten by me.
-
- Jan 14, 2009
-
-
Bruce Momjian authored
-
- Jan 01, 2009
-
-
Bruce Momjian authored
-
- Dec 11, 2008
-
-
Peter Eisentraut authored
to the gettext domain name, to simplify parallel installations. Also, rename set_text_domain() to pg_bindtextdomain(), because that is what it does.
-
- Dec 02, 2008
-
-
Magnus Hagander authored
the * character at the beginning of a pattern, and it does not match subdomains. Since this means we no longer need fnmatch, remove the imported implementation from port, along with the autoconf check for it.
-
- Nov 25, 2008
-
-
Tom Lane authored
complaints about empty object files on some platforms, eg Darwin.
-
- Nov 24, 2008
-
-
Magnus Hagander authored
This uses the function fnmatch() which is not available on all platforms (notably Windows), so import the implementation from NetBSD into src/port.
-
- Oct 16, 2008
-
-
Tom Lane authored
ITAGAKI Takahiro
-
- May 21, 2008
-
-
Magnus Hagander authored
Windows, for better performance. Per suggestion from Andrew Chernow, but not his patch since the underlying code was changed to deal with return values.
-
- May 17, 2008
-
-
Andrew Dunstan authored
This particular batch was just for *.c and *.h file. The changes were made with the following 2 commands: find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | while read file ; do head -n 1 < $file | grep -q '^/\*' && echo $file; done | xargs -l sed -i -e '1s/^\// /' -e '1i/*\n * $PostgreSQL:$ \n *' find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | xargs -l sed -i -e '1i/*\n * $PostgreSQL:$ \n */'
-
Tom Lane authored
-
- May 14, 2008
-
-
Magnus Hagander authored
asked for anything other than RUSAGE_SELF, since it's not supported. This is never called anywhere in the code today, but might be in the future. Not backpatching, since it's not called anywhere today.
-
- Apr 22, 2008
-
-
Magnus Hagander authored
-
- Apr 18, 2008
-
-
Tom Lane authored
file; the idea is that we should clean up as much as we can, even if there's some problem removing one file. Make the error messages a bit less misleading, too. In passing, const-ify function arguments.
-
Heikki Linnakangas authored
place to prevent reusing relation OIDs before next checkpoint, and DROP DATABASE. First, if a database was dropped, bgwriter would still try to unlink the files that the rmtree() call by the DROP DATABASE command has already deleted, or is just about to delete. Second, if a database is dropped, and another database is created with the same OID, bgwriter would in the worst case delete a relation in the new database that happened to get the same OID as a dropped relation in the old database. To fix these race conditions: - make rmtree() ignore ENOENT errors. This fixes the 1st race condition. - make ForgetDatabaseFsyncRequests forget unlink requests as well. - force checkpoint on in dropdb on all platforms Since ForgetDatabaseFsyncRequests() is asynchronous, the 2nd change isn't enough on its own to fix the problem of dropping and creating a database with same OID, but forcing a checkpoint on DROP DATABASE makes it sufficient. Per Tom Lane's bug report and proposal. Backpatch to 8.3.
-
- Apr 17, 2008
-
-
Andrew Dunstan authored
-
- Apr 12, 2008
-
-
Tom Lane authored
pgwin32_safestat remains to be determined, but in any case the current code is not tolerable.
-
- Apr 10, 2008
-
-
Magnus Hagander authored
on win32, because the stat() function in the runtime cannot be trusted to always update the st_size field. Per report and research by Sergey Zubkovsky.
-
- Mar 31, 2008
-
-
Tom Lane authored
The places that did, eg, (statbuf.st_mode & S_IFMT) == S_IFDIR were correct, but there is no good reason not to use S_ISDIR() instead, especially when that's what the other 90% of our code does. The places that did, eg, (statbuf.st_mode & S_IFDIR) were flat out *wrong* and would fail in various platform-specific ways, eg a symlink could be mistaken for a regular file on most Unixen. The actual impact of this is probably small, since the problem cases seem to always involve symlinks or sockets, which are unlikely to be found in the directories that PG code might be scanning. But it's clearly trouble waiting to happen, so patch all the way back anyway. (There seem to be no occurrences of the mistake in 7.4.)
-
- Mar 21, 2008
-
-
Bruce Momjian authored
-