[GENERAL] Preventing GIN fastupdate from slowing down normal queries

2014-03-14 Thread Zev Benjamin
Hi all, I'm running PostgreSQL 9.1 on a fairly beefy server with a lot of RAM, so I generally want work_mem set pretty high. One of my tables has a GIN index, and, as a consequence of the high work_mem setting, its fastupdate pending list can grow very large. This leads to the occasional IN

Re: [GENERAL] Adding a non-null column without noticeable downtime

2014-02-25 Thread Zev Benjamin
EXPLAIN does not appear to work on ALTER TABLE statements: => EXPLAIN ALTER TABLE "foo" ALTER COLUMN "bar" SET NOT NULL; ERROR: syntax error at or near "ALTER" LINE 1: explain ALTER TABLE "foo" ALTER COLUMN "bar" SET NOT NULL; ^ Zev On 02/25/2014 01:56 PM, Sameer Kumar wrote:

Re: [GENERAL] Adding a non-null column without noticeable downtime

2014-02-25 Thread Zev Benjamin
To be clear, this is with PostgreSQL 9.1. Also, if there is some other way of doing this, I'd be interested in other methodologies as well. Zev On 02/24/2014 10:41 PM, Zev Benjamin wrote: Hi all, I'm sure this has been answered somewhere, but I was not able to find anything i

[GENERAL] Adding a non-null column without noticeable downtime

2014-02-24 Thread Zev Benjamin
Hi all, I'm sure this has been answered somewhere, but I was not able to find anything in the list archives. I'm conceptually trying to do ALTER TABLE "foo" ADD COLUMN "bar" boolean NOT NULL DEFAULT False; without taking any noticeable downtime. I know I can divide the query up like so: A

[GENERAL] HeadlineWordEntry bit fields

2014-01-14 Thread Zev Benjamin
Hi, Could anyone explain the meaning of the bit fields in struct HeadlineWordEntry? Specifically, I'm not completely sure about selected, in, replace, repeated, and skip. Thanks, Zev -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

Re: [GENERAL] Full text search on partial URLs

2014-01-03 Thread Zev Benjamin
On 11/15/2013 07:40 PM, Zev Benjamin wrote: One problem that I've run into here is that I would also like to highlight matched text in my application. For my existing search solution, I do this with ts_headline. For partial matches, it's unfortunately not just a matter of searchi

Re: [GENERAL] Full text search on partial URLs

2014-01-03 Thread Zev Benjamin
On 11/15/2013 07:40 PM, Zev Benjamin wrote: One problem that I've run into here is that I would also like to highlight matched text in my application. For my existing search solution, I do this with ts_headline. For partial matches, it's unfortunately not just a matter of searchi

Re: [GENERAL] unnest on multi-dimensional arrays

2013-12-02 Thread Zev Benjamin
? Zev On 12/02/2013 01:24 PM, Pavel Stehule wrote: 2013/12/2 Zev Benjamin mailto:zev-pg...@strangersgate.com>> Hrm. Conceptually, I think you actually want something like: CREATE OR REPLACE FUNCTION public.reduce_dim(anyarray) RETURNS SETOF anyarray LANGUAGE plpgsql

Re: [GENERAL] unnest on multi-dimensional arrays

2013-12-02 Thread Zev Benjamin
reduce_dim(array[array[1, 2], array[2, 3]]); reduce_dim {1,2} {2,3} (2 rows) Regards Pavel Stehule 2013/11/28 Zev Benjamin mailto:zev-pg...@strangersgate.com>> It appears that unnest, when called on a multi-dimensional array, effectively flattens the array first. For e

Re: [GENERAL] unnest on multi-dimensional arrays

2013-12-02 Thread Zev Benjamin
Thanks for the explanation and examples! Zev On 11/28/2013 10:03 AM, Tom Lane wrote: David Johnston writes: Zev Benjamin wrote It appears that unnest, when called on a multi-dimensional array, effectively flattens the array first. For example: ... Multidimensional arrays do have

[GENERAL] unnest on multi-dimensional arrays

2013-11-30 Thread Zev Benjamin
It appears that unnest, when called on a multi-dimensional array, effectively flattens the array first. For example: => select * from unnest(array[array[1, 2], array[2, 3]]); unnest 1 2 2 3 (4 rows) while I would have expect something like the following: => s

[GENERAL] unnest on multi-dimensional arrays

2013-11-27 Thread Zev Benjamin
It appears that unnest, when called on a multi-dimensional array, effectively flattens the array first. For example: => select * from unnest(array[array[1, 2], array[2, 3]]); unnest 1 2 2 3 (4 rows) while I would have expect something like the following: => s

Re: [GENERAL] Tuning 9.3 for 32 GB RAM

2013-11-14 Thread Zev Benjamin
On 11/14/2013 10:09 AM, Alexander Farber wrote: pgtune has produced the following for my server (the specs: http://www.hetzner.de/en/hosting/produkte_rootserver/px60ssd ): default_statistics_target = 50 maintenance_work_mem = 1GB constraint_exclusion = on checkpoint_completion_target = 0.9 effec

Re: [GENERAL] Full text search on partial URLs

2013-11-06 Thread Zev Benjamin
On 11/06/2013 02:04 PM, bricklen wrote: On Wed, Nov 6, 2013 at 10:53 AM, Zev Benjamin mailto:zev-pg...@strangersgate.com>> wrote: On 11/06/2013 01:47 PM, bricklen wrote: On Wed, Nov 6, 2013 at 10:45 AM, Zev Benjamin mailto:zev-pg...@strangersga

Re: [GENERAL] Full text search on partial URLs

2013-11-06 Thread Zev Benjamin
On 11/06/2013 01:47 PM, bricklen wrote: On Wed, Nov 6, 2013 at 10:45 AM, Zev Benjamin mailto:zev-pg...@strangersgate.com>> wrote: Hi, I have Postgres full text search set up for my application and it's been working great! However, my users would like their searches to

[GENERAL] Full text search on partial URLs

2013-11-06 Thread Zev Benjamin
Hi, I have Postgres full text search set up for my application and it's been working great! However, my users would like their searches to turn up parts of URLs. For example, they would like a search for "foobar" to turn up a document that contains the string "http://example.com/foobar/blah