Re: [GENERAL] Better way to process boolean query result in shell-like situations?

2015-10-29 Thread Martijn van Oosterhout
test that à la: What I do is use grep, for example (off the top of my head): if ! psql -qAt -c "select usename from pg_user" | grep -q USERNAME ; then ... If you're looking for true/false you could grep for t/f. Hope this helps, -- Martijn van Oosterhout <klep...@svana.org>

Re: [GENERAL] Unit tests and foreign key constraints

2015-05-21 Thread Martijn van Oosterhout
generally way easier to run your unit tests on an actual PostgreSQL database. Otherwise you're going to spend all your time working around the fact that your mock database is not the real thing (and running into bugs in your emulation layer). Have a nice day, -- Martijn van Oosterhout klep

Re: [GENERAL] Unit tests and foreign key constraints

2015-05-21 Thread Martijn van Oosterhout
them that way... Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital

Re: [GENERAL] [HACKERS] optimization join on random value

2015-05-04 Thread Martijn van Oosterhout
))) (2 rows) If you look carefully you'll see that the comparison here is done as a double precision and so can't use the index. If you say something like: WHERE customer_id = trunc( random()*45000)::bigint it will probably work fine. Have a nice day, -- Martijn van Oosterhout klep

Re: [GENERAL] Prepared statements with bind parameters for DDL

2015-02-11 Thread Martijn van Oosterhout
to make this work, but it saves you from any quoting issues. Of course, it gets more complicated if you want to allow cases like: PREPARE get_by_id AS SELECT * FROM IDENTIFIER($1) WHERE id=$2; EXECUTE get_by_id('mytable', 400); But DDL would be a great start. Have a nice day, -- Martijn van

Re: [GENERAL] sslcompression / PGSSLCOMPRESSION not behaving as documented?

2015-01-18 Thread Martijn van Oosterhout
in future protocol versions. It will take a while for TLS 1.3 to be deployed so there's time, but PostgreSQL protocol revisions go at a similar pace. Have a nice day, [1] https://github.com/tlswg/tls13-spec -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes

Re: [GENERAL] Surrogate pairs in UTF-8

2015-01-18 Thread Martijn van Oosterhout
showing the problem (and server version). Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc

Re: [GENERAL] Alternatives to a unique indexes with NULL

2015-01-18 Thread Martijn van Oosterhout
index idx_1 on peter_hicks ((case when id is null then 'NULL' else '' end)) where id is null; CREATE INDEX Time: 14,803 ms Note: COALESCE is probably the better choice here. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly

Re: [GENERAL] Advice for using integer arrays?

2015-01-07 Thread Martijn van Oosterhout
interested in ranges, see for example: http://www.postgresql.org/docs/9.2/static/rangetypes.html Conceptually they are a bit different and there isn't support for multi-ranges AFAIK but they might be more appropriate. Hope this helps, -- Martijn van Oosterhout klep...@svana.org http

Re: [GENERAL] Recursive CTE trees + Sorting by votes

2014-08-06 Thread Martijn van Oosterhout
... ORDER BY vote DESC ) SELECT * from cte order by path, votes desc; Hope this helps, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur

Re: [GENERAL] Random-looking primary keys in the range 100000..999999

2014-07-05 Thread Martijn van Oosterhout
, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] pg_attribute growing extremely

2014-06-06 Thread Martijn van Oosterhout
later the system had arrived at 102 files Is autovacuum enabled? Are you using a lot of temporary tables? Do you have long running transactions? Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-30 Thread Martijn van Oosterhout
() that does what you want. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-29 Thread Martijn van Oosterhout
not enable this option, hence they (probably) have no effect. (Discovered after finding processes staying alive for several months because the firewall had lost it's state table at some point). Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes

Re: [GENERAL] new index type with clustering in mind.

2014-05-24 Thread Martijn van Oosterhout
, except they're not crash safe. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc

Re: [GENERAL] Refresh Postgres SSL certs?

2014-04-09 Thread Martijn van Oosterhout
the Debian README? /usr/share/doc/postgresql-*/README.Debian.gz It talks about how the certificates are made. It uses the ssl-cert package to make them, there's more docs there. Yes, you can make your own self-signed certs and use them. Have a nice day, -- Martijn van Oosterhout klep...@svana.org

Re: [GENERAL] Refresh Postgres SSL certs?

2014-04-09 Thread Martijn van Oosterhout
, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] encrypting data stored in PostgreSQL

2014-04-09 Thread Martijn van Oosterhout
. Essentially, the processor can encrypt/decrypt data so much faster than the cost of reading/writing to disk, you don't notice the difference. There's surely a difference, but if this means you meet your requirements it's an excellent solution. Have a nice day, -- Martijn van Oosterhout klep

Re: [GENERAL] 9.3 debian install setup failure

2014-03-22 Thread Martijn van Oosterhout
running with ps. Maybe you typoed the config file? Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer

[GENERAL] WAL archive cleanup om master

2014-01-06 Thread Martijn van Oosterhout
on the master. I can make a script on the master that deletes files older than an hour, but that will break horribly if the copying breaks for an hour. Is there a smarter way to do this, like having rsync not copy stuff already copied once? Thanks in advance, -- Martijn van Oosterhout klep...@svana.org

Re: [GENERAL] WAL archive cleanup om master

2014-01-06 Thread Martijn van Oosterhout
On Mon, Jan 06, 2014 at 07:16:25AM -0800, Adrian Klaver wrote: On 01/06/2014 03:18 AM, Martijn van Oosterhout wrote: Hoi, I've setup a up WAL shipping configuration as described in the wiki. On the master I have: archive_mode= on archive_command = 'cp %p /path_to/archive/%f

Re: [GENERAL] WAL archive cleanup om master

2014-01-06 Thread Martijn van Oosterhout
On Mon, Jan 06, 2014 at 08:17:37AM -0800, Adrian Klaver wrote: On 01/06/2014 07:35 AM, Martijn van Oosterhout wrote: On Mon, Jan 06, 2014 at 07:16:25AM -0800, Adrian Klaver wrote: On 01/06/2014 03:18 AM, Martijn van Oosterhout wrote: Hoi, I'm not sure what you mean, isn't

Re: [GENERAL] question on IPC vs TCPIP

2014-01-01 Thread Martijn van Oosterhout
There is a measurable reduction in elapsed time for my code when I specify IPC. My code uses: node.js https://npmjs.org/package/odbc db2 In general, in postgres you leave the the hostname blank to specify local IPC. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog

Re: [GENERAL] having difficulty with explain analyze output

2013-11-26 Thread Martijn van Oosterhout
it matched now rows at all. And if this is the complete plan, it took 1,500 seconds for itself. Hope this helps, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his

[GENERAL] Changing primary key of large table, with foreign keys, without locking

2013-11-20 Thread Martijn van Oosterhout
CONSTRAINT attr1_a_fkey1 FOREIGN KEY (a, b) REFERENCES events(a, b) Voila! Am I missing anything? It's not pretty, but it reduces the problem to a few short exclusive locks, rather than hours of downtime scanning tables. PG 9.1.10 FWIW. -- Martijn van Oosterhout klep...@svana.org http

Re: [GENERAL] Postgres as In-Memory Database?

2013-11-17 Thread Martijn van Oosterhout
a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] Curious question about physical files to store database

2013-11-07 Thread Martijn van Oosterhout
a partition I actually see the disk usage drop. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer

Re: [GENERAL] Suitable Index for my Table

2013-11-04 Thread Martijn van Oosterhout
. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] Suitable Index for my Table

2013-11-04 Thread Martijn van Oosterhout
, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [HACKERS] [GENERAL] Urgent Help Required

2013-10-08 Thread Martijn van Oosterhout
day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] Building with MinGW issue

2013-09-29 Thread Martijn van Oosterhout
platform. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] procedure to contribute this community

2013-04-08 Thread Martijn van Oosterhout
performence problems and instability. Someone wrote a nice blog about it once and coined a term, but I've forgetten what. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does

Re: [GENERAL] Why does slony use a cursor? Anyone know?

2013-03-05 Thread Martijn van Oosterhout
about it and it turns out that I was running a somewhat old version, and it was fixed in later versions. Check that first. But ask anyway, I've always found the Slony guys very helpful. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes

Re: [GENERAL] New Zealand Postgis DBA job vacancy

2012-12-26 Thread Martijn van Oosterhout
heard of anything like the weird cases you get with those American green cards. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts

Re: [GENERAL] integer instead of 'double precision'?

2012-11-12 Thread Martijn van Oosterhout
float output by default, but also provides a // operator to access the truncated version. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own

Re: [GENERAL] PostgreSQL and IPV6

2012-11-03 Thread Martijn van Oosterhout
, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] Somewhat automated method of cleaning table of corrupt records for pg_dump

2012-10-22 Thread Martijn van Oosterhout
,tuple)' to start scanning at a particular spot in the table. It's not automated, though it might not be hard to do. Hope this helps, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much

Re: [GENERAL] Securing .pgpass File?

2012-10-02 Thread Martijn van Oosterhout
which you can check-in safely. Not super safe, but for read-only accounts for e.g. nagios might be ok. Hope this helps, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance

Re: [GENERAL] Thousands of schemas and ANALYZE goes out of memory

2012-10-02 Thread Martijn van Oosterhout
day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] pg_typeof equivalent for numeric scale, numeric/timestamp precision?

2012-10-02 Thread Martijn van Oosterhout
for you. As for no SQL level functions, you could probably write a function to determine the scale/precision of a given *value*, but not for a whole column. But once you have to string representation of the value you have that anyway... Have a nice day, -- Martijn van Oosterhout klep...@svana.org

Re: [GENERAL] 9.2 and index only scans

2012-08-28 Thread Martijn van Oosterhout
is something I never do. The system tables carry estimates which have proved good enough for statistical purposes when I need them. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does

Re: [GENERAL] Rules, Windows and ORDER BY

2012-08-24 Thread Martijn van Oosterhout
and hence be much faster than any of the above suggestions, so if this is a really important query then it may be worth it here. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does

Re: [GENERAL] Alternatives to very large tables with many performance-killing indicies?

2012-08-23 Thread Martijn van Oosterhout
) Index Cond: (b = 1) (4 rows) In this case a row update will only update indexes with non-NULL rows, which may cut the overhead considerably. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very

Re: [GENERAL] How hard would a path operator be to implement in PostgreSQL

2012-08-21 Thread Martijn van Oosterhout
On Tue, Aug 21, 2012 at 09:39:20AM +0800, Craig Ringer wrote: On 08/21/2012 03:06 AM, Martijn van Oosterhout wrote: I'm not sure I have an opinion on pushing ORM features to the database layer, SQLAlchemy is doing a pretty good job for me already. There are some things ORMs could really use

Re: [GENERAL] How hard would a path operator be to implement in PostgreSQL

2012-08-20 Thread Martijn van Oosterhout
in an order which you could derive from a foreign key, compared to items in an order which have sales tax which is something more general. So whatever the result of this discussion, don't just consider foreign keys, think bigger. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http

Re: [GENERAL] How to analyze load average ?

2012-08-06 Thread Martijn van Oosterhout
it taking a while for your disk cache to reach steady state after a reboot can mean that you see a higher than normal load for a while. But 0.88 is really nothing to worry about. Perhaps it is just slower core or a slower memory bus. Have a nice day, -- Martijn van Oosterhout klep...@svana.org

Re: [GENERAL] Locking or Something Else?

2012-05-20 Thread Martijn van Oosterhout
, then it may be that your disk subsystem has slow fsyncs. Hope this helps, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer

Re: [GENERAL] Libpq question

2012-05-20 Thread Martijn van Oosterhout
perl/python implementations but AFAIK they are not widely used. It's not common to not use libpq. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his

Re: [GENERAL] Global Named Prepared Statements

2012-05-15 Thread Martijn van Oosterhout
the desired effect? This is a well understood and commonly used paradigm. When using a connection pooler any query plan caching will happen automatically. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very

Re: [GENERAL] SQLSTATE XX000 Internal Error 7

2012-05-03 Thread Martijn van Oosterhout
this error can occur. Linux does it if you ask for O_DIRECT on a filesystem that doesn't support it, but it doesn't look like that's the problem here either. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby

Re: [GENERAL] pqlib garbage collection

2012-05-03 Thread Martijn van Oosterhout
collection. You must use PQclear. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc

Re: [GENERAL] Updates, ShareLocks, RowExclusiveLocks, and deadlocks

2012-04-25 Thread Martijn van Oosterhout
updating. Hope this helps, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] Large Databases redux

2012-03-21 Thread Martijn van Oosterhout
out file fragmentation. this way the IO workload is evenly distributed across all the disks. That, and a good RAID controller with BBU cache will go a long way to relieving the pain of fsync. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who

Re: [GENERAL] Interesting article, Facebook woes using MySQL

2012-03-14 Thread Martijn van Oosterhout
a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-31 Thread Martijn van Oosterhout
day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] Strange problem with create table as select * from table;

2011-11-05 Thread Martijn van Oosterhout
was true when the code was written, but still. Hve a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer

Re: [GENERAL] select where not exists returning multiple rows?

2011-11-02 Thread Martijn van Oosterhout
returning multiple rows. Any ideas what's going on here? As pointed out by others, you don't say if it this is a race condition between processes or if it always does this. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses

Re: [GENERAL] PostGIS in a commercial project

2011-10-27 Thread Martijn van Oosterhout
in the OPs case they are relying on the customer to install PostGIS. The GPL only applies to *redistribution* not usage. So if you're not supplying your customers with PostGIS then the fact that it's GPL seems completely irrelevent. Have a nice day, -- Martijn van Oosterhout klep...@svana.org

Re: [GENERAL] Video of Activity on PostgreSQL GIT repository

2011-10-17 Thread Martijn van Oosterhout
in postgres, it's really a very active project. [1] http://www.youtube.com/watch?v=gzTBJW2EVJY [2] code.google.com/???p/???gource/ [3] github.com/???postgres/???postgres Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly

Re: [GENERAL] (another ;-)) PostgreSQL-derived project ...

2011-09-25 Thread Martijn van Oosterhout
Notwithstanding the rest of your post, I'm surpised you missed the website: http://www.postgresql.org/download/ There's a source code link, as well as several others. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby

Re: [GENERAL] Parameterized prepared statements

2011-09-04 Thread Martijn van Oosterhout
in an IN and see what happens. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc

Re: [GENERAL] Selecting all records which are in upper case

2011-08-27 Thread Martijn van Oosterhout
is as follows: Might not work if you have non-ascii characters (but your example code breaks there too), but what about: DELETE ... WHERE upper(name) = name; Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby

Re: [GENERAL] Getting value of bind variables

2011-08-23 Thread Martijn van Oosterhout
van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who writes carelessly confesses thereby at the very outset that he does not attach much importance to his own thoughts. -- Arthur Schopenhauer signature.asc Description: Digital signature

Re: [GENERAL] string comparison problem

2011-08-01 Thread Martijn van Oosterhout
not be a problem - I have another 64 bit CentOS where both queries are executed displaying identical results. It's probably locale related. Postgres uses the same order as the sort command. Try show lc_collate. Hope this helps, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ He who

Re: [GENERAL] Referencing function value inside CASE..WHEN

2011-06-19 Thread Martijn van Oosterhout
... END; http://www.postgresql.org/docs/8.4/static/functions-conditional.html Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first; nationalism, when hate for people other than your own comes first

Re: [GENERAL] Short-circuit boolean evaluation

2011-04-30 Thread Martijn van Oosterhout
. This applies to any SQL database. You can somewhat enforce order with subselects and CASE and other such constructs. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first; nationalism, when hate for people other

Re: [GENERAL] Huge spikes in number of connections doing PARSE

2011-03-14 Thread Martijn van Oosterhout
with ps/wchan. It's unfortunate you don't have debug symbols enabled, which makes these traces somewhat unreliable. So you get odd things like index_open calling index_close. The common factor seems to be lots of index locks. Do you have very many indexes? Have a nice day, -- Martijn van Oosterhout

Re: [GENERAL] Why count(*) doest use index?

2011-03-06 Thread Martijn van Oosterhout
, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first; nationalism, when hate for people other than your own comes first. - Charles de Gaulle signature.asc Description: Digital

Re: [GENERAL] updating all records of a table

2011-03-05 Thread Martijn van Oosterhout
On Sat, Mar 05, 2011 at 07:38:23AM -0800, ray wrote: This has been a great thread! I am missing something because I do not know what CTAS is. WOuld someone please help me understand. Create Table As Select. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org

Re: [GENERAL] Thoroughly confused about time zones

2011-02-28 Thread Martijn van Oosterhout
. This is the timestamp without time zone. The latter is usually not that useful, except for output. What you usually want is the timestamptz. Hop this helps, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first; nationalism, when hate

Re: [GENERAL] PostgreSQL 9.0.3 - collate/ctype order by hu_HU.UTF8 is not correct sorting

2011-02-06 Thread Martijn van Oosterhout
did not support sorting in UTF-8. I know Apple added it themselves because they needed it but I don't think it got backported to *BSD. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first; nationalism

Re: [GENERAL] Database Design Question

2011-02-02 Thread Martijn van Oosterhout
easily do it by setting the default search path per user. ALTER USER phpbb SET search_path='phpbbschema'; As long as the apps don't play with the search path themselves it should be fine. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Martijn van Oosterhout
. The suggestion to simply reload the database as if all the current data was WIN1251 or Latin-9 is a fairly easy way to getting the database into a reasonable format. The data would have to be checked though. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org

Re: [GENERAL] Implementing replace function

2010-11-02 Thread Martijn van Oosterhout
times and use that to predict which would be better. There's always pathelogical cases, but it could work well for normal workloads. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first; nationalism, when

Re: [GENERAL] Feature request for this mail list

2010-11-02 Thread Martijn van Oosterhout
without + even from a bigger client most often I forgot The mailing list manager has several options which may be relevent here. There is a reply-to option which may do what you want: http://mail.postgresql.org/mj/mj_wwwusr/domain=postgresql.org Have a nice day, -- Martijn van Oosterhout klep

[GENERAL] gitweb error?

2010-10-30 Thread Martijn van Oosterhout
=e6721c6e1617a0fc8b4bce8eacba8b5a381f1f21 Line Number 53, Column 4: Trynbsp;tonbsp; ... ^ Is it just my browser being pedantic (Firefox 3.6) or something else? Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first

Re: [GENERAL] Record Separator with psql -c when output to a variable not a file!

2010-10-04 Thread Martijn van Oosterhout
day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first; nationalism, when hate for people other than your own comes first. - Charles de Gaulle signature.asc Description: Digital

Re: [GENERAL] Incrementally Updated Backups

2010-09-12 Thread Martijn van Oosterhout
consistantly and replays them if the database crashes. If you take a snapshot the database will simply startup and replay the log as if the machine crashed at the point. All committed transactions appears anything uncommitted vanishes. Have a nice day, -- Martijn van Oosterhout klep...@svana.org

Re: [GENERAL] postgres.conf settings

2010-08-29 Thread Martijn van Oosterhout
, or fewer but more complex queries? Basically, what's the workload? Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first; nationalism, when hate for people other than your own comes first

Re: [GENERAL] C-Functions using SPI - Missing Magic Block

2010-07-03 Thread Martijn van Oosterhout
, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first; nationalism, when hate for people other than your own comes first. - Charles de Gaulle signature.asc Description: Digital

Re: [GENERAL] checkpoint spikes

2010-06-11 Thread Martijn van Oosterhout
found that reducing this tends to smooth out bursty spikes. However, see: http://www.westnet.com/~gsmith/content/linux-pdflush.htm which indicates that kernel may try to defeat you here... Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism

Re: [GENERAL] Persistence problem

2010-05-13 Thread Martijn van Oosterhout
you have fully understood this page: http://www.postgresql.org/docs/8.4/static/xfunc-c.html it has a number of examples dealing with variable length types. You MUST use the VARDATA/VARATT/etc macros to construct and read your data. Hope this helps, -- Martijn van Oosterhout klep...@svana.org

Re: [GENERAL] Persistence problem

2010-05-12 Thread Martijn van Oosterhout
); mempcy (realResult, result, result-length); Did you define the type properly at SQL level? Is it a varlena type or fixed length? Did you return it properly (as Datum)? You're going to need to post more information before we can help you usefully. Have a nice day, -- Martijn van Oosterhout

Re: [GENERAL] When is an explicit cast necessary?

2010-04-10 Thread Martijn van Oosterhout
the literal as '1' (with quotes) postgres would happily downcast it for you without any problem. The question is: does the column really need to be smallint. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes

Re: [GENERAL] Internal PG functions, how to pass proper parameters?

2010-04-07 Thread Martijn van Oosterhout
SQL. So you might be able to declare the function, but in no way could you actually call it successfully. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Patriotism is when love of your own people comes first; nationalism, when hate for people other than

Re: [GENERAL] Yikes: ERROR: out of memory

2010-03-15 Thread Martijn van Oosterhout
); 212542976 used TupleSort: 369090584 total in 46 blocks; 7648 free (25 chunks); 369082936 used That's a few hundred MB also. I'd suggest checking your work_mem settings to see if you havn't gotten too much configured. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http

Re: [GENERAL] DROP column: documentation unclear

2010-03-08 Thread Martijn van Oosterhout
you're missing is that in postgres NULLs are stored as a bit in the header and there is no data. So in a sense NULLs take no space (well, one bit) which means both statements are true. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Please line up

[GENERAL] timestamp literal out of line

2010-03-07 Thread Martijn van Oosterhout
The workaround is simple, use a cast instead, but is there a particular reason why you can't use a parameter there? This does work, oddly enough. postgres=# prepare test2 as select timestamp '2009-01-01' at time zone $1; PREPARE Have a nice day, -- Martijn van Oosterhout klep...@svana.org

Re: [GENERAL] Putting index entries to XLog

2010-02-28 Thread Martijn van Oosterhout
-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Please line up in a tree and maintain the heap invariant while

Re: [GENERAL] Performance comparison

2010-02-25 Thread Martijn van Oosterhout
On Wed, Feb 24, 2010 at 09:13:36PM -0500, Greg Smith wrote: Martijn van Oosterhout wrote: I remember a while back someone posted a graphs showing a scalability of postgresql for various versions (I think 8.0 to 8.4). I've tried to find this image again but havn't been able to locate it. Does

[GENERAL] Performance comparison

2010-02-24 Thread Martijn van Oosterhout
Hoi, I remember a while back someone posted a graphs showing a scalability of postgresql for various versions (I think 8.0 to 8.4). I've tried to find this image again but havn't been able to locate it. Does anyone here remember? Mvg, -- Martijn van Oosterhout klep...@svana.org http

Re: [GENERAL] Week numbers and calculating weekly statistics/diagrams

2010-02-16 Thread Martijn van Oosterhout
a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Please line up in a tree and maintain the heap invariant while boarding. Thank you for flying nlogn airlines. signature.asc Description: Digital signature

Re: [GENERAL] Memory Usage and OpenBSD

2010-02-09 Thread Martijn van Oosterhout
of the allocations are quite small, but postgresql has an internal allocator which means that the system only sees relatively large allocations. The majority will be in the order of tens of kilobytes I suspect. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org

Re: [GENERAL] Error invalid byte sequence for encoding UTF8 on insert into BYTEA column

2010-01-21 Thread Martijn van Oosterhout
you'd be sending your paramters out of line anyway. Can you check that? Hope this helps, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Please line up in a tree and maintain the heap invariant while boarding. Thank you for flying nlogn airlines. signature.asc

Re: [GENERAL] Collate order on Mac OS X, text with diacritics in UTF-8

2010-01-17 Thread Martijn van Oosterhout
at all at the libc level (that is, if you don't just tell people to use ICU in that case). Mac OS X doesn't have great POSIX locale support but at least they implemented strcoll_l. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Please line up in a tree

Re: [GENERAL] vacuum issues under load?

2010-01-17 Thread Martijn van Oosterhout
the TRUNCATE command to abort if it takes too long. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Please line up in a tree and maintain the heap invariant while boarding. Thank you for flying nlogn airlines. signature.asc Description: Digital signature

Re: [GENERAL] Collate order on Mac OS X, text with diacritics in UTF-8

2010-01-13 Thread Martijn van Oosterhout
underneath for programs that would like true unicode collation, but there is little chance that postgresql will ever use this. Hope this helps, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Please line up in a tree and maintain the heap invariant while boarding. Thank you

Re: [GENERAL] Charset Win1250 on Windows and Ubuntu

2009-12-21 Thread Martijn van Oosterhout
unchanged but newer scripts can choose UTF-8 if they want it. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Please line up in a tree and maintain the heap invariant while boarding. Thank you for flying nlogn airlines. signature.asc Description

Re: [GENERAL] Question about the ANY operator

2009-12-21 Thread Martijn van Oosterhout
-809a-dc9931a01ed1']::uuid[]; The syntax is '= ANY(foo)', you're missing the parenthesis. Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Please line up in a tree and maintain the heap invariant while boarding. Thank you for flying nlogn airlines

Re: [GENERAL] PlPerl scope issue

2009-12-16 Thread Martijn van Oosterhout
=shift; test(); return $test; sub test { print X=.$test.\n; } } main(1); main(2); Output: X=1 X=1 Have a nice day, -- Martijn van Oosterhout klep...@svana.org http://svana.org/kleptog/ Please line up in a tree and maintain the heap invariant while boarding. Thank you

  1   2   3   4   5   6   7   8   9   10   >