Re: [GENERAL] SELECT FOR UPDATE

2001-08-31 Thread Cody
> It seems to me that SELECT ... FOR UPDATE is not the way to go if > it is possible that the selected record may be held for any length > of time. But transactions are supposed to occur very quickly. > For instance, say you are storing web pages in the database, and you > want a number of devel

Re: [GENERAL] SELECT FOR UPDATE

2001-08-31 Thread Cody
I just finished reading Bruce M's book, so this thread confuses me, esp. Jan's posts. I take full heed of the need for application level user/thread management, but I was interested in using a parallel set-up in PG (however redundant that might be). Now that Jan has discounted "SELECT...FOR UPDA

[GENERAL] lc_collate issue

2007-08-24 Thread Cody Pisto
in the middle? It does not matter if you use LOWER or UPPER, and the "problem" does not occur on databases with encoding SQL_ASCII and lc_collate of C I have tested this on Postgres 8.1.9, 8.2, 8.2.4 with database encoding of UTF8 and lc_collate of en_US.UTF8 and on 7.4.16

Re: [GENERAL] lc_collate issue

2007-08-24 Thread Cody Pisto
rows) And I bet oracle, firebird, sqlite, mssql, and everything else out there that does utf8 would return it in the "right" order (I'm willing to test that too if needed..) If this is potentially a problem in postgres somewhere, point me in the general direction and I&

Re: [GENERAL] lc_collate issue

2007-08-24 Thread Cody Pisto
now for me ORDER BY LOWER(ASCII(column)), LOWER(column) (or some variation there of) works, but is there a better workaround? Thanks, -Cody Tom Lane wrote: Cody Pisto <[EMAIL PROTECTED]> writes: If this is potentially a problem in postgres somewhere, point me in the general directio

[GENERAL] Ambiguous order by?

2013-05-22 Thread Cody Cutrer
name FROM users ORDER BY sortable_name. The application code always appends sortable_name to the select list because, depending on available features, sortable_name might be a function call and in a GROUP BY. Thanks for any insight, Cody Cutrer

Re: [GENERAL] Ambiguous order by?

2013-05-22 Thread Cody Cutrer
Okay, so why does wrapping the order by in a function fix it? (or not doing a join, or doing an implicit join) Cody Cutrer On Wed, May 22, 2013 at 11:36 AM, Tom Lane wrote: > Cody Cutrer writes: > > create table test1 (id integer, sortable_name varchar); > > create table te

[GENERAL] Change server encoding after the fact

2011-09-30 Thread Cody Caughlan
db Are these the correct steps to perform or is there an easier / in-place way? Also, when I dump my old DB and restore it, will it be converted appropriately (e.g. it came from am SQL_ASCII encoding and its going into a UTF-8 database)? Thank you /Cody -- Sent via pgsql-general mailing list

Re: [GENERAL] Change server encoding after the fact

2011-09-30 Thread Cody Caughlan
Thanks Scott. See below: On Fri, Sep 30, 2011 at 11:05 AM, Scott Marlowe wrote: > On Fri, Sep 30, 2011 at 11:25 AM, Cody Caughlan wrote: > > I would like to change my server_encoding which is currently SQL_ASCII to > UTF8. > > > > I have existing data that I would like

Re: [GENERAL] Change server encoding after the fact

2011-09-30 Thread Cody Caughlan
Please see below. On Fri, Sep 30, 2011 at 11:38 AM, Scott Marlowe wrote: > On Fri, Sep 30, 2011 at 12:26 PM, Cody Caughlan wrote: > > Thanks Scott. See below: > > > > On Fri, Sep 30, 2011 at 11:05 AM, Scott Marlowe > > > wrote: > >> > >> On Fri,

Re: [GENERAL] Change server encoding after the fact

2011-09-30 Thread Cody Caughlan
On Fri, Sep 30, 2011 at 12:31 PM, Scott Marlowe wrote: > On Fri, Sep 30, 2011 at 12:46 PM, Cody Caughlan wrote: > > Please see below. > > > > On Fri, Sep 30, 2011 at 11:38 AM, Scott Marlowe > > > wrote: > >> > >> On Fri, Sep 30, 2011 at 12:26 PM,

Re: [GENERAL] Change server encoding after the fact

2011-09-30 Thread Cody Caughlan
Its a Rails app and I do have: encoding: utf8 Set in my DB configuration. On Fri, Sep 30, 2011 at 12:38 PM, Scott Marlowe wrote: > On Fri, Sep 30, 2011 at 1:35 PM, Cody Caughlan wrote: > > > > > > On Fri, Sep 30, 2011 at 12:31 PM, Scott Marlowe > > > wrote:

Re: [GENERAL] Change server encoding after the fact

2011-09-30 Thread Cody Caughlan
mand just ignorant? On Fri, Sep 30, 2011 at 12:41 PM, Scott Marlowe wrote: > On Fri, Sep 30, 2011 at 1:39 PM, Cody Caughlan wrote: > > Its a Rails app and I do have: > > encoding: utf8 > > > Hmmm, if you try this does it work (mostly)? > > iconv -f utf-8 -t utf-8 -c < infile > outfile >

Re: [GENERAL] Change server encoding after the fact

2011-09-30 Thread Cody Caughlan
Please see below. On Fri, Sep 30, 2011 at 1:12 PM, Scott Marlowe wrote: > On Fri, Sep 30, 2011 at 1:45 PM, Cody Caughlan wrote: > > That worked, but "file" shows no difference: > > $ iconv -f utf-8 -t utf-8 -c foo.sql > utf.sql > > $ file -i foo.sql > &g

Re: [GENERAL] Searching for "bare" letters

2011-10-01 Thread Cody Caughlan
o for "ü" -> "u", "é" => "e", etc. This is easily done in Solr via the included ASCIIFoldingFilterFactory: http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ASCIIFoldingFilterFactory You could look at the code to see how they do the co

Re: [GENERAL] Change server encoding after the fact

2011-10-01 Thread Cody Caughlan
Thanks y'all for your help on this. I took this opportunity to upgrade to 9.1.1 which is UTF8 by default and I ended up manually cleaning up the borked data by hand (there wasn't that much). So all is well now. Thanks again. /Cody On Fri, Sep 30, 2011 at 3:37 PM, Scott Marlowe wr

[GENERAL] Initing a new replica

2012-06-26 Thread Cody Cutrer
ad on the new master. Thanks for any help, Cody Cutrer -- 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] Initing a new replica

2012-06-26 Thread Cody Cutrer
the bulk of the I/O to the non-participating replica, while still doing the "critical" parts of the backup against the master. Cody Cutrer On Tue, Jun 26, 2012 at 10:04 PM, Cody Cutrer wrote: > I've got a few questions about initing a new replica. We have a > modestly la

[GENERAL] pg_restore: [custom archiver] unexpected end of file on Postgres 9.1.1

2011-11-07 Thread Cody Caughlan
ences exist, but none of the data or indexes & constraints. Any help would be appreciated. /Cody Caughlan

Re: [GENERAL] pg_restore: [custom archiver] unexpected end of file on Postgres 9.1.1

2011-11-08 Thread Cody Caughlan
e above parameters would help. From the docs it sounds that increasing "vacuum_defer_cleanup_age" to some larger value might also do the trick. Any guidance would be appreciated. /Cody On Mon, Nov 7, 2011 at 4:11 PM, Adrian Klaver wrote: > On Monday, November 07, 2011 11:27:05 am C

[GENERAL] Insufficient privilege when initiating backup

2011-11-09 Thread Cody Caughlan
- batch | Create DB | {}| postgres | Superuser, Create role, Create DB, Replication | {}| replicator | Replication +| {}| | 2 connections | | Any help would be appreciated. /Cody

[GENERAL] Large values for duration of COMMITs and slow queries. Due to large WAL config values?

2011-11-11 Thread Cody Caughlan
Postgres 9.1.1, master with 2 slaves via streaming replication. I've enabled slow query logging of 150ms and am seeing a large number of slow COMMITs: 2011-11-12 06:55:02 UTC pid:30897 (28/0-0) LOG:  duration: 232.398 ms statement: COMMIT 2011-11-12 06:55:08 UTC pid:30896 (27/0-0) LOG:  duration:

[GENERAL] Re: Large values for duration of COMMITs and slow queries. Due to large WAL config values?

2011-11-12 Thread Cody Caughlan
I've run VACUUM ANALYZE on all my tables to make sure the house has been cleaned. I still see a lot of slow queries / commits, even on primary key lookups and well indexed tables. /Cody On Fri, Nov 11, 2011 at 11:04 PM, Cody Caughlan wrote: > Postgres 9.1.1, master with 2 slaves via s

[GENERAL] Index on System Table

2012-03-20 Thread Cody Cutrer
o test by copying it to a temporary table and adding the index there). My question is if there is a way to create the index on the system table somehow for just my database, and if not how would the developer community react to the suggestion of adding an index to a system table in the default pos

[GENERAL] Indexes on System Table

2012-03-20 Thread Cody Cutrer
o test by copying it to a temporary table and adding the index there). My question is if there is a way to create the index on the system table somehow for just my database, and if not how would the developer community react to the suggestion of adding an index to a system table in the default pos

Re: [GENERAL] Index on System Table

2012-03-21 Thread Cody Cutrer
e_is_visible (rel oid) cost 50;" the query planner is now avoiding that function, and doing other filtering first. The queries are all a few seconds now, but not multiple minutes. Cody Cutrer On Tue, Mar 20, 2012 at 6:06 PM, Tom Lane wrote: > Cody Cutrer writes: >> I've got a

Re: [GENERAL] Index on System Table

2012-03-21 Thread Cody Cutrer
That's awesome, thanks! Yeah, I doubt I'll do that to our production database, but maybe I'll try it on a copy sometime down the line. Adjusting the cost for pg_table_is_visible is working well enough so far. Cody Cutrer On Wed, Mar 21, 2012 at 12:17 PM, Tom Lane wrote: > C