values by
calling "select max(id)+1". That is guaranteed to have race conditions like
this.
The safest thing to do is to just leave out the id column from your INSERT
statement. Just let the DEFAULT expression generate a value for you. Then you
can use curval('event_log_id_seq
think you have to use alarm() and a SIGALRM signal handler.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replication support!
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
rns 1 and
> getsockopt() is called with SO_ERROR. SYN packets are tried only for the
> default tcp timeout of 20 seconds.
Uhm, 20 seconds would be an unreasonably low default. I think the RFCs mandate
timeouts closer to the 4 minutes you describe.
--
Gregory Stark
EnterpriseDB
er constant. The fact that these two cases behave
differently is a bit confusing too.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's On-Demand Production Tuning
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make chan
out of a
materialized result than having to skip over the duplicates repeatedly.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL
training!
--
Sent via pgsql-bugs mailing list (pgsql-b
"Tom Lane" <[EMAIL PROTECTED]> writes:
> Gregory Stark <[EMAIL PROTECTED]> writes:
>> Hm, that has the nasty side effect that someone who uses SCROLL but doesn't
>> fetch backwards much or at all suddenly gets a much more expensive plan than
>> if t
"Tom Lane" <[EMAIL PROTECTED]> writes:
> Gregory Stark <[EMAIL PROTECTED]> writes:
>> "Tom Lane" <[EMAIL PROTECTED]> writes:
>>> ... I'm not even sure how to fix it (the nasty case is
>>> changing directions partway through t
"Tom Lane" <[EMAIL PROTECTED]> writes:
> Gregory Stark <[EMAIL PROTECTED]> writes:
>> "Tom Lane" <[EMAIL PROTECTED]> writes:
>>> Well, if you think it's easy, the best form of criticism is a patch.
>>> The change-of-direction p
ry to reproduce it this way.
The commands you described should take the same length of time regardless of
the size of table and the memory settings are not relevant. I suspect you're
actually running some different commands?
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.c
machine as
well:
ALTER TABLE xxx RENAME TO yyy;
ALTER TABLE
ALTER TABLE yyy RENAME COLUMN col1 TO colA;
ERROR: relation "yyy" does not exist
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!
--
Sent via pgsql
"Alvaro Herrera" <[EMAIL PROTECTED]> writes:
> Gregory Stark escribió:
>>
>> <[EMAIL PROTECTED]> writes:
>>
>> > Here is a script that is able to reproduce the problem (on my machine
>> > anyway), you may need to play with the numbe
EINDEX DATABASE bug;
ALTER TABLE xxx RENAME TO yyy;
ALTER TABLE yyy RENAME COLUMN col1 TO colA;
ALTER TABLE yyy RENAME COLUMN col2 TO colB;
EOF
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's RemoteDBA services!
--
Sent vi
update because we're lying
about what indexes exist?
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL
training!
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes
tIndexAttrBitmap(rel);
+
/* Reindex all the indexes. */
foreach(indexId, indexIds)
{
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL
training!
--
Sent via pgsql-bugs mailing list
proof against passive attacks but active attacks are known in the field so
that's cold comfort these days.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL
training!
--
Sent via pgsql-bugs m
the error...
>
> Well, the problem is mainly that there is no query, because the bytes
> arriving
> are garbage. A human observer could make sense of it in some cases, but not
> a computer in the general case.
How is that different from any other syntax error?
--
Gregory Stark
ocs/8.3/static/unsupported-features-sql-standard.html
> As soon as I point out an SQL standard that you DON'T follow I get a barrage
> of weasel words and pathetic excuses.
Well then.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB
2986143992 used
It does look like you have a memory leak in VACUUM FULL. There have been three
memory leaks fixed in bug-fix releases since 8.3.1 but none should be related
to VACUUM FULL.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB'
odus and then copy the database
> files )
Uhm, just to be sure. You did pg_start_backup() on the primary *before* you
started copying the data files across, right?
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's On-Demand Production
r a real wild pointer dereference. I don't
remember ever having either of those.
That said, the second option seems pretty trivial to implement. I think the
performance would be awful for a live database but for a read-only database it
might make more sense.
--
Gregory Stark
Ent
suspect not, though,
since we have no way to actually determine whether the user trigger didn't do
something else equivalent.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL
training!
--
Sen
27;0 || 0 ||'' || $4 - work
I'm sorry I'm not following this part. What parameters did you call this
function with? What did you expect to happen? What actually happened?
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB'
anything unusual happen? Is it possible anything later
truncated these files?
There's no reason I can imagine 8.3 would be any more susceptible to this than
8.2. And certainly no reason you would want to use a year-old release of 8.2
missing a year's worth of bug fixes and security fixes. The
could prevent any other transaction from being able to use the index
until they commit (and you start a new transaction to run the query in).
Normally I would not recommend running nightly REINDEXes, though in this case
because you had done a massive UPDATE against the table it was probabl
Tom Lane writes:
> Gregory Stark writes:
>> Marinos Yannikos writes:
>>> I had a strange problem this morning - I started a long-running UPDATE on a
>>> heavily indexed table with about 8m rows last night to test a trigger-based
>>> queue (PgQ):
>
>
would compile both and pick the right one at run-time but that
might have annoying overhead if there's a branch before every pg_atomic_cas
call.
Perhaps a minimal thing to do would be to detect a mismatch on startup and log
a message about it.
--
Gregory Stark
http://mit.edu/~gsstark/re
rning objects (tables, views, SRFs and VALUES() clauses), only
> RETURNING can't be used in a subquery.
It has the same problem that SELECT triggers have. How many rows should you
expect that subquery to insert, update, or delete if it's used in a join
clause? Or in the
ble) div[qi];
for (i = 1; i < 4; i++)
fdividend *= NBASE;
- fquotient = fdividend * fdivisorinverse;
+ fquotient = fdividend / fdivisor;
qdigit = (fquotient >= 0.0) ? ((int) fquotient) :
(((int) fquotient) - 1);/* truncate tow
"Tom Lane" <[EMAIL PROTECTED]> writes:
> Gregory Stark <[EMAIL PROTECTED]> writes:
>> The source of the problem is the floating point arithmetic which is used to
>> do
>> the individual steps in the long division.
>
> I don't think so. Th
recently but that was precisely because it was
related to some significant changes that were being made. Because of those
changes 8.3 behaves markedly different in this area:
postgres=# select xmin || 'x' from w limit 1;
?column?
--
1679x
(1 row)
--
Gregory Stark
le that you're looking at with the select.
Also, just to check that there's nothing wrong with the inex, what do you get
if you do:
enable_seqscan = off;
select * from reference where id = 7;
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
-
tgres does not support deferred unique constraints which is what you
would need to get this to work. This is a TODO item but nobody has indicated
they wish to (or know how to) do it yet.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end
running VACUUM FULL are you? That's much more intrusive and
shouldn't be needed in regular operation.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end of broadcast)---
TIP 7: You can help support the Postgre
ink that we have nothing to do about this. There are plans to
> another kind of partitioning? If yes, I would like to contribute. If
> not, i`m okay.
There are lots of ideas of where to go with partitioning including possibly
ditching the use of constraints. But I don't think
enode
-
16384
(1 row)
Note that if the file offset is over 1G then you would be looking for a file
named 16384.N where N is which gigabyte chunk.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
om anyarray to a normal array, then allow
subscripting the normal array.
I would be fine requiring the cast to be to the correct array type with a
run-time error if the type doesn't match. Or it could use the VIAIO cast which
would work as long as the input format matched. So you could always
"Decibel!" <[EMAIL PROTECTED]> writes:
> On Jul 31, 2007, at 11:55 PM, Gregory Stark wrote:
>>
>> And what type would the result be?
>
> ANYELEMENT? I know that'd still have to be casted to something normal
> eventually; do we have support for th
e does get join orderings reasonably right. I'm
not so sure about Informix.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate
"Tom Lane" <[EMAIL PROTECTED]> writes:
> Gregory Stark <[EMAIL PROTECTED]> writes:
>> The structure of your query is a whole series of left outer joins, the result
>> of which is then (inner) joined with one more table. The outer joins return a
>> whol
description
-++---
add_missing_from| off|
Automatically adds missing table references to FROM clauses.
...
--
Gregory Stark
EnterpriseDB ht
don't
know what it would take to make that efficient though.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
It should look
like this (note the "t" in place of the last "x"):
$ ls -ld /tmp
drwxrwxrwt 8 root root 12288 Aug 18 16:30 /tmp
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end of broadcast)---
TIP
aracter varying and text
> values.
Concatenation is an example of an operation where the padding spaces are
treated as semantically insignificant, so they get removed before the
concatenation.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end
8.4 is a per-page checksum after all. It was talked about a while back
and people thought it was pointless but I think the number of reports of
hardware and kernel bugs resulting in zeroed and corrupted pages has been
steadily going up. If not in total than as a percentage of the total problems.
--
hose
values older than the actual relfrozenxid. Certainly they should throw some
sort of error instead of trying to find the transaction in the clog.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
t aren't the same thing. "float" is a C data type which is not
wide enough to hold a float8. The first line actually works by shortening it
but the return doesn't work because it returns a pointer to the float and
claims it's a pointer to the float8.
--
Gr
chr() will in fact be modified to do
this.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
with your
memory allocations previously. Double-freeing a pointer, freeing a pointer
which didn't come from malloc, writing past the end or beginning of the
allocated memory, etc. Any bug like this can cause random core dumps in malloc
or free later.
--
Gregory
ng malloc package.
Incidentally glic comes with such a debugging malloc which you can get by
defining the environment variable MALLOC_CHECK_ before starting your program.
In bash you can do this by running your program with something like:
MALLOC_CHECK_=3 ./myprogram
--
wer but what happens if you initdb a
database on the Debian box with lc_* set to hu_HU.UTF-8 ?
(You may have to add it to /etc/locale.gen and rerun locale-gen)
Also, what does lower('úabcdú') return in that locale?
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.co
have to fix them before restoring. (Actually I don't recall which
version got strict about that.)
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
can't just output the USING as an ON clause which would let pg_dump specify
precisely which column to join against because ON doesn't merge the two
columns. The resulting records would have two bid columns.
--
Gregory Stark
EnterpriseDB http://www.ente
"Tom Lane" <[EMAIL PROTECTED]> writes:
> Gregory Stark <[EMAIL PROTECTED]> writes:
>> That does really suck. But I'm not sure what we can do about it. There's no
>> SQL which is entirely equivalent to the resulting view.
>
> If we were to
7;t match the "Ã" in the pattern.
I think you either need to put a lower() on both sides of the LIKE or use
ILIKE.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL
training!
"Tom Lane" <[EMAIL PROTECTED]> writes:
> It's been clear for quite awhile that a stats target of 10 is often
> too low, but no one has done the legwork to establish what a more
> reasonable tradeoff point would be.
Any ideas on what measurements would be intere
celing statement due to user request
> CONTEXT: automatic analyze of table "dbs.public.entity_event"
This is intentional, though perhaps the wording is confusing. What impression
does the wording give you? Does it make you think something has gone wrong?
--
Gregory Stark
Enterp
get 0.
But if you do floating point arithmetic with 1.0/2 you'll get 0.5.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's RemoteDBA services!
---(end of broadcast)---
TIP 3:
"Alvaro Herrera" <[EMAIL PROTECTED]> writes:
> Bruce Momjian escribió:
>> Magnus Hagander wrote:
>> > On Fri, Nov 30, 2007 at 10:13:53AM +, Gregory Stark wrote:
>> > >
>> > > "Mike C." <[EMAIL PROTECTED]>
hange the text of the ERROR message reasonably easily,
> but changing the basic transaction abort method is right out.
I fear having a message saying "ERROR This is not an error" is going to get us
laughed at.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
e to mount the
filesystem with the option to make every file in the filesystem have those
bits. Storing your keys on a usb stick (which usually use fat filesystems)
isn't really such a crazy idea either.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about En
"Tom Lane" <[EMAIL PROTECTED]> writes:
> Alvaro Herrera <[EMAIL PROTECTED]> writes:
>> Gregory Stark wrote:
>>> Storing your keys on a usb stick (which usually use fat filesystems)
>>> isn't really such a crazy idea either.
>
>>
ke a reasonable feature request. But I do wonder if the OP has
actually tried just incrementing it one by one for each of the records being
inserted. Incrementing sequences is pretty damn quick and I doubt it would
actually be a bottleneck.
--
Gregory Stark
EnterpriseDB http://www.e
make a good use case for
a one-time nextval(increment) or something like that.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS support!
---(end of broadcast)---
TIP 9: In versions bel
data.
It would be much more general but perhaps be harder to optimize the our
current COPY can be optimized.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS support!
---(end of broadcast)--
ug-fix releases post 8.1.3 and 8.2.4 are timezone
updates.
(And since 8.1.3 there were several crashing and data eating bugs fixed in
those bug-fix releases)
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS support!
-
LYZE select * from messwerte where pknr = 28315178 and isproducing =
't' limit 1;
EXPLAIN select * from messwerte where pknr = 28315178 and isproducing = 't'
order by timestamp limit 1;
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about Enterpris
lock?
What's the block size of the ZFS filesystem? And what exactly does the trash
data look like?
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's On-Demand Production Tuning
---(end of broadcast)
t1,t2
> where not exists (
> select * from t1 tt where tt.a = (t1.a + t2.a)*2
> )
What plan does MS-SQL use to complete this? I wonder whether it's producing
the same answer Postgres is.
--
Gregory Stark
EnterpriseDB http://www.enterprised
Table Scan
Table Spool (Lazy Spool)
Table Scan
Postgres is doing something equivalent to the first plan.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB
ere any other records on either of these
blocks?
To answer the latter question I found a handy trick of converting the tid to a
"point" so I could refer to the block or offset. In 8.3 this looks like:
select ctid from foo where (ctid::text::point)[0] = 0;
But in 8.2 iirc you had
to do a sequential scan casting the int2 column to an
int4 when checking each row.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL
training!
---(end of broadcast)--
"Abhay Kumar" <[EMAIL PROTECTED]> writes:
> Hi,
> I am installing the Postgis 2.2.1 on PostgreSQL.
I think you would be better off speaking to this mailing list:
http://postgis.refractions.net/mailman/listinfo/postgis-users
--
Gregory Stark
Ente
ject. You should either have access to the object or
not regardless of how you refer to it.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replication support!
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
stored a definition which is out of date and causes this problem.
8.3 may actually fix it for you because if they're plpgsql functions then they
will replan any cached query plans.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Remo
ses. Notably if you have any invalid UTF8 data in a
UTF8-encoded database 8.1.11 will refuse to load it as it can be a security
issue.
The release notes for the 8.1.x bug-fix and security releases are at:
http://www.postgresql.org/docs/8.1/static/release.html#RELEASE-8-1-11
Click "Ne
tes for the 8.1.x bug-fix and security releases are at:
http://www.postgresql.org/docs/8.1/static/release.html#RELEASE-8-1-11
Click "Next" or scroll up to the list to get the previous releases.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB
t enforce the UNIQUE
constraint. Conceivably we could actually do something about that but there's
nothing like that now.
We have hash indexes too but in practice a btree over a hash seems to work
just as well or better.
--
Gregory Stark
EnterpriseDB http://www.ente
being
able to intentionally create collisions. In this scenario that's probably not
a top threat. Conceivably someone could create a denial-of-service attack
slowing down your server by causing your indexes to become unbalanced. But it
would be fairly challenging to engineer.
--
Gr
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes:
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes:
> Gregory Stark wrote:
>> "Heikki Linnakangas" <[EMAIL PROTECTED]> writes:
>>
>>> As others have pointed out, CREAT
"Michael Fuhr" <[EMAIL PROTECTED]> writes:
> On Wed, Feb 20, 2008 at 12:21:03PM +0100, Francisco Olarte Sanz wrote:
>> On Wednesday 20 February 2008, Gregory Stark wrote:
>>
>> > Unless you need cryptographic security I would not suggest using MD5. MD5
n you define exactly what 'the question' is? That
> will probably help figure out if the answer is correct.
IIRC the question is "What is six times eight"
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replicati
(select * from b where b.groups = 2) AS b
ON (a.num1=b.num1)
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's RemoteDBA services!
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
sql
>>
>> As you can see, there is some 200 times the active DB size that remains
>> available.
>
> User quota or super user space reservation could take affect. Could you create
> file as a postgres user on pgsql filesystem?
Also check "df -i"
--
G
Sorry, this is the URL I meant to send:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg19905.html
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's RemoteDBA services!
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.or
What version of linux and reiserfs?
see also:
http://osdir.com/ml/file-systems.reiserfs.general/2004-01/msg00116.html
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!
--
Sent via pgsql-bugs mailing list (pgsql
"Blake Lovely" <[EMAIL PROTECTED]> writes:
> PostgreSQL version: 8.2
> Operating system: Vista home premium
8.2 was not supported on Vista as it came out long before Vista did. Try 8.3.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me abo
on an
exact implementation of IEEE or ISO rules/specifications for math
functions.
The default is `-ftrapping-math'.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replication support!
--
Sent via pgsql-bugs m
atically converts incoming strings to the
server encoding or if you're expected to do that yourself? Or if it isn't
being done for us we could just put that encoding in the email headers.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB
88 matches
Mail list logo