Re: [GENERAL] Bucardo syncrun

2017-10-26 Thread Greg Sabino Mullane
er of rows deleted, you should also: vacuum full bucardo.syncrun; The data in that table is not critical to Bucardo running - it is mostly used for the output of "bucardo status" and for auditing of past syncs. P.S. Bucardo has its own mailing list: bucardo-gene...@bucardo.org, which in gener

Re: [GENERAL] Is pgbouncer still maintained?

2017-10-15 Thread Greg Sabino Mullane
d skills to get a new release out (myself, Andrew D., Peter E., probably others). - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201710150923 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 --

Re: [GENERAL] pg_dump not dropping event trigger

2017-07-23 Thread Greg Atkins
Tom, would you like a bug report to track this? On Sat, Jul 22, 2017 at 07:00:03PM -0400, Tom Lane wrote: > Greg Atkins writes: > > I have a DB with an event trigger, which I am dumping with > > pg_dump -Fc --no-acl --no-owner [db_name] > [dump_file] > > > In my

[GENERAL] pg_dump not dropping event trigger

2017-07-22 Thread Greg Atkins
I have a DB with an event trigger, which I am dumping with pg_dump -Fc --no-acl --no-owner [db_name] > [dump_file] In my dump file, I can't find any DROP EVENT TRIGGER statement. In src/bin/pg_dump/pg_dump.c, dumpEventTrigger() calls ArchiveEntry() with a "" argument for the dropStmt parameter.

Re: [GENERAL] Run statements before pg_dump in same transaction?

2017-03-24 Thread Greg Sabino Mullane
ical copy of the affected tables (i.e. with indexes) but just a data-only copy: create table dev.users as select * from public.users; pg_dump herokudb --schema-only | psql devdb pg_dump herokudb --data-only -T public.users | psql devdb psql devdb -c 'insert into public.users select * from dev.user

[GENERAL] Data Modeling Tools - Version specific to Postgres

2017-02-01 Thread Greg Slawek
seen Navicat advertised a few places which I was considering purchasing, and also checked out the list at the postgres wiki - https://wiki.postgresql.org/wiki/GUI_Database_Design_Tools I am curious if anyone has any experience using one Thanks, Greg

Re: [GENERAL] streaming replication protocol in Perl?

2017-01-02 Thread Greg Sabino Mullane
cool to have it > directly in Perl. Well if you end up writing something, please throw it into CPAN so we can all benefit. :) - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201701021822 http://biglumb

Re: [GENERAL] Generating sample data

2016-12-27 Thread Greg Navis
In the Ruby land there's a gem called faker <https://github.com/stympy/faker> that allows you to generate fake data. However, I'm not sure it can generate data based on a schema so a little bit of scripting my be necessary. Would this approach work for you? Yours Greg

Re: [GENERAL] pg_sample

2016-10-19 Thread Greg Sabino Mullane
d envision some workarounds, but it really depends on exactly what the OP is trying to achieve. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201610191401 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGI

Re: [GENERAL] pg_sample

2016-10-18 Thread Greg Sabino Mullane
by 1 limit %s) TO STDOUT' | psql testdb -c 'COPY %I FROM STDIN' $$, table_name, 100, table_name) from information_schema.tables where table_schema = 'public' and table_type = 'BASE TABLE'; psql> \q $ sh dump.some.rows.sh - -- Greg Sabino Mullane g...@turn

Re: [GENERAL] Privileges on public schema can't be revoked?

2016-09-06 Thread Greg Fodor
eges granted to user on an object and why, or another where you simply submit a statement to the DB and it gives you an audit trail of why that statement is permitted (EXPLAIN PRIVILEGES? :)) Thanks for the info! On Tue, Sep 6, 2016 at 11:07 AM, Tom Lane wrote: > Greg Fodor writes: >> Ap

[GENERAL] Privileges on public schema can't be revoked?

2016-09-06 Thread Greg Fodor
evoke all privileges on the public schema to, yet that user is still able to create tables in the public schema. Revokes on other schemas work as expected, it seems the public schema is treated specially. https://gist.github.com/gfodor/c360683f25f55497c8c657255fd0e0f8 Any help appreciated!

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-27 Thread Greg Sabino Mullane
. :) What really bites is the analyze afterwards. That's the part that takes too long (yes, --in-stages helps some). Would love to see progress made there. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 20160727222

Re: [GENERAL] MediaWiki + PostgreSQL is not ready for production?

2016-07-19 Thread Greg Sabino Mullane
so: https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker https://phabricator.wikimedia.org/T2384 (Postgres support tracking) - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201607191015 http://biglumber.com/x/web?pk=2529DF6AB8F79407E944

Re: [GENERAL] [pg_trgm] Making similarity(?, ?) < ? use an index

2016-06-20 Thread Greg Navis
"res = (*(int *) &tmpsml == *(int *) &nlimit || tmpsml > nlimit);" with "res = (tmpsml >= nlimit);" to fix the bug on my machine. I'm not sure whether that's the long-term fix we want to have. It's just there to help me make progress with trigrams.

Re: [GENERAL] [pg_trgm] Making similarity(?, ?) < ? use an index

2016-06-11 Thread Greg Navis
ons: 1a. Is it possible to make `gtrgm_consistent` accept `text` or `pg_trgm_match` as the second argument? 1b. What's the equivalent of `match.match` and `match.threshold` (where `match` is a `pg_trgm_match`) in C? 2. What to do with `gtrgm_distance`? Thanks for help. -- Greg Navis I help t

Re: [GENERAL] [pg_trgm] Making similarity(?, ?) < ? use an index

2016-06-09 Thread Greg Navis
FUNCTION6 gtrgm_picksplit (internal, internal), FUNCTION7 gtrgm_same (gtrgm, gtrgm, internal), STORAGE gtrgm; Should my operator class mimic the one above? -- Greg Navis I help tech companies to scale Heroku-hosted Rails apps. Fre

Re: [GENERAL] [pg_trgm] Making similarity(?, ?) < ? use an index

2016-06-08 Thread Greg Navis
Thanks for the replies. On Sat, Jun 4, 2016 at 8:48 PM, Jeff Janes wrote: > On Sat, Jun 4, 2016 at 2:50 AM, Greg Navis wrote: > > Thanks for your replies. > > > > Sorry for confusion. Instead of `similarity(lhs, rhs) >= show_limit()`, > > which of course is compl

Re: [GENERAL] [pg_trgm] Making similarity(?, ?) < ? use an index

2016-06-04 Thread Greg Navis
correct. If it is, I'd appreciate a high-level overview of what needs to be done. I can block a few hours to work on this in the upcoming weeks. Best regards -- Greg Navis I help tech companies to scale Heroku-hosted Rails apps. Free, biweekly scalability newsletter for SaaS CEOs <

Re: [GENERAL] [pg_trgm] Making similarity(?, ?) < ? use an index

2016-06-03 Thread Greg Navis
a per-query basis. I might be able to block some time to contribute. Best regards -- Greg Navis I help tech companies to scale Heroku-hosted Rails apps. Free, biweekly scalability newsletter for SaaS CEOs <http://www.gregnavis.com/newsletter/>

Re: [GENERAL] [pg_trgm] Making similarity(?, ?) < ? use an index

2016-06-03 Thread Greg Navis
te: > Hello. > > As I know 'lhs % rhs' is equivalent to 'similarity(lhs, rhs) >= > show_limit()'. > > And so your query should looks like this: > > SELECT * FROM restaurants WHERE city % 'warsw'; > > And it should use index. > &

[GENERAL] [pg_trgm] Per-query set_limit()

2016-06-03 Thread Greg Navis
rants). My question is: is there a better way? Best regards -- Greg Navis I help tech companies to scale Heroku-hosted Rails apps. Free, biweekly scalability newsletter for SaaS CEOs <http://www.gregnavis.com/newsletter/>

[GENERAL] [pg_trgm] Making similarity(?, ?) < ? use an index

2016-06-03 Thread Greg Navis
`` My question is: is it possible to make `similarity` use the index? If not, is there a way to speed up the query above? Best regards -- Greg Navis I help tech companies to scale Heroku-hosted Rails apps. Free, biweekly scalability newsletter for SaaS CEOs <http://www.gregnavis.com/newsletter/>

Re: [GENERAL] Migrate 2 DB`s - v8.3

2016-05-27 Thread Greg Sabino Mullane
then you can use pg_dump | psql for the rest. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201605272040 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

Re: [GENERAL] 9.5 regression with unwanted nested loop left join

2016-05-24 Thread Greg Sabino Mullane
f this issue pops up anywhere else. Leaning towards the latter, as I'm sure the planner *usually* does better with all options enabled. :) -- Greg Sabino Mullane g...@endpoint.com End Point Corporation PGP Key: 0x14964AC8 signature.asc Description: PGP signature

[GENERAL] 9.5 regression with unwanted nested loop left join

2016-05-24 Thread Greg Sabino Mullane
pearance of nested loop *earlier* a few days. Changing cpu_tuple_cost moves it forward a bit, but not enough to cover the actual use case (now() - 1 month). Leaving out the 'analyze' results in a much better plan, but having the tables stay unanalyzed does not seem like a

Re: [GENERAL] Let's Do the CoC Right

2016-01-22 Thread Greg Sabino Mullane
ts. I think this may indeed be one of those times that we do not attempt to "roll our own". Or at the very least, we should strive to understand how other communities arrived at their Codes and why it is working for them. - -- Greg Sabino Mullane g...@turnstep.com PGP Key

Re: [GENERAL] CoC [Final]

2016-01-18 Thread Greg Sabino Mullane
fforts in this. - -- Greg Sabino Mullane g...@turnstep.com PGP Key: 0x14964AC8 201601181316 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAladLAkACgkQvJuQZxSWSsjOZwCgqKxe5Uw9ujJIwCzWj4YHfVm9 etQAmwa1R5P8iPONXCgV9OMDiAaaTu/5 =awg

Re: [GENERAL] WIP: CoC

2016-01-11 Thread Greg Sabino Mullane
own. Needed? I know part of a code of conduct is stating the obvious, but... > 6. The CoC is not about Social Justice. Really no need for this. Defensive, and introduces a loaded term. Thanks, JD, for pushing this forward. - -- Greg Sabino Mullane g...@tur

Re: [GENERAL] Code of Conduct: Is it time?

2016-01-05 Thread Greg Sabino Mullane
this same thing recently. I disagree that it is a waste of time, but I'm happy if we get one, regardless of different people's rationales for it. - -- Greg Sabino Mullane g...@turnstep.com PGP Key: 0x14964AC8 201601051213 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B90671496

[GENERAL] tsrange format

2016-01-03 Thread Greg Jaskiewicz
Hi, Is it easily possible to supply and receive tsrange types in epoch values, or is it really all down always to string parsing? As a general rule, I pass time in the app in epoch-float values, which is then converted by the presenter/controller layer to the right format used by views, wheth

Re: [GENERAL] This utility can only upgrade to PostgreSQL version 9.4

2015-07-27 Thread Greg Sabino Mullane
uld be improved. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201507270953 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAlW2OAEACgkQvJuQZxSWSsj1CgCeKU8QO2dEHgBV6Su9D2eJmIss MT

Re: [GENERAL] database-level lockdown

2015-07-05 Thread Greg Sabino Mullane
ed, then try again. If you don't know which tables are being used, I suggest storing that somewhere your class can find it, or moving away from such a generic class. There are other solutions (e.g. forcing conflicting processes to quit and sleep a second), but the locking one seems the

Re: [GENERAL] double precision[] storage space questions

2015-06-12 Thread greg
Francisco Olarte wrote > Hi Greg: > > On Fri, Jun 12, 2015 at 4:08 PM, greg < > gregory.jevardat@ > > wrote: >> I cannot find any documentation on the space taken by a double precision >> array. And the few tests I did surprise me. >> >> Here

[GENERAL] double precision[] storage space questions

2015-06-12 Thread greg
Hi all I cannot find any documentation on the space taken by a double precision array. And the few tests I did surprise me. Here are a few tries I did to understand select pg_column_size(1.1::double precision) return 8--- as expected select pg_column_size('{}'::double precision[

Re: [GENERAL] PostgreSQL HA config recommendations

2015-04-30 Thread Greg Sabino Mullane
ased, not statement at all. It stores up a list of affected rows, then COPYs those from the source databases to the target ones. It's particularly strong when you have large delays and many updates to the same row. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.end

Re: [GENERAL] COALESCE woes

2015-04-24 Thread Greg Spiegelberg
Color me embarrassed. Must have been the lack of coffee. Thanks to all who responded! -Greg On Fri, Apr 24, 2015 at 7:09 AM, wrote: > You probably mean ts2.user_id not ts2, user_id, right? > > > > Best regards > > Holger Friedrich > > > > *From:* pgsql-gen

[GENERAL] COALESCE woes

2015-04-24 Thread Greg Spiegelberg
LEFT JOIN ts3 USING (user_id) GROUP BY 1; ERROR: COALESCE types integer and ts2 cannot be matched *LINE 3: SELECT COALESCE(ts1.user_id, ts2,user_id, ts3.user_id) AS us...* * ^* All types match from start to finish. Thanks, -Greg

Re: [GENERAL] Performance on DISABLE TRIGGER (resend)

2015-03-03 Thread Greg Sabino Mullane
better way is to use the session_replication_role feature. See: http://blog.endpoint.com/2015/01/postgres-sessionreplication-role.html - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201502271149 http://biglumbe

Re: [GENERAL] Performance on DISABLE TRIGGER

2015-02-27 Thread Greg Sabino Mullane
binK_rPgnIklP.bin Description: charset

Re: [GENERAL] [ADMIN] Active/Active clustering in postgres

2014-11-26 Thread Greg Spiegelberg
There is BDR (Bi-Directional Replication) from 2ndQuadrant available in 9.4. http://2ndquadrant.com/en/resources/bdr/ -Greg On Wed, Nov 26, 2014 at 11:09 AM, Leonardo Carneiro wrote: > It look's like you're searching for Postgres equivalent of Oracle RAC. I > don't

Re: [GENERAL] Sync production DB with development?

2014-10-08 Thread Greg Sabino Mullane
lly given the tradeoff in complexity. Still, if the majority of the time is spent moving old data from one or more tables, you could exclude those from the pg_dump with -T, then copy over some small subset of the table with a pair of COPY commands from prod to dev. - -- Greg Sabino

Re: [GENERAL] pgbouncer setup in the architecture

2014-08-24 Thread Greg Sabino Mullane
ur layout, usage pattern, network speeds, etc. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201408240939 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAlP5/9

Re: [GENERAL] Insert query hangs

2014-07-09 Thread Greg Stark
red_xacts"? If it's really corruption --which still seems a bit odd to me-- You might find a simple vacuum or vacuum freeze on the table fixes up the problem. -- greg -- 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] Insert query hangs

2014-07-09 Thread Greg Stark
and you haven't provided enough information to think that was the case. -- greg -- 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: any way for a transaction to "see" inserts done earlier in the transaction?

2014-04-18 Thread Greg Sabino Mullane
hen the postgresql.conf is created via initdb.) - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201404181453 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAlNRdVkACgkQv

Re: [GENERAL] any way for a transaction to "see" inserts done earlier in the transaction?

2014-04-17 Thread Greg Sabino Mullane
d in such a bug. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201404171231 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAlNQAe8ACgkQvJuQZxSWSshObwCglozBhwT4ddf7XacITK

Re: [GENERAL] libpq - lack of support to set the fetch size

2014-04-02 Thread Greg Sabino Mullane
e request for 10,000 rows to libpq rather than call PQgetResult 10,000 times, but we'll move ahead with implementing RowCacheSize via PQsetSingleRowMode. - -- Greg Sabino Mullane g...@turnstep.com PGP Key: 0x14964AC8 201404021428 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC

Re: [GENERAL] Better Connection Statistics

2014-02-08 Thread Greg Sabino Mullane
ce or SystemTap. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201402081451 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAlL2itEACgkQvJuQZxSWSshlIgCgo+jkIYojwc23O4jw

Re: [GENERAL] PG replication across DataCenters (section 25 in the manual)

2013-12-10 Thread Greg Sabino Mullane
ies". Bucardo and Slony are both table-based and trigger-driven. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201312100859 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE-

Re: [GENERAL] Is it advisable to pg_upgrade directly from 9.0 to 9.3?

2013-11-07 Thread Greg Burek
On Wed, Nov 6, 2013 at 4:36 AM, Leonardo Carneiro wrote: > I don't think that there will be too much trouble, as long as you follow > every changelog tip (9.0->9.1, 9.1->9.2 and 9.2->9.3) > > What if we don't follow the changelog tip? In this case, we have only the 9.0 and 9.3 binaries installed a

[GENERAL] Is it advisable to pg_upgrade directly from 9.0 to 9.3?

2013-11-06 Thread Greg Burek
major version along the way. Cheers, Greg

Re: [GENERAL] Replication Postgre > Oracle

2013-08-26 Thread Greg Sabino Mullane
o from Postgres to Oracle. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201308262157 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAlIcB6AACgkQvJuQZx

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Greg Sabino Mullane
numwords(int) > returns text > language plperlu > immutable > as ' > use Lingua::EN::Inflect qw( NUMWORDS ); > return NUMWORDS(shift); > '; > eot CREATE FUNCTION $ psql -tc 'select numwords(1234)' one thousand, two hundred and thirty-four

Re: [GENERAL] session_replication_role `replica` behavior

2013-04-25 Thread Greg Sabino Mullane
ser functions some brains, such that they will not execute when session_replication_role is set to 'local', for example. While I do think session_replication_role needs some more granularity, it's also a little hard to say more without knowing your exact requirements. - -- Greg Sabi

Re: [GENERAL] Queries seldomly take >4s while normally take <1ms?

2013-04-09 Thread Greg Williamson
, Greg W. -- 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 Downgrades

2013-04-08 Thread Greg Sabino Mullane
d if you have a dump from 9.1 or older, you can use this script to divide it up into the same sections: http://bucardo.org/wiki/Split_postgres_dump - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201304081134

Re: [GENERAL] pltcl and modules question

2013-03-27 Thread Greg Sabino Mullane
little more involved. See: http://www.postgresql.org/docs/9.2/static/plperl-under-the-hood.html - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201303271036 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906

Re: [GENERAL] Addled index

2013-03-18 Thread Greg Jaskiewicz
On 17 Mar 2013, at 04:30, Tom Lane wrote: > Oleg Alexeev writes: >> * it is varchar columns, 256 and 32 symbols length >> * encoding, collation and ctype: UTF8, en_US.utf8, en_US.utf8 >> * autovacuum, fsync off, full_page_writes = on, wal_writer_delay = 500ms, >> commit_delay = 100, commit_sibl

Re: [GENERAL] table spaces

2013-03-13 Thread Greg Jaskiewicz
On 13 Mar 2013, at 13:26, Shaun Thomas wrote: > On 03/12/2013 05:49 PM, Gregg Jaskiewicz wrote: > >> So out of 6 disks then having 4 in Raid 1+0 configuration and other >> two in mirror for WAL. That's another option then for me to test. > > That is an option, but it's not necessarily a good

Re: [GENERAL] ERROR: syntax error at or near ":"

2013-03-06 Thread Greg Williamson
Thanks for the link / explanation -- hadn't seen this use before. GW - Original Message - > From: Adrian Klaver > To: Greg Williamson > Cc: "pgsql-general@postgresql.org" > Sent: Wednesday, March 6, 2013 3:13 PM > Subject: Re: [GENERAL] ERROR: synta

Re: [GENERAL] ERROR: syntax error at or near ":"

2013-03-06 Thread Greg Williamson
syntax error at or near ":" >LINE 1: update property set value = :'content' where key = 'patricia... >                                    ^ > The colon (":") is not needed, just remove it. A pair of colons is used to indicate a cast of a value; off hand I am not coming up with

[GENERAL] Postresql database library for Dart programming language

2013-03-05 Thread Greg Lowe
Hi all, I've been working on a Dart library for querying postgresql. If you're curious, have a go and let me know how it goes. https://github.com/xxgreg/postgresql Support for Heroku is coming soon. Cheers, Greg.

Re: [GENERAL] Scalable cluster

2013-03-04 Thread Greg Jaskiewicz
On 4 Mar 2013, at 13:21, Vincent Veyron wrote: > > There is this : > > http://wiki.postgresql.org/wiki/Postgres-XC > > > [Disclaimer : I can't tell whether it's usable or not; I just know they > exist] > Well, I know of its existence too. Question is how production ready is it. And also

Re: [GENERAL] Keeping historical record changes w/ triggers - best practices?

2013-02-06 Thread Greg Donald
columns. > > Surely this has been done thousands of times. What are the thoughts > regarding best practices in PG? I handle this using middleware outside the db. Past revisions of a record (from any table I want to track) are serialized into a JSON format and stored in a single table. Postgres

[GENERAL] pgpool2 load balancing not working

2013-01-04 Thread Greg Donald
urt to think I may have to turn off auto-commit and manually commit transactions all throughout my code :( Still hoping it's a pgpool setup issue, since it's my first time setting it up and all. Thanks. -- Greg Donald -- Sent via pgsql-general mailing list (pgsql-general@postgresql.

Re: [GENERAL] SSDs - SandForce or not?

2012-12-09 Thread Greg Smith
em to be reliable for PostgreSQL. Those are expected to be significantly cheaper than the 710 models, while having the same reliability characteristics. I haven't been able to get one yet though, so I don't really know for sure how well they perform. -- Greg Smith 2ndQuadrant USg...@2

Re: [GENERAL] Database schema

2012-12-04 Thread Greg Williamson
in that one, and then create your new databases using the "WITH TEMPLATE = " option in CREATE DATABASE. So if you have need of different schemas with different databases, that would be more extensible by making new templates, onjhe3 for each type./. HTH, Greg Williamson -- Sent via p

Re: [GENERAL] Updating pg_attribute to widen column

2012-11-30 Thread Greg Sabino Mullane
RCHAR(64), it doesn't matter if an existing client sees that change or not - the data will still be stored exactly the same. You can always put a heavy lock on pg_attribute to ensure everyone sees the change. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint

Re: [GENERAL] Updating pg_attribute to widen column

2012-11-29 Thread Greg Sabino Mullane
p://blog.endpoint.com/2012/11/postgres-alter-column-problems-and.html - -- Greg Sabino Mullane g...@endpoint.com g...@turnstep.com End Point Corporation 610-983-9073 PGP Key: 0x14964AC8 201211300113 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 ---

Re: [GENERAL] pg_listening_channels()

2012-11-29 Thread Greg Sabino Mullane
this > change was not thought through completely. On the contrary, it was very well discussed and designed. Why do you even care if the anyone is listening or not? Simply remove the "check if anyone listens" step and send the NOTIFY. If you really need to know if anyone is liste

Re: [GENERAL] Question about PostgreSQL logging configuration

2012-11-29 Thread Greg Sabino Mullane
esn't. Thus, if log_duration is on and log_min_duration_statement has a positive value, all durations are logged but the query text is included only for statements exceeding the threshold. This behavior can be useful for gathering statistics in high-load installations." - -- Greg Sabin

Re: [GENERAL] Question about PostgreSQL logging configuration

2012-11-29 Thread Greg Sabino Mullane
u care about how fast sub-10ms mods ran? - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201211292253 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEG

Re: [GENERAL] pg_listening_channels()

2012-11-28 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Igor Neyman asked: [Postgres 9.2] > How (if it's even possible) can I get listening channels > for all sessions/ connections in the database? No, this is not possible. You can only see items from your own session. - -- Greg Sab

Re: [GENERAL] [BUGS] Prepared Statement Name Truncation

2012-11-21 Thread Greg Sabino Mullane
input, which warrants more than a notice IMO. Separately, what are the objections to raising the size limit to 128? - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201211211525 http://bi

Re: [GENERAL] [BUGS] Prepared Statement Name Truncation

2012-11-17 Thread Greg Sabino Mullane
ard limit and ERROR instead of truncating and NOTICE? > Both? Neither because that would break backward compatibility? My vote is WARNING and bump limit to 128 in 9.3. That's the combo most likely to make dumb applications work better while not breaking existing smart ones. - -- Gr

Re: [GENERAL] Enabling Autovacuum Postgres 9.1 (was Unexpectedly high disk space usage)

2012-11-12 Thread Greg Williamson
e tanks; when the site has issues we sometimes see table bloat but it seems to be dealt with by autovac. This is a postgres 9.1 instance w/ SSDs, lots of RAM (24 gigs) and relatively small tables (maybe a few thousands of rows in most cases, total footprint of the database is 240 megs) and being

Re: [GENERAL] Unexpectedly high disk space usage RESOLVED (Manual reindex/vacuum)

2012-11-09 Thread Greg Williamson
ase cost limit.  If you get >to something in the 5000 to 1 range, and its still not keeping up >then start bumping the thread count > Thanks for outlining a strategy on this -- useful advice. Greg Williamson -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To m

Re: [GENERAL] Unexpectedly high disk space usage

2012-11-07 Thread Greg Smith
t; 'i' AND nspname !~ '^pg_toast' AND relpages > 100 ORDER BY pg_total_relation_size(C.oid) DESC LIMIT 20; On my trivial test install that gives me just the one user table: relation | total_size ------+ public.t | 3568 kB While still showing large

Re: [GENERAL] dropdb breaks replication?

2012-10-31 Thread Greg Williamson
issues on the master with dead file handles but the replication itself is rock solid. Greg -- 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] Plug-pull testing worked, diskchecker.pl failed

2012-10-26 Thread Greg Smith
d drives still on the market I know of that pass a serious test. The other good models are direct PCI-E storage units, like the FusionIO drives. -- Greg Smith 2ndQuadrant USg...@2ndquadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com -- Sent

Re: [GENERAL] PostgreSQL training recommendations?

2012-10-16 Thread Greg Smith
material outside of the manual and distribute them to the world than to add 40 pages to the official manual. And I say that as someone who tried wandering down both paths to see which was more productive. -- Greg Smith 2ndQuadrant USg...@2ndquadrant.com Baltimore, MD PostgreSQL Train

Re: [GENERAL] Planner chooses multi-column index in 9.2 when maybe it should not

2012-10-10 Thread Greg Sabino Mullane
ce Postgres v6. (Looking back at how far Postgres has come from 6.x to 9.2 is truly awe-inspiring) -- Greg Sabino Mullane g...@endpoint.com End Point Corporation PGP Key: 0x14964AC8 pgp5oFeJLefSg.pgp Description: PGP signature

Re: [GENERAL] Planner chooses multi-column index in 9.2 when maybe it should not

2012-10-10 Thread Greg Sabino Mullane
x27;))) Heap Fetches: 0 -> Index Scan using baz_id on baz (C=0..101 R=40 W=22) (AT=0.1..0.2 R=7 L=1) Index Cond: ((o.id) = (id)) Filter: (price <> 0::numeric) Rows Removed by Filter: 3 Total runtime: 34502.670 ms Yeah34 seconds versus near-in

Re: [GENERAL] Planner chooses multi-column index in 9.2 when maybe it should not

2012-10-10 Thread Greg Sabino Mullane
and > the seqscan plan in 9.2. Thanks, I will play around with both a better test case and getting some explain analyzes (they were taking too long to run; thought I should get the email out first in case it was something obvious). -- Greg Sabino Mullane g...@endpoint.com End Point Corporation PGP Key: 0x14964AC8 pgpn2mbk5zwEr.pgp Description: PGP signature

[GENERAL] Planner chooses multi-column index in 9.2 when maybe it should not

2012-10-10 Thread Greg Sabino Mullane
rimary key on foo, and an index named index_i on foobar(status, foo). In another variation of the query, 8.3 uses foobar_pkey as well, rather than index_i, and filters that. Matter of fact, index_i is never used. At any rate, the change causes the original query to run much, much slower. Problem on

Re: [GENERAL] PostgreSQL and WMS/WFS Service

2012-10-09 Thread Greg Williamson
You might look at the GIS extension, PostGIS: <http://postgis.refractions.net/> Not sure how much yu need to do, but a company I used to work for ran a WMS service off of an earlier version of postGIS. Buena Suerte! Greg Williamson > > From: José

Re: [GENERAL] Securing .pgpass File?

2012-10-01 Thread Greg Sabino Mullane
mply not use pgpass, and find some other means to authenticate. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201210011859 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -

Re: [GENERAL] Is there a way to use "pack" in pl/perl without resorting to pl/perlu?

2012-09-13 Thread Greg Sabino Mullane
ed. Remember in general to add a /o to the end of your regex if the first part is constant to avoid unneeded recomplilation. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201209131324 http://biglumber.com/

Re: [GENERAL] PGBouncer Connection Using Perl DBI

2012-08-27 Thread Greg Williamson
Prashant -- I haven't tried this -- we don't use DBI currently -- but wouldn't it get treated as any other connection if you point the DBI connection to the pgbouncer host / port / database ? pgbouncer should redirect the query according the rules in its .ini file. HTH,

Re: [GENERAL] Bug? Prepared queries continue to use search_path from their preparation time

2012-07-12 Thread Greg Sabino Mullane
l libraries are those? - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201207121257 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAk//AlQACgkQvJuQZxSWSsj6IACgzQJlK5Y1u

Re: [GENERAL] Feature discussion: Should syntax errors abort a transaction?

2012-06-20 Thread Greg Sabino Mullane
s against our philosophy of being safe, careful, and correct. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201206200945 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEY

Re: [GENERAL] Feature discussion: Should syntax errors abort a transaction?

2012-06-19 Thread Greg Sabino Mullane
ly if you are using psql in interactive mode. In other words, we already have an elegant and lightweight approach to the described problem. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201206191146 ht

Re: [GENERAL] Run external SQL file via Perl dbh

2012-06-11 Thread Greg Williamson
Toby -- A small point: <...> >How about something like > >use File::Slurp; >use Try::Tiny; > >try { >  $dbh->being_work; $dbh-begin_work; <...> Clarification for any who might be unfamiliar with the perl tools. Greg Williamson -- Sent via pgsql

Re: [GENERAL] Partitioning Advice

2012-06-07 Thread Greg Smith
t subject at http://notemagnet.blogspot.com/2008/08/linux-write-cache-mystery.html and http://blog.2ndquadrant.com/tuning_linux_for_low_postgresq/ (note that some of the links in that second one, to the test pgbench results, are broken; http://www.highperfpostgres.com/pgbench-results/index.htm is

Re: [GENERAL] Populate Table From Two Other Tables

2012-06-05 Thread Greg Williamson
ERROR:  operator does not exist: character varying == character varying > >and provides the hint to add explicit type casts. Since the string length of >site/siteid varies I don't see how to cast both to a working type. > >  Please suggest how I can populate this table while av

Re: [GENERAL] Does Postgres compress data?

2012-05-23 Thread Greg Williamson
It may vary from version of postgres to version, but perhaps you are seeing the effects of TOAST kicking in ? Do a search in the documentation for your specific version (8.3, 9.1 etc.) HTH, Greg Williamson -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

[GENERAL] Bitrock XML Source

2012-05-21 Thread Greg Simpson
Greetings,   I am trying to get the source XML file for the PostgreSQL installer. This is the BitRock InstallBuilder XML file. Can anyone direct me to the proper place to obtain this installer file?   Thank you, Greg

Re: [GENERAL] Use LISTEN/NOTIFY between different databases

2012-05-08 Thread Greg Sabino Mullane
anything that goes cross-database is subject to lots of very careful care and handling, and I doubt adding that complexity is worth the small benefit gained. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 2012

Re: [GENERAL] trimming a column

2012-05-03 Thread Greg Williamson
The trim function needs to be told what sort of trim to do -- Following the 9.1 manual (you did not specify which version of postgres you are using) try:   UPDATE mytable SET id = trim(both ' ' from id). (untested) See <http://www.postgresql.org/docs/9.1/static/functions-s

  1   2   3   4   5   6   7   8   9   10   >