| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
| |
This is required on Windows due to the special locale
handling for UTF8 that doesn't change the full environment.
Fixes crash with translated error messages per bugs 4180
and 4196.
Tom Lane
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the associated datatype as their equality member. This means that these
opclasses can now support plain equality comparisons along with LIKE tests,
thus avoiding the need for an extra index in some applications. This
optimization was not possible when the pattern opclasses were first introduced,
because we didn't insist that text equality meant bitwise equality; but we
do now, so there is no semantic difference between regular and pattern
equality operators.
I removed the name_pattern_ops opclass altogether, since it's really useless:
name's regular comparisons are just strcmp() and are unlikely to become
something different. Instead teach indxpath.c that btree name_ops can be
used for LIKE whether or not the locale is C. This might lead to a useful
speedup in LIKE queries on the system catalogs in non-C locales.
The ~=~ and ~<>~ operators are gone altogether. (It would have been nice to
keep them for backward compatibility's sake, but since the pg_amop structure
doesn't allow multiple equality operators per opclass, there's no way.)
A not-immediately-obvious incompatibility is that the sort order within
bpchar_pattern_ops indexes changes --- it had been identical to plain
strcmp, but is now trailing-blank-insensitive. This will impact
in-place upgrades, if those ever happen.
Per discussions a couple months ago.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
called before, not after, calling the assign_hook if any. This is because
push_old_value might fail (due to palloc out-of-memory), and in that case
there would be no stack entry to tell transaction abort to undo the GUC
assignment. Of course the actual assignment to the GUC variable hasn't
happened yet --- but the assign_hook might have altered subsidiary state.
Without a stack entry we won't call it again to make it undo such actions.
So this is necessary to make the world safe for assign_hooks with side
effects. Per a discussion a couple weeks ago with Magnus.
Back-patch to 8.0. 7.x did not have the problem because it did not have
allocatable stacks of GUC values.
|
|
|
|
| |
Use #define/#ifdef instead of sed to fix include files, this should work on Windows too.
|
|
|
|
| |
modify the passed string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to go beoynd 10MB, as demonstrated by Gavin Sharry's example of dropping a
schema with ~25000 objects. The really bogus thing about the limit was that
it was enforced when a state file file was read in, not when it was written,
so you would end up with a prepared transaction that you can't commit or
abort, and the only recourse was to shut down the server and remove the file
by hand.
Raise the limit to MaxAllocSize, and enforce it also when a state file is
written. We could've removed the limit altogether, but reading in a file
larger than MaxAllocSize would fail anyway because we read it into a
palloc'd buffer.
Backpatch down to 8.1, where 2PC and this issue was introduced.
|
|
|
|
| |
Euler Taveira de Oliveira
|
|
|
|
|
| |
example from Rod Taylor. On reflection the correct test here is for any
polymorphic type, not specifically ANYARRAY as in the original coding.
|
|
|
|
|
|
|
|
| |
Formerly, the default value of wal_sync_method was determined inside xlog.c,
but now it is determined inside guc.c. guc.c was reading xlogdefs.h
without having read <fcntl.h>, leading to wrong determination of
DEFAULT_SYNC_METHOD. Obviously xlogdefs.h needs to include <fcntl.h>
for itself to ensure stable results.
|
|
|
|
|
|
|
|
|
|
| |
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 */'
|
|
|
|
|
| |
sequence. This seems an obvious extension to the recent patch, and it
makes the code noticeably cleaner and more orthogonal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sequence to be reset to its original starting value. This requires adding the
original start value to the set of parameters (columns) of a sequence object,
which is a user-visible change with potential compatibility implications;
it also forces initdb.
Also add hopefully-SQL-compatible RESTART/CONTINUE IDENTITY options to
TRUNCATE TABLE. RESTART IDENTITY executes ALTER SEQUENCE RESTART for all
sequences "owned by" any of the truncated relations. CONTINUE IDENTITY is
a no-op option.
Zoltan Boszormenyi
|
| |
|
|
|
|
|
|
| |
prefix matching using this facility.
Teodor Sigaev and Oleg Bartunov
|
|
|
|
| |
while building a GIN index.
|
|
|
|
|
| |
CoerceViaIO nodes. This improves the ability of the planner to deal with
cases where the node input is a constant. Per bug #4170.
|
|
|
|
|
|
|
|
|
|
| |
functions.
Note that because this patch changes FmgrInfo, any external C functions
you might be testing with 8.4 will need to be recompiled.
Patch by Martin Pihlak, some editorialization by me (principally, removing
tracking of getrusage() numbers)
|
|
|
|
|
|
|
|
|
| |
file portability/instr_time.h, and add a couple more macros to eliminate
some abstraction leakage we formerly had. Also update psql to use this
header instead of its own copy of nearly the same code.
This commit in itself is just code cleanup and shouldn't change anything.
It lays some groundwork for the upcoming function-stats patch, though.
|
|
|
|
|
|
|
|
|
| |
modes, replacing it with a call to a function that derives it from the
sync_method variable, now that it has distinct values for these two cases.
This means that assign_xlog_sync_method() no longer changes any settings,
thus fixing the bug introduced in the change to use a guc enum for
wal_sync_method.
|
|
|
|
|
|
|
| |
crashes on certain platforms. In particular, the MSVC runtime is known
to do this.
Fixes bug #4162, reported and diagnosed by Javier Pimas
|
|
|
|
|
|
| |
consistent. OffsetNumberNext() has some casting that makes it useful.
Fujii Masao
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two ways to track a snapshot: there's the "registered" list, which
is used for arbitrary long-lived snapshots; and there's the "active stack",
which is used for the snapshot that is considered "active" at any time.
This also allows users of snapshots to stop worrying about snapshot memory
allocation and freeing, and about using PG_TRY blocks around ActiveSnapshot
assignment. This is all done automatically now.
As a consequence, this allows us to reset MyProc->xmin when there are no
more snapshots registered in the current backend, reducing the impact that
long-running transactions have on VACUUM.
|
|
|
|
| |
O_DSYNC (specifically this broke all the Windows buildfarm members)
|
|
|
|
|
| |
Remove #include bufmgr.h from (most?) source files which already include
bufpage.h.
|
|
|
|
| |
not which one we had before (that worked, and thus is completley irrelevant)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
unnecessary #include lines in it. Also, move some tuple routine prototypes and
macros to htup.h, which allows removal of heapam.h inclusion from some .c
files.
For this to work, a new header file access/sysattr.h needed to be created,
initially containing attribute numbers of system columns, for pg_dump usage.
While at it, make contrib ltree, intarray and hstore header files more
consistent with our header style.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as those for inherited columns; that is, it's no longer allowed for a child
table to not have a check constraint matching one that exists on a parent.
This satisfies the principle of least surprise (rows selected from the parent
will always appear to meet its check constraints) and eliminates some
longstanding bogosity in pg_dump, which formerly had to guess about whether
check constraints were really inherited or not.
The implementation involves adding conislocal and coninhcount columns to
pg_constraint (paralleling attislocal and attinhcount in pg_attribute)
and refactoring various ALTER TABLE actions to be more like those for
columns.
Alex Hunsaker, Nikhil Sontakke, Tom Lane
|
| |
|
|
|
|
| |
began to realize that the input() function isn't used and printed warnings.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
parameter. This fixes bug 4137 reported by Wojciech Strzalka, where a WAL
file is deleted too early when starting the recovery of a warm standby server.
Also add a sanity check in pg_standby so that it will refuse to delete anything
earlier than the file being restored, and improve the debug message in case
nothing is deleted.
Simon Riggs. Backpatch to 8.3, which is where %r was introduced.
|
|
|
|
| |
adjust source code to be more modular.
|
|
|
|
|
|
| |
return 1, rather than error.
This was already the float8 behavior.
|
|
|
|
|
|
| |
specify the column names and types. Also simplifies the view.
Per comments from Tom.
|
|
|
|
|
|
|
| |
instead of calling a bunch of individual functions.
This function can also be called directly, taking a PID as an argument, to
return only the data for a single PID.
|
|
|
|
|
| |
Not clear that there's any observable bug at present from this omission,
but it seems like something to fix going forward.
|
|
|
|
| |
Hitoshi Harada
|
|
|
|
|
|
| |
files were last loaded.
George Gensure
|
|
|
|
|
|
|
|
| |
These changes assume that the varchar and xml data types are represented
the same as text. (I did not, however, accept the portions of the proposed
patch that wanted to assume bytea is the same as text --- tgl.)
Brendan Jurd
|
|
|
|
|
| |
UPDATE/DELETE forgot to teach ruleutils.c to display the alias.
Per bug #4141 from Mathias Seiler.
|
|
|
|
|
|
| |
retrieved to be controlled through a GUC variable.
Robert Hell
|
| |
|
|
|
|
|
|
|
|
|
|
| |
support for a nonsegmented mode from md.c. Per recent discussions, there
doesn't seem to be much value in a "never segment" option as opposed to
segmenting with a suitably large segment size. So instead provide a
configure-time switch to set the desired segment size in units of gigabytes.
While at it, expose a configure switch for BLCKSZ as well.
Zdenek Kotala
|
|
|
|
|
|
| |
it vary with BLCKSZ as before. This agrees with what the documentation says,
and avoids a regression test problem when BLCKSZ is larger than default.
Per recent discussion.
|
|
|
|
|
|
|
|
| |
a user-supplied TID is out of range for the relation. This is needed to
preserve compatibility with our pre-8.3 behavior, and it is sensible anyway
since if the query were implemented by brute force rather than optimized
into a TidScan, the behavior for a non-existent TID would be zero rows out,
never an error. Per gripe from Gurjeet Singh.
|
|
|
|
|
| |
makeFloatConst, and avoid "manual" construction of A_Const nodes in grammar
productions, in favor of using makeXXXConst subroutines.
|
|
|
|
|
|
|
| |
The capability for changing language owners is new in 8.3, so that's how
far back this needs to be backpatched.
Per bug #4132 by Kirill Simonov.
|
|
|
|
| |
Brendan Jurd, minor editorialization by me.
|