Re: [GENERAL] Bucardo syncrun

2017-10-26 Thread Greg Sabino Mullane
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 general is bett

Re: [GENERAL] Is pgbouncer still maintained?

2017-10-15 Thread Greg Sabino Mullane
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 -BEGIN P

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

2017-03-24 Thread Greg Sabino Mullane
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.users' - -- Greg Sabino Mullane g...@turnstep.com E

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] 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
* from %I order 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...@turnstep.com En

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-27 Thread Greg Sabino Mullane
hat 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 201607272220 http://biglum

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

2016-07-19 Thread Greg Sabino Mullane
://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=2529DF6AB8F79407E94445B4BC9B90

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

2016-05-27 Thread Greg Sabino Mullane
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 -BEGI

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

2016-05-24 Thread Greg Sabino Mullane
here 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
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 great solution. :) I'm hoping I am overlooking something obvious. -- Greg Sabino Mullane g...@endpoint.com End P

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

2016-01-22 Thread Greg Sabino Mullane
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: 0x1

Re: [GENERAL] CoC [Final]

2016-01-18 Thread Greg Sabino Mullane
r efforts 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 =awgH ---

Re: [GENERAL] WIP: CoC

2016-01-11 Thread Greg Sabino Mullane
ed? 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...@turnstep.com

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=2529DF6AB8F79407E94445B4BC9B906714964AC8 -

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

2015-07-27 Thread Greg Sabino Mullane
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 MTkAoIGWD0UYPURhC+2WHU

Re: [GENERAL] database-level lockdown

2015-07-05 Thread Greg Sabino Mullane
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 easiest. - -- Greg Sabino Mullane g

Re: [GENERAL] PostgreSQL HA config recommendations

2015-04-30 Thread Greg Sabino Mullane
, 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.endpoint.com/ PGP Key

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

2015-03-03 Thread Greg Sabino Mullane
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://biglumber.com/x/web?pk

Re: [GENERAL] Performance on DISABLE TRIGGER

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

Re: [GENERAL] Sync production DB with development?

2014-10-08 Thread Greg Sabino Mullane
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 Mullane g

Re: [GENERAL] pgbouncer setup in the architecture

2014-08-24 Thread Greg Sabino Mullane
. - -- 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/9EACgkQvJuQZxSWSshKuwCgqALKLyNMPNtzygiibvFEMX4i

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

2014-04-18 Thread Greg Sabino Mullane
.) - -- 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- iEYEAREDAAYFAlNRdVkACgkQvJuQZxSWSsiuRwCg1Xi3r8eS1bdKmkfpRvQiKY2j

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

2014-04-17 Thread Greg Sabino Mullane
. - -- 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- iEYEAREDAAYFAlNQAe8ACgkQvJuQZxSWSshObwCglozBhwT4ddf7XacITKlucaou 7iEAoOXyK

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

2014-04-02 Thread Greg Sabino Mullane
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=2529DF6AB8F79407E94445B4BC9B906714964AC8

Re: [GENERAL] Better Connection Statistics

2014-02-08 Thread Greg Sabino Mullane
. - -- 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+jkIYojwc23O4jwLGYxqZ8H tJgAn3/K7lK

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

2013-12-10 Thread Greg Sabino Mullane
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- iEYEAREDAAYFAlKnHmAACgkQvJuQZxSWSsiD9QCdFzrd

Re: [GENERAL] Replication Postgre Oracle

2013-08-26 Thread Greg Sabino Mullane
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- iEYEAREDAAYFAlIcB6AACgkQvJuQZxSWSshF

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

2013-05-14 Thread Greg Sabino Mullane
(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 - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation

Re: [GENERAL] session_replication_role `replica` behavior

2013-04-25 Thread Greg Sabino Mullane
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 Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP

Re: [GENERAL] PostgreSQL Downgrades

2013-04-08 Thread Greg Sabino Mullane
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 http://biglumber.com/x/web?pk

Re: [GENERAL] pltcl and modules question

2013-03-27 Thread Greg Sabino Mullane
://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=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE

Re: [GENERAL] Updating pg_attribute to widen column

2012-11-30 Thread Greg Sabino Mullane
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.com/ PGP Key: 0x14964AC8 201211301029 http://biglumber.com/x/web?pk

Re: [GENERAL] Question about PostgreSQL logging configuration

2012-11-29 Thread Greg Sabino Mullane
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 -BEGIN PGP SIGNATURE

Re: [GENERAL] Question about PostgreSQL logging configuration

2012-11-29 Thread Greg Sabino Mullane
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 Sabino Mullane g...@turnstep.com End Point Corporation http

Re: [GENERAL] pg_listening_channels()

2012-11-29 Thread Greg Sabino Mullane
, 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 listening, set up a two-way stream of listen/notify. - -- Greg Sabino Mullane g

Re: [GENERAL] Updating pg_attribute to widen column

2012-11-29 Thread Greg Sabino Mullane
/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 -BEGIN PGP SIGNATURE

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 Sabino Mullane g

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

2012-11-21 Thread Greg Sabino Mullane
limit to 128? - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201211211525 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAlCtOYMACgkQvJuQZxSWSsjmEQCfb6GOEs7jwst1ao70L

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

2012-11-17 Thread Greg Sabino Mullane
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. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8

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

2012-10-10 Thread Greg Sabino Mullane
rate, the change causes the original query to run much, much slower. Problem on 9.2? Something wrong with our system and/or query? More information needed from me? -- Greg Sabino Mullane g...@endpoint.com End Point Corporation PGP Key: 0x14964AC8 pgpELPYaKfY4x.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
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

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

2012-10-10 Thread Greg Sabino Mullane
Yeah34 seconds versus near-instant. The first index-only scan does great, but that second one - ouch - even with no heap fetches at all! -- Greg Sabino Mullane g...@endpoint.com End Point Corporation PGP Key: 0x14964AC8 pgp7vrOJXPrmk.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
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] Securing .pgpass File?

2012-10-01 Thread Greg Sabino Mullane
, 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 -BEGIN PGP SIGNATURE

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

2012-09-13 Thread Greg Sabino Mullane
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/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE

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

2012-07-12 Thread Greg Sabino Mullane
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//AlQACgkQvJuQZxSWSsj6IACgzQJlK5Y1u1Pr3KDyR6ax3Elb

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

2012-06-20 Thread Greg Sabino Mullane
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- iEYEAREDAAYFAk/h1BQACgkQvJuQZxSWSshZ6QCfaGG1y0d76aTMKiXTU8Gy8i2G

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

2012-06-19 Thread Greg Sabino Mullane
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 http://biglumber.com/x/web?pk

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

2012-05-08 Thread Greg Sabino Mullane
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 201205081059 http://biglumber.com/x/web?pk

Re: [GENERAL] recommended schema diff tools?

2012-04-17 Thread Greg Sabino Mullane
/Check_postgres It allows you to compare the schemas of any number of databases to each other, and also compare a schema to an earlier version of itself, which can be used for things such as mailing a list of all schema changes in the last 24 hours, for example. - -- Greg Sabino Mullane g...@turnstep.com

Re: [GENERAL] Using DEFAULT as a parameter value with PQexecPrepare()

2012-04-06 Thread Greg Sabino Mullane
protection and avoid the escaping and quoting of the parameter values. One other way I should mention is that if your app knows it, it can always pass in the default value(s) directly. :) - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8

Re: [GENERAL] Using DEFAULT as a parameter value with PQexecPrepare()

2012-04-05 Thread Greg Sabino Mullane
myinsert2 AS INSERT INTO t(c1,c2,c4,c5) VALUES ($1,$2,$3,$4); - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201204052214 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAk9

Re: [GENERAL] Leaky Perl / DBIx / Postgres 9.0.1 Trio

2012-04-04 Thread Greg Sabino Mullane
you know what version of it you are running? There have been various memory leak problems fixed over the years. The latest is 2.19.2. Your first solution should be to upgrade that if needed. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key

Re: [GENERAL] Adding new and changed data

2012-04-03 Thread Greg Sabino Mullane
.* FROM temptable t1, (SELECT date,time,MAX(interval_length) AS imax FROM temptable t2 GROUP BY 1,2 ) AS t2 WHERE t1.date=t2.date AND t1.time=t2.time AND t1.interval_length=t2.imax; - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key

Re: [GENERAL] compilation info without pg_config

2012-03-26 Thread Greg Sabino Mullane
into the -devel package. Is there another way to determine that? You can use ldd on the postgres executable, e.g. $ ldd /usr/local/bin/postgres | grep gss libgssapi_krb5.so.2 = /lib/libgssapi_krb5.so.2 (0x0414d000) - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http

Re: [GENERAL] Multi master use case?

2012-01-28 Thread Greg Sabino Mullane
the latest Bucardo5 beta, as Bucardo4 will be deprecated soon: http://bucardo.org/downloads/Bucardo-4.99.3.tar.gz - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201201281026 http://biglumber.com/x/web?pk

Re: [GENERAL] Logging access to data in database table

2012-01-25 Thread Greg Sabino Mullane
(...) $sth = $dbh-prepare('INSERT into log_table...'); $sth-execute(@values); $dbh-commit(); Fetch the data as normal, and return to the user. - --- Of course, you would want to cache the $dbh and $sth bits. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP

Re: [GENERAL] any plans to support more rounding methods in sql?

2012-01-25 Thread Greg Sabino Mullane
. are not likely to be added to core. But who knows, there may be a valid use case. First thing I would do is try a wrapper to a Python or Perl function, mark it IMMUTABLE, and see just how slow it really is. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key

Re: [GENERAL] 9.1.2: Preventing connections / syncing a database

2012-01-02 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Jay Levitt spoke: Greg Sabino Mullane wrote: update pg_database set datallowconn = false where datname = 'foobar'; That's perfect - thanks. Now I can (I think) do this: pg_restore -d rails_dev_new [wait] psql template1 update

Re: [GENERAL] 9.1.2: Preventing connections / syncing a database

2012-01-01 Thread Greg Sabino Mullane
of the compressions, etc. to maximize speed. Quick ideas: try nc or tweak rsync, and on the slave: turn fsync off, boost maintenance_work_mem and checkpoint_segments, look into parallel restore. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8

Re: [GENERAL] Selective backup script

2011-11-21 Thread Greg Sabino Mullane
CONNECTION LIMIT 9218; Not as intuitive as a comment, but a lot more visible that something is different about the database. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 20211715 http://biglumber.com/x/web?pk

Re: [GENERAL] Are file system level differential/incremental backups possible?

2011-10-22 Thread Greg Sabino Mullane
, though. FWIW, Bucardo 5 has a 'flatfile' mode that will output the deletion and insert statements to get a table from an old state to a new one. Not quite what is being asked for here, but could be useful for similar things as well as for auditing. - -- Greg Sabino Mullane g...@turnstep.com

Re: [GENERAL] Has Pg 9.1.0 been released today?

2011-09-12 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 You mean I don't get my money back if I don't like it??? :-) Are you kidding? You get *twice* your money back, and you get to keep the product! - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP

[GENERAL] LISTEN filtering

2011-06-21 Thread Greg Sabino Mullane
to hear notices coming from superusers? Or perhaps an option that says I only want to hear notices coming from me (same role)? This would not affect notifications at all, but would simply act as a quick filter on incoming notices for a specific listener. - -- Greg Sabino Mullane g...@turnstep.com

Re: [GENERAL] abusing session_replication_mode

2011-06-21 Thread Greg Sabino Mullane
). - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201106211944 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAk4BLaEACgkQvJuQZxSWSsiXSwCfQt+U5vMzyiRsMsQ9OF9Myleg 6

Re: [GENERAL] LISTEN filtering

2011-06-21 Thread Greg Sabino Mullane
that neatly solved the problem. (which wasn't too much of a problem, more an idle thought). - -- Greg Sabino Mullane g...@endpoint.com g...@turnstep.com End Point Corporation 610-983-9073 PGP Key: 0x14964AC8 201106212307 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

Re: [GENERAL] determine client os

2011-06-13 Thread Greg Sabino Mullane
perl: CREATE OR REPLACE FUNCTION findos() RETURNS TEXT LANGUAGE plperl AS $$ return $^O; $$; SELECT findos(); findos - linux - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201106130831 http://biglumber.com/x/web?pk

Re: [GENERAL] Bidirectional replication

2011-05-28 Thread Greg Sabino Mullane
for even catching both writes, not to mention sorting it out, is quite small. And I would expect an application running against a MM database would be able to handle such events anyway. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8

Re: [GENERAL] Bidirectional replication

2011-05-08 Thread Greg Sabino Mullane
of ExtUtils::MakeMaker. DBD::Pg 1.49 is pretty old, but the good news is that nearly every other repo in the world has a newer version, and that it has very few dependencies if you want to install it manually. - -- Greg Sabino Mullane g...@turnstep.com PGP Key: 0x14964AC8 201105082239 http

Re: [GENERAL] Bidirectional replication

2011-05-08 Thread Greg Sabino Mullane
A or B saw them? Any client connecting to the master after client B commits would have the same problem, no? [1] The code is still hanging around somewhere, I think, mostly as an example of what not to do. Heh, I gotta look that up someday. - -- Greg Sabino Mullane g...@turnstep.com End

Re: [GENERAL] Bidirectional replication

2011-05-08 Thread Greg Sabino Mullane
at the exact same time. But certainly transactions are valid. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201105082243 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE

Re: [GENERAL] Switching Database Engines

2011-04-26 Thread Greg Sabino Mullane
with recent versions of MediaWiki, but should be enough to get you started testing. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201104261344 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE

Re: [GENERAL] Switching Database Engines

2011-04-26 Thread Greg Sabino Mullane
was a MySQL only shop for so long (and Wikimedia still uses it, and they influence a lot of the MW development). - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201104261505 http://biglumber.com/x/web?pk

[GENERAL] DBD::Pg 2.18.0 released

2011-03-30 Thread Greg Sabino Mullane
(CPAN bug #61713) [GSM] - Fix failing test when run as non-superuser [GSM] (CPAN bug #61534) -- Greg Sabino Mullane g...@endpoint.com End Point Corporation PGP Key: 0x14964AC8 pgp7dOKYW9uya.pgp Description: PGP signature

Re: [GENERAL] disable triggers using psql

2011-02-21 Thread Greg Sabino Mullane
pro-# \i dump.txt This is a database set, not a psql on, so you do not want the backslash before the set. SET session_replication_role = replica; I'd recommend adding a: SHOW session_replication_role; to the dump.txt as a sanity check. - -- Greg Sabino Mullane g...@turnstep.com End Point

Re: [GENERAL] disable triggers using psql

2011-02-18 Thread Greg Sabino Mullane
Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201102180938 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAk1ehJEACgkQvJuQZxSWSsj/5gCgjsQa+nzZz26xQ7c70Bxl5Hs3

Re: [GENERAL] disable triggers using psql

2011-02-18 Thread Greg Sabino Mullane
This shows the session_replication_role is working as it should. Double check where and how you are setting it; your foreign key problems will go away once it is set correctly. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8

Re: [GENERAL] disable triggers using psql

2011-02-18 Thread Greg Sabino Mullane
. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201102181408 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAk1ew9MACgkQvJuQZxSWSshETwCg2oEEicHhokORuQRl3sxkLkpj

Re: [GENERAL] disable triggers using psql

2011-02-17 Thread Greg Sabino Mullane
absolutely disable all triggers for you, unless you've mucked with the triggers and set them to replica. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201102171053 http://biglumber.com/x/web?pk

Re: [GENERAL] disable triggers using psql

2011-02-17 Thread Greg Sabino Mullane
the -1 argument. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201102171551 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAk1diwUACgkQvJuQZxSWSshcPgCdGuHIe4bINl

Re: [GENERAL] disable triggers using psql

2011-02-17 Thread Greg Sabino Mullane
session_replication_role = replica; SELECT 'No error:'; INSERT INTO def(b) VALUES (2); SELECT * FROM def; ROLLBACK; - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201102171745 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

Re: [GENERAL] disable triggers using psql

2011-02-17 Thread Greg Sabino Mullane
likely session_replication_role is not getting set or is getting reset somewhere. - -- Greg Sabino Mullane g...@endpoint.com g...@turnstep.com End Point Corporation 610-983-9073 PGP Key: 0x14964AC8 201102172155 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP

Re: [GENERAL] Why does my DB size differ between Production and DR? (Postgres 8.4)

2011-02-01 Thread Greg Sabino Mullane
. No, it will show all tables over the given threshhold. However, the statement the other tables must be OK is definitely not a given, as the bloat calculation used by check_postgres is a very rough one. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key

Re: [GENERAL] Cannot unsubscribe

2010-12-22 Thread Greg Sabino Mullane
on. Feel free to forward me those headers (offlist) and I'll try to get you unsubscribed. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201012221216 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP

Re: [GENERAL] Table both does not and does exist! wth?

2010-12-17 Thread Greg Sabino Mullane
see the ERROR appear before the NOTICE (as the table is created first, and then the indexes). Thus, make sure you don't have an index named xtmp_changed_ids somewhere already: \di xtmp_changed_ids - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key

Re: [GENERAL] Checking for data changes across a very large table

2010-12-10 Thread Greg Sabino Mullane
like a version control number). - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201012100942 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAk0CPLYACgkQvJuQZxSWSsi8NQCgz4

Re: [GENERAL] monitoring warm standby lag in 8.4?

2010-12-10 Thread Greg Sabino Mullane
, that's what we are using for many clients via check_postgres, and it's been very good at detecting when the replica has problems. Good enough that I've never worried about writing a different method, anyway. :) - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http

Re: [GENERAL] I want to create a read only database for a specified user.

2010-11-16 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 I now want to have this database or all tables capable of read-only. ALTER DATABASE foo SET default_transaction_read_only = true; Easy to work around, but may be good enough for your purposes. - -- Greg Sabino Mullane g...@turnstep.com End

Re: [GENERAL] querying the version of libpq

2010-10-06 Thread Greg Sabino Mullane
, not sure of your point. Is this a problem? Build-time is what we want here (determining the libpq we were built with) - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201010060816 http://biglumber.com/x/web?pk

Re: [GENERAL] queriing the version of libpq

2010-10-05 Thread Greg Sabino Mullane
if it does not provide that information. - -- Greg Sabino Mullane g...@turnstep.com PGP Key: 0x14964AC8 201010051030 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAkyrNskACgkQvJuQZxSWSsiW7wCfYge62y175Xtsk4drGbnt7UU5

Re: [GENERAL] querying the version of libpq

2010-10-05 Thread Greg Sabino Mullane
for directive fiddling. I certainly hope other drivers are doing the same, as libpq varies across major versions a good deal. - -- Greg Sabino Mullane g...@turnstep.com PGP Key: 0x14964AC8 201010051132 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE

Re: [GENERAL] querying the version of libpq

2010-10-05 Thread Greg Sabino Mullane
on older versions 2) It returns the *target* version, not the *compiled* version. In other words, it requires an existing PGconn object. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201010051212 http://biglumber.com/x/web?pk

Re: [GENERAL] querying the version of libpq

2010-10-05 Thread Greg Sabino Mullane
to --- if it's even present at all. Er...yes it will match exact...because we[1] get the location of the library files from pg_config as well. :) Handy little utility that. [1] DBD::Pg - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8

Re: [GENERAL] querying the version of libpq

2010-10-05 Thread Greg Sabino Mullane
on the machine you are actually linking against? Not sure what you mean. pg_config *drives* the compilation and linking, we don't blindly compile and simply take pg_config's word for it. pg_config --libdir and pg_config --includedir. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation

Re: [GENERAL] psql \q hang

2010-10-04 Thread Greg Sabino Mullane
there is an issue writing to the ~/.psql_history file? Try running with --no-readline and see if it still happens. Otherwise, consider using strace or lsof to see what it is doing during those 20 seconds. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key

Re: [GENERAL] private installation of postgres

2010-09-07 Thread Greg Sabino Mullane
within my own directory - disallow IP connections - set the socket directory somewhere within my own directory Yep, that should do it. I do this all the time for testing various programs. Set the socket with pg_ctl -o -k newsocketdir - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation

Re: [GENERAL] Why DBI (DBD::Pg) takes so much memory ?

2010-08-12 Thread Greg Sabino Mullane
/Pg.so libpq.so.4 = /usr/lib64/libpq.so.4 (0x2b8adedb7000) That's probably your problem. libpq.so.5 came out with Postgres 8.2, in 2006. See if you can get newer libraries, and the problem might go away. Specifically, you need the postgresql-devel package. - -- Greg Sabino Mullane g

Re: [GENERAL] Finding last checkpoint time

2010-07-23 Thread Greg Sabino Mullane
LANGUAGE (LC_MESSAGES has no effect). Specifically, LANGUAGE changes the headers of pg_controldata (but not the actual output, LC_ALL does that). Thanks for the nudge, I'll get to rewriting some code. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP

Re: [GENERAL] Finding last checkpoint time

2010-07-22 Thread Greg Sabino Mullane
greatly prefer some other way to grab the information! - -- Greg Sabino Mullane g...@turnstep.com PGP Key: 0x14964AC8 201007220933 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAkxISMwACgkQvJuQZxSWSsirbACfa3ujzyTLyzlPbG0QrDUC/0AB

  1   2   3   >