Re: [GENERAL] subselects vs WITH in views

2013-02-21 Thread Seref Arikan
Hi Merlin, So should I interpret this as: there is a potential gain from choosing subqueries over with WITHs ? On Tue, Feb 19, 2013 at 3:33 PM, Merlin Moncure wrote: > On Tue, Feb 19, 2013 at 9:22 AM, Joe Van Dyk wrote: > > On Tue, Feb 19, 2013 at 1:02 AM, Albe Laurenz > > wrote: > >> > >> J

[GENERAL] PostgreSQL Live CD for 9.2.3 released

2013-02-21 Thread Devrim GÜNDÜZ
I released fifth version of PostgreSQL live CD, which is based on PostgreSQL 9.2 and CentOS 6.3. It includes many of the PostgreSQL related packages that I build for http://yum.postgresql.org , along with PostgreSQL 9.2.3. Details are here: http://pglivecd.org http://yum.postgresql.org/livecd.ph

Re: [GENERAL] PostgreSQL Live CD for 9.2.3 released

2013-02-21 Thread Victor Yegorov
2013/2/21 Devrim GÜNDÜZ > Details are here: > > http://pglivecd.org > http://yum.postgresql.org/livecd.php > Description mentions PostgreSQL 9.1.3 all around, is this correct? -- Victor Y. Yegorov

Re: [GENERAL] PostgreSQL Live CD for 9.2.3 released

2013-02-21 Thread Devrim GÜNDÜZ
Hi, On Thu, 2013-02-21 at 12:58 +0200, Victor Yegorov wrote: > Description mentions PostgreSQL 9.1.3 all around, is this correct? Ooops, fixed. Thanks! Regards, -- Devrim GÜNDÜZ Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Cert

[GENERAL] Trigram (pg_trgm) GIN index not used

2013-02-21 Thread Ivan Voras
Hello, I have a table with the following structure: nn=> \d documents Table "public.documents" Column | Type | Modifiers ---+--+ id| integer |

Re: [GENERAL] PostgreSQL Live CD for 9.2.3 released

2013-02-21 Thread Victor Yegorov
2013/2/21 Devrim GÜNDÜZ > I released fifth version of PostgreSQL live CD, which is based > on PostgreSQL 9.2 and CentOS 6.3. It includes many of the PostgreSQL > related packages that I build for http://yum.postgresql.org , along with > PostgreSQL 9.2.3. > Devrim, image doesn't fit on a 700Mb CD

Re: [GENERAL] Trigram (pg_trgm) GIN index not used

2013-02-21 Thread Ivan Voras
On 21/02/2013 12:52, Ivan Voras wrote: > I'd like to use pg_trgm for matching substrings case-insensitively, but > it doesn't seem to use the index: As a sort-of followup, the '%' operator kind of works but takes incredibly long time, and the selectivity estimates are completely wrong: nn=> vac

Re: [GENERAL] Trigram (pg_trgm) GIN index not used

2013-02-21 Thread Merlin Moncure
On Thu, Feb 21, 2013 at 6:06 AM, Ivan Voras wrote: > On 21/02/2013 12:52, Ivan Voras wrote: > >> I'd like to use pg_trgm for matching substrings case-insensitively, but >> it doesn't seem to use the index: > > > As a sort-of followup, the '%' operator kind of works but takes > incredibly long time

Re: [GENERAL] subselects vs WITH in views

2013-02-21 Thread Merlin Moncure
On Thu, Feb 21, 2013 at 4:31 AM, Seref Arikan wrote: > Hi Merlin, > So should I interpret this as: there is a potential gain from choosing > subqueries over with WITHs ? Well, potentially, yes. WITH is a mechanic to force iterative order of evaluation on queries. This can be a good or bad thing

Re: [GENERAL] Trigram (pg_trgm) GIN index not used

2013-02-21 Thread Tom Lane
Ivan Voras writes: > I have a table with the following structure: > ... > raw_data | citext | not null > ... > "documents_raw_data_trgm" gin (raw_data gin_trgm_ops) > I'd like to use pg_trgm for matching substrings case-insensitively, but > it doesn't seem to use the index: You're ou

Re: [GENERAL] Trigram (pg_trgm) GIN index not used

2013-02-21 Thread Merlin Moncure
On Thu, Feb 21, 2013 at 9:57 AM, Tom Lane wrote: > Ivan Voras writes: >> I have a table with the following structure: >> ... >> raw_data | citext | not null >> ... >> "documents_raw_data_trgm" gin (raw_data gin_trgm_ops) > >> I'd like to use pg_trgm for matching substrings case-insens

Re: [GENERAL] Trigram (pg_trgm) GIN index not used

2013-02-21 Thread Tom Lane
Merlin Moncure writes: > On Thu, Feb 21, 2013 at 9:57 AM, Tom Lane wrote: >> I wonder whether we really need that citext-specific operator at all >> ... but in the meantime, if you need the column to be citext for some >> other reason, I'd suggest making a gin index on raw_data::text and >> then

[GENERAL] FATAL logged when starting

2013-02-21 Thread Sahagian, David
We get this FATAL pg_log entry, just after Postgres startup. (Postgres does start OK) //9.1.3 on Linux 2013-02-20 10:15:46.637 EST 50eedb22.3602 0 LOG: database system is ready to accept connections 2013-02-20 10:15:46.637 EST 50eedb22.3607 0 LOG: autovacuum launcher started 2013-02-20

Re: [GENERAL] FATAL logged when starting

2013-02-21 Thread Tom Lane
"Sahagian, David" writes: > We get this FATAL pg_log entry, just after Postgres startup. > FATAL: no pg_hba.conf entry for host "[local]", user "rsaadmin", database > "postgres", SSL off > Postgres is run under the linux user account "rsaadmin", but we don't have a > Postgres role by that na

[GENERAL] Determining last auto vacuum / analyze

2013-02-21 Thread François Beausoleil
Hi all, According to http://heatware.net/databases/how-when-postgres-tables-auto-vacuum-analyze/ (August 2010), running: select relname,last_vacuum, last_autovacuum, last_analyze, last_autoanalyze from pg_stat_user_tables; should tell me which tables have been auto vacuumed and auto analyzed.

[GENERAL] Full text and removing dashes from names

2013-02-21 Thread Asmir Mustafic
Hi everybody! I have a little problem with postgres 9.0 full text functionalities. I have a document containing this string: "marko-jennifer/mary" I have to match that document with words like "marko", "jennifer" or "mary", but i can't find a way to do it. Doing a dubug query i get: select t

[GENERAL] Need help extripating plpgsql

2013-02-21 Thread James B. Byrne
I am trying, without success, to create a PG-9.2 database without including the plpgsql extension. I have tried specifying template0 and the database is nonetheless created with plpgsql. I have deleted plpgsql from template1 and the new database is nonetheless created with plpgsql. I desire to r

[GENERAL] View to show privileges on views/tables/sequences/foreign tables

2013-02-21 Thread bricklen
A while back I was looking for a way to display object privileges quickly with a bit better readibility. The following view is what I came up with. Suggestions and improvements welcome (or comments stating that there are much easi\er ways to get the same details). (was created in a utility "admin"

Re: [GENERAL] Determining last auto vacuum / analyze

2013-02-21 Thread Jeff Janes
On Thu, Feb 21, 2013 at 8:52 AM, François Beausoleil wrote: > The application is on-line analytics with long reporting queries. 3/hour I import new data. Once a day, I rollup the raw values into summary tables and run reports on the summary values. One of the steps in each of the import and summ

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread James B. Byrne
On Thu, February 21, 2013 12:38, James B. Byrne wrote: > I am trying, without success, to create a PG-9.2 database without > including the plpgsql extension. I have tried specifying template0 > and the database is nonetheless created with plpgsql. I have deleted > plpgsql from template1 and the

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread Merlin Moncure
On Thu, Feb 21, 2013 at 11:48 AM, James B. Byrne wrote: > > On Thu, February 21, 2013 12:38, James B. Byrne wrote: >> I am trying, without success, to create a PG-9.2 database without >> including the plpgsql extension. I have tried specifying template0 >> and the database is nonetheless created

Re: [GENERAL] View to show privileges on views/tables/sequences/foreign tables

2013-02-21 Thread bricklen
On Thu, Feb 21, 2013 at 9:38 AM, bricklen wrote: > A while back I was looking for a way to display object privileges > quickly with a bit better readibility. The following view is what I > came up with. Suggestions and improvements welcome (or comments > stating that there are much easi\er ways to

[GENERAL] Database corruption event, unlockable rows, possibly bogus virtual xids? Invalid backend server xid

2013-02-21 Thread Ned Wolpert
(I originally posted this to pgsql-admin and was pointed to here instead.) Folks- I'm doing a postmortem on a corruption event we had. I have an idea on what happened, but not sure. I figure I'd share what happened and see if I'm close to right here. Event: Running 9.1.6 with hot-standby, ar

Re: [GENERAL] Full text and removing dashes from names

2013-02-21 Thread Kevin Grittner
Asmir Mustafic wrote: > I can't use language based  stemming because names  should not be > be stemmed) If you have a column that explicitly contains names, I recommend trigram similarity searching.  I have found trigram similarity much better than document-oriented full text searches, LIKE, or

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread James B. Byrne
On Thu, February 21, 2013 13:23, Merlin Moncure wrote: > On Thu, Feb 21, 2013 at 11:48 AM, James B. Byrne > wrote: >> >> On Thu, February 21, 2013 12:38, James B. Byrne wrote: >>> I am trying, without success, to create a PG-9.2 database without >>> including the plpgsql extension. I have tried

Re: [GENERAL] Database corruption event, unlockable rows, possibly bogus virtual xids? Invalid backend server xid

2013-02-21 Thread Kevin Grittner
Ned Wolpert wrote: > I'm doing a postmortem on a corruption event we had. I have an > idea on what happened, but not sure. I figure I'd share what > happened and see if I'm close to right here. > > Running 9.1.6 with hot-standby, archiving 4 months of wal files, > and even a nightly pg_dump all.

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread Adrian Klaver
On 02/21/2013 09:38 AM, James B. Byrne wrote: I am trying, without success, to create a PG-9.2 database without including the plpgsql extension. I have tried specifying template0 and the database is nonetheless created with plpgsql. I have deleted plpgsql from template1 and the new database is

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread Adrian Klaver
On 02/21/2013 12:14 PM, James B. Byrne wrote: On Thu, February 21, 2013 13:23, Merlin Moncure wrote: On Thu, Feb 21, 2013 at 11:48 AM, James B. Byrne wrote: On Thu, February 21, 2013 12:38, James B. Byrne wrote: I am trying, without success, to create a PG-9.2 database without including the

Re: [GENERAL] Database corruption event, unlockable rows, possibly bogus virtual xids? Invalid backend server xid

2013-02-21 Thread Tom Lane
Ned Wolpert writes: > Event: Running 9.1.6 with hot-standby, archiving 4 months of wal files, > and even a nightly pg_dump all. 50G database. Trying to update or delete a > row in a small (21 row, but heavily used table) would lock up completely. > Never finish. Removed all clients, restarted t

Re: [GENERAL] Database corruption event, unlockable rows, possibly bogus virtual xids? Invalid backend server xid

2013-02-21 Thread Ned Wolpert
Tom and Kevin- There were two entries in pg_prepared_xacts. In the test-bed, executing the 'ROLLBACK PREPARED' on both allowed the system to continue processing. All locks I saw in 'pg_locks' where the virtualtransaction started with the '-1/' were also gone. That was indeed the issue. More impo

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread James B. Byrne
On Thu, February 21, 2013 16:02, Adrian Klaver wrote: > On 02/21/2013 12:14 PM, James B. Byrne wrote: >> >> The current arrangement is not really satisfactory as it requires >> either separate template databases for each userid granted the >> DBCREATE role or the superuser role has to be granted

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread Adrian Klaver
On 02/21/2013 03:18 PM, James B. Byrne wrote: On Thu, February 21, 2013 16:02, Adrian Klaver wrote: On 02/21/2013 12:14 PM, James B. Byrne wrote: The current arrangement is not really satisfactory as it requires either separate template databases for each userid granted the DBCREATE role or

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread Adrian Klaver
On 02/21/2013 03:18 PM, James B. Byrne wrote: On Thu, February 21, 2013 16:02, Adrian Klaver wrote: On 02/21/2013 12:14 PM, James B. Byrne wrote: The current arrangement is not really satisfactory as it requires either separate template databases for each userid granted the DBCREATE role or

[GENERAL] confirming security.

2013-02-21 Thread Maz Mohammadi
Hello all, I've been following the instructions on http://www.postgresql.org/docs/9.1/static/ssl-tcp.html to enable SSL for postgres 9.1 which I have installed on linux. When I start the server, there is no change in the authentication. I can still login using psql for the same person. At the

Re: [GENERAL] confirming security.

2013-02-21 Thread John R Pierce
On 2/21/2013 7:55 PM, Maz Mohammadi wrote: When I start the server, there is no change in the authentication. I can still login using psql for the same person. did you disable other authentication methods in pg_hba.conf ? I would leave the LOCAL line as peer, and use ssl for HOST line