Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-18 Thread Craig Ringer
tart_backup if you want to be reasonably safe. > Every file from /var/lib/pgsql/ before I started this is on the weekly > backup tape from last Friday night. If need be I can restore from that and > start over. Well, no worries then. I'm sure you can understand that for many pe

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-18 Thread Craig Ringer
Alan Hodgson wrote: On Wednesday 18 June 2008, Craig Ringer <[EMAIL PROTECTED]> wrote: Every file from /var/lib/pgsql/ before I started this is on the weekly backup tape from last Friday night. If need be I can restore from that and start over. Well, no worries then. I'm s

Re: [GENERAL] Understanding fsync

2008-06-18 Thread Craig Ringer
Sam Mason wrote: My original note was mainly in response to Craig's comment that implied fsync doing far more than it actually does. I remember seeing a few comments recently saying similar things about fsync, so sorry for picking specifically on you Craig. Device/filesystem

Re: [GENERAL] Problem with volatile function

2008-06-18 Thread Craig Ringer
S f_name ON > ts.gender = f_name.gender > AND ts.counter = random(1,100) Same deal as above. > > -- This generates different numbers > SELECT random(1,100), s.* > FROM usr_students s ... because you've used random() in the result list. That's where VOLATILE and STA

Re: [GENERAL] Problem with volatile function

2008-06-18 Thread Craig Ringer
Tom Lane wrote: Craig Ringer <[EMAIL PROTECTED]> writes: Personally I'd expect that to only evaluate once. It's saying "where f_name.counter in this row is equal to some single random value generated at the start of the query". The parameters of the random() function

Re: [GENERAL] Update Join Query

2008-06-23 Thread Craig Ringer
FROM target t LEFT OUTER JOIN othertable WHERE target.id = t.id; or similar. I haven't checked to see whether this results in an extra scan in the query plan; you might want to use EXPLAIN ANALYZE to examine how Pg will execute the query. -- Craig Ringer -- Sent via pgsql-general mailing

Re: [GENERAL] Method to detect certain characters in column?

2008-06-23 Thread Craig Ringer
ver sends the % encoded URL directly to your client, on how your client chooses to interpret it. The main trouble will be ensuring that clients and the server agree on the character encoding used in the URL. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] ERROR: could not open relation with OID 2836

2008-06-25 Thread Craig Ringer
s: - Which version of Windows? - do you have a virus scanner on the system? Which one? Version? Otherwise: - What OS and version are you using? - What filesystem type is the database on? - Are you using any sort of RAID / LVM? If so, what kind? -- Craig Ringer -- Sent via pgsql-general

Re: [GENERAL] Serialized Access

2008-06-25 Thread Craig Ringer
ugh Hibernate. So far I'm only using it with direct JDBC calls in some of the trickier bits of the app I'm working on, so I haven't had cause to combine it with Hibernate yet. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Serialized Access

2008-06-26 Thread Craig Ringer
Phillip Mills wrote: On Wed, Jun 25, 2008 at 10:21 PM, Craig Ringer <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: You might want to look into advisory locking. If your locks don't need to be longer than the life of an active EntityManager session then you

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Craig Ringer
nning, but if you ever begin with a high offset you'll want to look into using one of the methods suggested in other replies that permit you to use an index. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] re-using cluster

2008-06-30 Thread Craig Ringer
ll need to compile an older version to read your cluster, dump it, and then load it into the new version of PostgreSQL. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Pl/java in 8.4 bet1 sources compilation failed

2009-05-28 Thread Craig Ringer
t work, because 8.3 and 8.4 aren't binary compatible for server plugins like PL languages. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] vista failed to install postgresql

2009-05-28 Thread Craig Ringer
d? If so, which one? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Debugger install

2009-05-29 Thread Craig Ringer
x27;s headers and libraries fine. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] modo texto

2009-05-29 Thread Craig Ringer
ons from the Windows machine. pg_hba.conf is either in your PostgreSQL data directory or in the same place as postgresql.conf. Once that's done, you can do most of your admin with PgAdmin from the Windows box, though I *STRONGLY* recommend that you do learn to get around the Linux box and the ps

Re: [GENERAL] Pl/java in 8.4 bet1 sources compilation failed

2009-05-29 Thread Craig Ringer
nd 1.6 (JDBC 4) would > require a more complicated conditional compilation system like that > provided with the standard JDBC driver. Perhaps a stupid question, but isn't the `-source' parameter to javac intended to mask new features and such for just the purpose of compiling ol

Re: [GENERAL] Pl/java in 8.4 bet1 sources compilation failed

2009-05-31 Thread Craig Ringer
Kris Jurka wrote: > Craig Ringer wrote: > >> Perhaps a stupid question, but isn't the `-source' parameter to javac >> intended to mask new features and such for just the purpose of compiling >> older sources on a new JDK? >> > > The -source

Re: [GENERAL] Using results from RETURNING

2009-06-06 Thread Craig Ringer
was if you can't do anything with the > results. You can use them in most situations other than subqueries. PL/PgSQL SELECT INTO, returning to the client, etc. Really handy. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

Re: [GENERAL] Creating schema, database, or table in different folder.

2009-06-06 Thread Craig Ringer
en. If you want to do selective backups, use pg_dump, which has options to include/exclude some tables. (This needs a FAQ entry) -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] limit table to one row

2009-06-06 Thread Craig Ringer
Brandon Metcalf wrote: > Is there a way when creating a table to limit it to one row? That is, > without using a stored procedure? > > I searched the documentation, but didn't find anything. > CREATE TABLE x (...); CREATE UNIQUE INDEX x_only_one_row ON ((1)); -- Craig

Re: [GENERAL] Why lots of temp schemas are being created

2009-06-08 Thread Craig Ringer
amine the pg_namespace system table with something like: select * from pg_namespace where not nspname like 'pg_%'; -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Block_Size on NTFS

2009-06-09 Thread Craig Ringer
t the Pg block size be a multiple of the file system block size. Since most file systems use blocks of 4k or some other 2^x power less than that, Pg's 8k block size is basically always going to be fine. New hard disks are moving to 4k physical blocks, so you won't have any issues on

Re: [GENERAL] Very slow searching in a table with more than 10 millions recovered records from a backup file...

2009-06-12 Thread Craig Ringer
who may not upgrade reliably with every version and don't know how to make these decisions for themselves, dump and reload. Remember, if the major version changes (eg upgrading from 8.2 to 8.3) or the postgresql build settings have changed, you MUST dump and reload. -- Craig Ringer -- Sent

Re: [GENERAL] How to store text files in the postgresql?

2009-06-12 Thread Craig Ringer
er could hide those from you, or the DB could take care of the FS 2PC as part of its own LOB and transaction management. In fact, I think that's how Microsoft have done it with transactional NTFS integration in MS SQL Server, which I must say sounds awfully nice. -- Craig Ringer -- S

Re: [GENERAL] How to store text files in the postgresql?

2009-06-12 Thread Craig Ringer
ackups plus daily incrementals for audit/history purposes, that matters. I can't see any way I could reasonably achieve a similar effect if I stored my mail in an RDBMS. Not, at least, and still have acceptable performance in the RDBMS. -- Craig Ringer -- Sent via pgsql-general mailing list (pg

Re: [GENERAL] Opinions on how to Integrate Transactions

2009-06-14 Thread Craig Ringer
ile a transaction is open, an implicit ROLLBACK is issued by the backend. However, you should always close your transactions properly, both to ensure that data that should get committed does get committed, and so that if you start using connection pooling (which you probably will) you're not d

Re: [GENERAL] help with data recovery from injected UPDATE

2009-06-14 Thread Craig Ringer
place. It should've refused, surely? > I guess it's too much to ask postmaster to do a PITR from a pg_dump > backup, as opposed to a file system backup. Bummer. Yep. No hope. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Craig Ringer
iles, apparently. Is it worth having the win32 version of the server report sudden backend death via the Windows event logging system, with a reference to the Pg log file? I'm not sure, since it's not clear that most Windows admins look at Event Viewer either...) -- Craig Ringer -- Sent

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Craig Ringer
. Maybe somone else can shed some more light on this one. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Craig Ringer
n the first thing to do is UNINSTALL one of your AV products and see if the issues go away. Reinstall it once you know; the point is to test whether the AV is part of the problem or not. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Craig Ringer
On Fri, 2009-06-19 at 01:03 -0400, Tom Lane wrote: > Craig Ringer writes: > > I increasingly wonder if Symantec or McAfee can be persuaded to offer a > > buildfarm machine with their software to PostgreSQL. Virus scanners on > > servers are an (IMO nearly insane) fa

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-19 Thread Craig Ringer
d too busy proclaiming to the user "I'm doing something, I'm doing something". -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] looping over a small record set over and over in a function

2009-06-20 Thread Craig Ringer
you: SELECT x.*, computefield(x, p) FROM smalltable x, otherparams p; or something along those lines? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] cursors, temp tables, dynamic sql technique (was and is: looping over a small record set over and over in a function)

2009-06-21 Thread Craig Ringer
They also don't need to be written with O_SYNC or fsync()ed since we don't care if writes make it to the table in order. As a result I'm pretty sure temp tables don't ever have to hit the disk. If the OS has enough write-cache space it can just store them in RAM from creation to deletion. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] cursors, temp tables, dynamic sql technique (was and is: looping over a small record set over and over in a function)

2009-06-21 Thread Craig Ringer
e table will fit in RAM and when it needs to spill to disk, and it's much better at managing that than Pg can ever be. It's great that Pg just uses the OS's hardware knowledge, system-wide awareness, and highly optimised memory manager + disk IO management to take care of the problem. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-21 Thread Craig Ringer
o look in the event log. Of course, if you try to start a service and it fails, the generic error message from Windows tells you to look in the event log for more information. This may be a case of people who don't _want_ to look into it and don't want to think about it. -- Craig Ringer

Re: [GENERAL] Information about columns

2009-06-22 Thread Craig Ringer
sually find that this information is most easily obtained via your client driver. I don't know if it's exposed at the SQL level, but it's certainly available from the underlying PostgreSQL network protocol. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-22 Thread Craig Ringer
p collect information that might help identify the cause and lead to a fix. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Replication

2009-06-22 Thread Craig Ringer
're also generally very willing to accept help, testing, and users who're willing to trial early efforts. Hint, hint. Donations of paid developer time to work on a project you find to be commercially important probably wouldn't go astray either. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Replication

2009-06-22 Thread Craig Ringer
re-issuing transactions due to deadlocks, resource exhaustion, admin statement cancellation etc anyway. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Replication

2009-06-22 Thread Craig Ringer
ss without inter-node synchronisation in multi-master environments. Block-level master/slave synchronous replication, however, is already on the way. (Also, Slony provides row-level master/slave replication that seems to work well for a lot of people, though it's widely admitted to be a bit of

Re: [GENERAL] Replication

2009-06-22 Thread Craig Ringer
On Mon, 2009-06-22 at 21:12 -0600, Scott Marlowe wrote: > On Mon, Jun 22, 2009 at 8:59 PM, Craig > Ringer wrote: > > > So ... it doesn't seem likely that statement-level replication would > > ever get far in Pg because of nasty issues like this one. > > It'

Re: [GENERAL] Replication

2009-06-23 Thread Craig Ringer
Thomas Kellerer wrote: > Mike Christensen wrote on 23.06.2009 19:37: >> Does anyone actually have that (any node can go down and the others still >> replicate amongst themselves?) > > I think this is what Oracle promises with their RAC technology. Isn't RAC a shared-

Re: [GENERAL] Separating raise notice lines

2009-06-23 Thread Craig Ringer
y subsequent notices will appear on separate lines. > However, when I use a query to update a field that will fire this trigger, > the Messages tab contains this: You're apparently not using psql. Normally, notices are printed one-per-line by psql. What is the "Messages" tab? i

Re: [GENERAL] question about frequency of updates/reads

2009-06-23 Thread Craig Ringer
NOT store anything you care about keeping that way, though. If you're using Pg anyway for other things, if you do also intend to store the history of the changes (say, as a change log in another table on safe storage), etc, then you might want to look at temp tables in a RAM-disk based ta

Re: [GENERAL] Replication and coding good practices

2009-06-29 Thread Craig Ringer
hat needs to be done to get the schema and app to the latest version - there's no "what the hell is the current state of this thing, anyway?" to worry about. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Python client + select = locked resources???

2009-06-29 Thread Craig Ringer
hare locks that will prevent ALTER TABLE from grabbing an exclusive lock on the table. > cur = db.cursor() > cur.execute('select * from testtable') > rek = cur.fetchone() > cur.close() > while 1: > pass Here you're ho

Re: [Fwd: Re: [GENERAL] Python client + select = locked resources???]

2009-07-01 Thread Craig Ringer
at_activity If there are, you may need to alter settings in your web server, connection pooler, or web app. > Yes. If I can make a rollback on it, all of resources released. > Now I search for a way to "force dbutils to it must make a rollback > before it re-move the connect

Re: [GENERAL] Help with installation please...

2009-07-02 Thread Craig Ringer
w.pokertracker.com/products/PT3/docs/PokerTracker3_Manual_Uninstall_Reinstall_PostgreSQL.pdf If that doesn't help, consider contacting them for support. > > __ -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-

Re: [GENERAL] REINDEX "is not a btree"

2009-07-04 Thread Craig Ringer
storing, did you: - Stop PostgreSQL - Check with "ps" to ensure no 'postgres' or 'postmaster' instances were still running - Move the old data directory out of the way - Copy the backup data directory from your backups - start PostgreSQL ? Have you checked the file sys

Re: [GENERAL] INSERT only unique records

2009-07-12 Thread Craig Ringer
5. Don't worry about the duplicates. Let them be inserted, and weed them out later or use a view with a GROUP BY to pick distinct rows. 6. Do your inserts via a PL/PgSQL function that sets a savepoint before each insert and rolls back to the savepoint if the unique constraint generate

Re: [GENERAL] Weird disk/table space consumption problem

2009-07-12 Thread Craig Ringer
;reallocated sector" count, or if "pending sector" is non-zero, then it's time to replace the drive. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How can I find out the space used on disk for a table/index

2009-07-13 Thread Craig Ringer
On Mon, 2009-07-13 at 00:53 +0100, Greg Stark wrote: > Also counter-productive since vacuum full actually causes indexes to > grow, not shrink. As a result, your indexes may be quite bloated. Consider REINDEXing them to get them back to sensible sizes, then avoiding VACUUM FULL. --

Re: [GENERAL] Concurrency issue under very heay loads

2009-07-17 Thread Craig Ringer
this mailing list for gapless sequence implementations and use one of them. Beware the nasty performance implications. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] [PERFORM] Concurrency issue under very heay loads

2009-07-17 Thread Craig Ringer
e sure you don't issue the same id number twice. These days can't you just UPDATE ... RETURNING the sequence source table? Or is there some concurrency issue there I'm not seeing? Other than the awful impact on concurrent insert performance of course, but you're stuck with t

Re: [GENERAL] Asking for assistance in determining storage requirements

2009-07-17 Thread Craig Ringer
ormance use direct-attached SAS arrays. People also seem to separate out read-mostly/archival tables, update-heavy tables, the WAL, temp table space, and disk sort space into different RAID sets. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Working around spurious unique constraint errors due to SERIALIZABLE bug

2009-07-17 Thread Craig Ringer
entations would have to do predicate locking. Ouch. Does anybody do that? It seems MS-SQL implements very limited predicate locking (enough to handle your issue) but not enough to tackle aggregates or anything complex. -- Craig Ringer #!/usr/bin/env python import psycopg2 import sys import ti

Re: [GENERAL] Please help

2009-07-17 Thread Craig Ringer
s window on the folder to do this. - Start the PostgreSQL service. With luck you can now connect. If so, IMMEDIATELY back up your database, and start doing so regularly... -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Idle in transaction

2009-07-17 Thread Craig Ringer
you turn autocommit back off and issue a rollback before handing the connection back to the connection pooler, does the issue go away? Personally I prefer to explicitly manage transactions anyway. Most Java code/libraries seem to expect autocommit to be off, it makes it easier to guarantee that read-o

Re: [GENERAL] memory leak occur when disconnect database

2009-07-17 Thread Craig Ringer
ters (say 1kb allocated and not freed in a loop that runs once per second) and a leak that doesn't. -- Craig Ringer all: test test.c: test.pgc ecpg $< test: test.c gcc -g3 -o test test.c -I /usr/include/postgresql/ -lecpg clean: rm test.c test int OpenDataBase(void) {

Re: [GENERAL] memory leak occur when disconnect database

2009-07-17 Thread Craig Ringer
estprogram just to be sure? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] memory leak occur when disconnect database

2009-07-20 Thread Craig Ringer
valgrind --leak-check=full ./testprogram -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: ***UNCHECKED*** Re: [GENERAL] memory leak occur when disconnect database

2009-07-21 Thread Craig Ringer
is the list of errors valgrind reports. Your name service switch looks like it might be doing something unsafe, though it's presumably getting away with it or you'd REALLY know about it. It's not related, in any case.) -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: ***UNCHECKED*** Re: [GENERAL] memory leak occur when disconnect database

2009-07-21 Thread Craig Ringer
On Tue, 2009-07-21 at 10:13 -0400, Tom Lane wrote: > Craig Ringer writes: > > I'm a bit puzzled about why you have three "postmaster" instances shown > > as running. > > It's not unusual for "top" to show the postmaster's child processes

Re: [GENERAL] Copying only incremental records to another DB..

2009-07-25 Thread Craig Ringer
Scott Ribe wrote: You mean rsync the "data" folder, or the entire PG folder? I meant the data folder. To be clearer: Do you mean that the folder you backed up is the folder with the file "PG_VERSION" in it, and all its contents? -- Craig Ringer -- Sent via pgsql-

Re: [GENERAL] Clients disconnect but query still runs

2009-07-29 Thread Craig Ringer
the client restarts and tries again, now making the problem much worse, and the vicious cycle continues until the server is rebooted. The server should never need to be rebooted. What about pg_cancel_backend() ? What about killing the backends with SIGTERM (not SIGKILL, -9) or similar? -

Re: [GENERAL] Idle processes chewing up CPU?

2009-07-29 Thread Craig Ringer
7 postgres.exe!BackendRun+0x204 postgres.exe!SubPostmasterMain+0x224 postgres.exe!main+0x177 postgres.exe!__tmainCRTStartup+0x10f kernel32.dll!BaseProcessStart+0x23 You can also, if you prefer, use windbg.exe from the Debugging Tools for Windows to get a stack trace. This is widely documented.

Re: [GENERAL] Idle processes chewing up CPU?

2009-07-29 Thread Craig Ringer
Craig Ringer wrote: Brendan Hill wrote: Hi Tom, Given it's on Windows, any suggestion for how I would get hold of this? (Process Monitor tool perhaps?) I think you can get stack traces from Process Monitor using "Tools -> Stack Summary". I find it a bit hard to interpret

[GENERAL] Reporting problems wiki article - help requested

2009-07-29 Thread Craig Ringer
l.org/wiki/Guide_to_reporting_problems -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Clients disconnect but query still runs

2009-07-29 Thread Craig Ringer
already supports keepalives. I guess what'd be helpful would be a periodic recv(..., MSG_DONTWAIT) on the client<->server socket while the backend is working hard on a query. A SIGLARM would be handy for that, though I guess Pg isn't used to having to test for EINTR on s

Re: [GENERAL] Clients disconnect but query still runs

2009-07-30 Thread Craig Ringer
g the socket for the dead process. If I try this with a `psql' process, the server cleans up the orphaned backend promptly. So, barring network breaks (wifi down / out of range, ethernet cable fell out, etc etc) how is the OP managing to leave backends running queries? Hard-resetting the m

Re: [GENERAL] Clients disconnect but query still runs

2009-07-30 Thread Craig Ringer
g a query when the client died while the backend was in the middle of a long-running query. Keepalives alone won't solve that one. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Clients disconnect but query still runs

2009-07-30 Thread Craig Ringer
st tune your keepalives if you have hopelessly flakey clients. Even if the client _program_ crashes, though, you shouldn't have anything left lying around. It's only if the client _OS_ crashes or the machine is hard-reset that you should be left with a backend lying around until tcp keepaliv

Re: [GENERAL] Clients disconnect but query still runs

2009-07-30 Thread Craig Ringer
#x27;s the OS's default. PostgreSQL just doesn't change it. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] LDAP Configuration for Postgres authenticating against AD

2009-08-04 Thread Craig Ringer
nstead of "all" users for password auth you wanted to (eg) only require password auth for the "postgres" user? If that's not the issue: Try watching for LDAP traffic with wireshark; see if there's any communication. Also, use `ldapsearch' from the host running Pg to

Re: [GENERAL] Idle processes chewing up CPU?

2009-08-04 Thread Craig Ringer
exe!__tmainCRTStartup+0x10f kernel32.dll!BaseProcessStart+0x23 See how it has "ModuleNames!SymbolicNames+offsets" instead of just "ModuleNames+offsets" ? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Idle processes chewing up CPU?

2009-08-05 Thread Craig Ringer
On Wed, 2009-08-05 at 16:44 +1000, Brendan Hill wrote: > Hi Craig, > > Sorry, I had the stack trace so I thought it was enough. I'll make sure the > debug environment is set up and post the full stack traces again. No worries. Sorry it cost you time. I've extended the

Re: [GENERAL] Rapid Seek Devices (feature request)

2009-08-16 Thread Craig Ringer
is added) materialized views if it finds the backing files are missing. This would be helpful for such transient devices as RAM disks if you didn't want to bother having physical storage backing it. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgres

Re: [GENERAL] Function Logging

2009-08-16 Thread Craig Ringer
ck up a step or two. Did you have statement logging within PL/PgSQL functions in 7.2? If so, how? Why do you need statement logging within functions? What are you trying to achieve with it? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Function Logging

2009-08-18 Thread Craig Ringer
atement of a PL/PgSQL function where in 8.3 it does not. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Idle processes chewing up CPU?

2009-08-18 Thread Craig Ringer
On 19/08/2009 12:31 PM, Brendan Hill wrote: Hi Craig/Tom, I've managed to trap the full stack trace this time The common part of those traces is: > ntdll.dll!KiFastSystemCallRet > WS2_32.dll!WSARecv+0x65 > WSOCK32.dll!recv+0x31 > LIBEAY32.dll!BIO_sock_should_retry+0x

Re: [GENERAL] Idle processes chewing up CPU?

2009-08-19 Thread Craig Ringer
On 19/08/2009 1:34 PM, Brendan Hill wrote: Hi Craig, thanks for the analysis. If I attach a debugger on the runaway child process, will this halt execution for all the other child processes (ie. freeze the server)? And, can I attach Visual Studio C++ 2008, or is there a recommended debugger for

Re: [GENERAL] "Could not open relation XXX: No such file or directory"

2009-08-19 Thread Craig Ringer
anner installed? If so, remove it (do not just disable it) and see if you can reproduce the problem. Ditto anti-spyware software. You should also `chkdsk' your file system(s) and use a SMART diagnostic tool to test your hard disk (assuming it's a single ATA disk). -- Craig Ringer --

Re: [GENERAL] Problem with bacula and 8.3/8.4

2009-08-19 Thread Craig Ringer
ath) SELECT batch_path.Path FROM batch_path AS a WHERE NOT EXISTS (SELECT 1 FROM Path WHERE Path = a.Path); -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] ERROR: could not access file "$libdir/xxid": No such file or directory

2009-08-20 Thread Craig Ringer
.com (free). Yet another tool the OS and the Windows standard dev tools fail to include. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Schema diff tool?

2009-08-21 Thread Boyd, Craig
What version of ERwin are you using? Thanks, Craig Boyd David Kerr wrote: Is there a default/standard (free) schema diff tool that's in use in the community? I'd like to be able to quickly identify new columns, data changes, new indexes, etc between 2 schema versions. (and then

Re: [GENERAL] Schema diff tool?

2009-08-21 Thread Boyd, Craig
the time then I will send you the options xml and the steps I used to recreate. Thanks, Craig Boyd David Kerr wrote: we're on v7.2.8 there's no pg specific option so we've been using ODBC as the "database" type and the alter's it generates are just ugly.

Re: [GENERAL] export a schema / import as new schema

2009-08-21 Thread Boyd, Craig
Look here: http://sqlmanager.net/en/products/postgresql They aren't cheap, but they seem to work well. Thanks, Craig Boyd David Kerr wrote: On Fri, Aug 21, 2009 at 12:00:11PM -0700, Joshua D. Drake wrote: - On Fri, 2009-08-21 at 11:56 -0700, David Kerr wrote: - > Is there an easy w

Re: [GENERAL] "Could not open relation XXX: No such file or directory"

2009-08-21 Thread Craig Ringer
On Fri, 2009-08-21 at 11:30 +1000, Yaroslav Tykhiy wrote: > Hi there, > > On 19/08/2009, at 8:38 PM, Craig Ringer wrote: > > You should also `chkdsk' your file system(s) and use a SMART > > diagnostic tool to test your hard disk (assuming it's a single ATA >

Re: [GENERAL] ERROR: could not access file "$libdir/xxid": No such file or directory

2009-08-22 Thread Craig Ringer
On Sat, 2009-08-22 at 00:23 -0700, Jorge Daine Quiambao wrote: > Craig Ringer, > > I tried scanning "slony1_funcs.dll" for dependencies but for some > reasons it cannot find POSTGRES.EXE, the files is encrypted if I try > to open it so I can't set the d

Re: [GENERAL] libpq performance

2009-08-23 Thread Craig Ringer
ning time. There are ways to reduce planning time (at the cost of potentially inferior query plans) - but if you're really that worried about query execution time, might you perhaps be executing a huge number of tiny queries in a situation where one or two bigger queries can get the job done

Re: [GENERAL] What approach should I use instead of creating tables on the fly?

2009-08-23 Thread Craig Ringer
mixes the advantages (reference integrity + good > performance) of those ones I listed above? Table partitioning and table inheritance. See the manual and the list archives. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Install from Source On Windows - University of Sydney Research

2009-08-23 Thread Craig Ringer
ng the binary installer for a recent version? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-23 Thread Craig Ringer
will stop sending packets, so it'll look to the client like it's a hard server crash. You should also test your client's response to the Pg server remaining up but becoming non-responsive (eg: failed disk array causes Pg backends to remain in uninterruptable disk I/O system calls in t

Re: [GENERAL] Install from Source On Windows - University of Sydney Research

2009-08-23 Thread Craig Ringer
. Remember to use ".cmd" not ".bat" so you run under the win32 cmd.exe script processor not the ancient dos emulation monster command.com . -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-24 Thread Craig Ringer
PostgreSQL are also kind of something I would like to simulate in any > way. This is the reference I should've given: http://www.linuxfoundation.org/en/Net:Netem -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-24 Thread Craig Ringer
to the network. Unless you've worked a bit with iptables before or at least done a lot of general networking work you'll need to do a bit of learning to get much of this up and running smoothly. It's not a trivial drop-in. I'm not going to give detailed instructions and support,

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-24 Thread Craig Ringer
nt must cope with. This, by the way, is one of the reasons you *really* should do all your database work in a separate worker thread on GUI clients. The GUI must remain responsive even when you're waiting for a response that'll never come, or being held up by multi-second network latencies.

Re: [GENERAL] backup and recovery problem

2009-08-25 Thread Craig Ringer
only if you get the setup right, and there ARE mistakes you can make. Note that you MUST NOT use pg_start_backup and pg_stop_backup for file system copies unless you have WAL archiving in place or have scripts to copy the required WAL archives after pg_stop_backup. -- Craig Ringer -- Sent vi

<    1   2   3   4   5   6   7   8   9   10   >