Re: [GENERAL] Increased I/O / Writes

2016-05-10 Thread Sergey Konoplev
hat much IO? Take a look at this tool: https://github.com/grayhemp/pgcookbook/blob/master/statement_statistics_collecting_and_reporting.md -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp https://github.com/grayhemp +1 (415) 867-9984, +7 (499) 346-

Re: [GENERAL] replicating many to one

2015-06-04 Thread Sergey Konoplev
that. [1] http://skytools.projects.pgfoundry.org/skytools-3.0/ [2] http://www.slony.info/ -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (499) 346-7196, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing

Re: [GENERAL] Understanding and implementing a GiST Index

2014-10-09 Thread Sergey Konoplev
if there is already a facility for it). Project code is here if anyone is interested, any help would be great. I have very little idea what I'm doing. Thanks, Connor -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (499

Re: [GENERAL] How to synchronize tables in remote (production) and local databases in case if the structure of local database's table has been modified

2014-10-08 Thread Sergey Konoplev
text; ALTER TABLE skonoplev@[local]:5432 ~=# copy t(i) from '/tmp/t.dump'; COPY 5 skonoplev@[local]:5432 ~=# select * from t; i | s ---+--- 1 | 2 | 3 | 4 | 5 | (5 rows) -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7

Re: [GENERAL] Converting char to varchar automatically

2014-10-07 Thread Sergey Konoplev
. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1

Re: [GENERAL] Converting char to varchar automatically

2014-10-07 Thread Sergey Konoplev
On Tue, Oct 7, 2014 at 10:16 AM, Tom Lane t...@sss.pgh.pa.us wrote: Sergey Konoplev gray...@gmail.com writes: BTW, where can I find a list of type1-type2 pairs that doesn't require full table lock for conversion? There aren't any. Sometimes you can skip a table rewrite, but that doesn't

Re: [GENERAL] Converting char to varchar automatically

2014-10-07 Thread Sergey Konoplev
from pg_cast, pg_type as t1, pg_type as t2 where t1.oid = castsource and t2.oid = casttarget and castmethod = 'b' order by 1, 2; -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (499) 346-7196, +7 (988) 888-1979 gray

[GENERAL] PgToolkit 1.0.2 release testing

2014-09-14 Thread Sergey Konoplev
in database adapters - Made it to process TOAST tables and indexes providing bloat information and rebuilding instructions - Set an additional protection against the incorrect result of cleaning error -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com

Re: [GENERAL] statement_timeout doesn't work

2014-07-29 Thread Sergey Konoplev
On Mon, Jul 21, 2014 at 11:32 AM, Sergey Konoplev gray...@gmail.com wrote: On Mon, Jul 21, 2014 at 10:16 AM, David G Johnston david.g.johns...@gmail.com wrote: So, If I separate the commands everything will will work as expected, correct? I would assume so. If you wait to send the DROP

Re: [GENERAL] statement_timeout doesn't work

2014-07-21 Thread Sergey Konoplev
via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (499) 346-7196, +7 (988

Re: [GENERAL] statement_timeout doesn't work

2014-07-21 Thread Sergey Konoplev
of those commands will die if they exceed the timeout specified. Thank you. I'll try it. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (499) 346-7196, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general

Re: [GENERAL] statement_timeout doesn't work

2014-07-18 Thread Sergey Konoplev
No hope here? On Tue, Jul 15, 2014 at 9:49 PM, Sergey Konoplev gray...@gmail.com wrote: Hi, PostgreSQL 9.2.7, Linux 2.6.32 Several days ago I found one of my servers out of connections, pg_stat_activity showed that everything was waiting for the DROP/ALTER INDEX transaction (see the record

[GENERAL] statement_timeout doesn't work

2014-07-15 Thread Sergey Konoplev
dblink('', 'SELECT pg_sleep(3)') AS t (t text)) \$\$; SELECT test_plpy(); EOF sleep 1 psql -XAte EOF \timing BEGIN; SET LOCAL statement_timeout TO 1000; DROP INDEX test_idx; END; EOF Any ideas why could it happen and what should I do to prevent this in future? -- Kind regards, Sergey Konoplev

Re: [GENERAL] Synonym/thesaurus dictionaries for FTS

2014-07-11 Thread Sergey Konoplev
FYI On Wed, Jul 9, 2014 at 4:58 PM, Sergey Konoplev gray...@gmail.com wrote: Are there any publicly available synonym/thesaurus dictionaries for FTS? So, I've found several worth attention open projects providing synonyms and thesaurus dictionaries. http://archive.services.openoffice.org/pub

[GENERAL] Synonym/thesaurus dictionaries for FTS

2014-07-09 Thread Sergey Konoplev
Hi, Are there any publicly available synonym/thesaurus dictionaries for FTS? Thank you. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (499) 346-7196, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general

Re: [GENERAL] Vacuuming strategy

2014-04-30 Thread Sergey Konoplev
to set scale factor and this high threshold instance wide. You can try per table settings instead if you want. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (499) 346-7196, +7 (988) 888-1979 gray...@gmail.com -- Sent

Re: [GENERAL] Vacuuming strategy

2014-04-29 Thread Sergey Konoplev
autovacuum_analyze_scale_factor = 0.05 autovacuum_vacuum_cost_delay = 5ms -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (499) 346-7196, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] WAL archiving from a standby backup strategy Postgresql 9.3

2014-04-24 Thread Sergey Konoplev
regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] WAL archiving from a standby backup strategy Postgresql 9.3

2014-04-23 Thread Sergey Konoplev
can make base backups from standbys [3]. [1] http://www.postgresql.org/docs/9.3/static/warm-standby.html#CASCADING-REPLICATION [2] http://www.postgresql.org/docs/9.3/static/app-pgreceivexlog.html [3] http://www.postgresql.org/docs/9.3/static/app-pgbasebackup.html -- Kind regards, Sergey Konoplev

[GENERAL] Re: [PERFORM] Hot standby 9.2.1 PANIC: WAL contains references to invalid pages

2014-04-19 Thread Sergey Konoplev
? AFAIK, the problem appears when hot_standby is set on, so you need to turn it off. Also, take a look at the link below: http://www.databasesoup.com/2013/12/why-you-need-to-apply-todays-update.html -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp

Re: [GENERAL] Disable an index temporarily

2014-04-19 Thread Sergey Konoplev
On Apr 19, 2014 1:53 PM, Torsten Förtsch torsten.foert...@gmx.net wrote: Hi, an index can be INVALID (pg_index.indisvalid=false). I want to temporarily disable an index so that it won't be used to access data but will still be updated. Can I simply set pg_index.indisvalid=false and later

Re: [GENERAL] streaming replication and recovery

2014-04-08 Thread Sergey Konoplev
/current/static/functions-admin.html#FUNCTIONS-RECOVERY-CONTROL [3] http://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988

Re: [GENERAL] Thousands of errors...what happened?

2014-03-24 Thread Sergey Konoplev
. It is out of file descriptors. Assuming you are on Linux, the ways to fix it (to increase the limit) are described by the link [1]. Chose one that suits you better. [1] http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/ -- Kind regards, Sergey Konoplev PostgreSQL

Re: [GENERAL] Dead rows not getting removed during vacuum

2014-03-21 Thread Sergey Konoplev
in transaction backends on your slaves? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Upgrade: 9.0.5-9.4

2014-03-21 Thread Sergey Konoplev
difference: lc_ctype cluster values do not match: old C, new en_US.UTF-8 Failure, exiting How do I remedy this? Drop your newly created 9.4 cluster dir and re-init it with C locale like this: initdb --locale=C -D ... -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http

Re: [GENERAL] Backup WAL Replication Server

2014-03-20 Thread Sergey Konoplev
, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] Dead rows not getting removed during vacuum

2014-03-20 Thread Sergey Konoplev
On Thu, Mar 20, 2014 at 5:27 AM, Granthana Biswas granth...@zedo.com wrote: Has anyone ever faced the issue of dead rows not getting removed during vacuum even if there are no open transactions/connections? What does the pg_prepared_xacts view show? -- Kind regards, Sergey Konoplev PostgreSQL

Re: [GENERAL] [BUGS] Very slow query in PostgreSQL 9.3.3

2014-03-13 Thread Sergey Konoplev
, please, show the plans. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

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

2014-02-25 Thread Sergey Konoplev
)) echo -ne \r$total_updated done ) 21 */ DROP INDEX foo_migration_tmp; ANALYZE foo; ALTER TABLE foo ALTER bar SET NOT NULL; -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray

Re: [GENERAL] Postgresql GROUP BY SIMILAR but not equal values

2014-02-06 Thread Sergey Konoplev
/index.html. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Ordering Results by a Supplied Order

2014-02-06 Thread Sergey Konoplev
://www.depesz.com/2010/07/25/how-to-order-by-some-random-query-defined-values/. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Drop all overloads of a function without knowing parameter types

2014-02-04 Thread Sergey Konoplev
, but if there are 2 or more signatures then print an error specifying all the forms of the function, eg.: ERROR: Can not drop function 'foo' because it has more then one signature: foo(integer), foo(text). I am sure It would simplify life significantly. -- Kind regards, Sergey Konoplev

Re: [GENERAL] Drop all overloads of a function without knowing parameter types

2014-02-04 Thread Sergey Konoplev
On Tue, Feb 4, 2014 at 8:35 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Sergey Konoplev escribió: On Mon, Feb 3, 2014 at 10:09 AM, Tom Lane t...@sss.pgh.pa.us wrote: People periodically ask for extensions flavored more or less like this, but I'm suspicious of building any such thing

Re: [GENERAL] Drop all overloads of a function without knowing parameter types

2014-02-04 Thread Sergey Konoplev
On Tue, Feb 4, 2014 at 8:35 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Sergey Konoplev escribió: On Mon, Feb 3, 2014 at 10:09 AM, Tom Lane t...@sss.pgh.pa.us wrote: People periodically ask for extensions flavored more or less like this, but I'm suspicious of building any such thing

[GENERAL] The timezone oddities

2014-02-04 Thread Sergey Konoplev
~ $ psql psql (9.2.4) Type help for help. postgres=# show timezone; TimeZone -- GMT (1 row) Do you have any thoughts of where else this GMT could be set from? Thank you in advance. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415

Re: [GENERAL] The timezone oddities

2014-02-04 Thread Sergey Konoplev
On Tue, Feb 4, 2014 at 11:29 AM, Adrian Klaver adrian.kla...@gmail.com wrote: On 02/04/2014 11:23 AM, Sergey Konoplev wrote: Gentoo Linux, PostgreSQL 9.2.4. I'm trying to find out why postgres uses a specific time zone that I don't expect to be used, and without any success so far

Re: [GENERAL] The timezone oddities

2014-02-04 Thread Sergey Konoplev
On Tue, Feb 4, 2014 at 12:41 PM, Adrian Klaver adrian.kla...@gmail.com wrote: On 02/04/2014 12:09 PM, Sergey Konoplev wrote: So the postgresql.conf is the one created by initdb for this particular installation? If that is the case it would seem that initdb could not determine what

[GENERAL] PgToolkit v1.0.1 release testing

2014-01-28 Thread Sergey Konoplev
rid of hard-coded connection parameters (thanks to Hubert depesz Lubaczewski) - Allowed processing of the postgres and template1 databases - Resolved the several simultaneously running instances collisions issue (thanks to Gonzalo Gil) Thank you in advance. -- Kind regards, Sergey Konoplev

Re: [GENERAL] Filtering queries by IP

2014-01-20 Thread Sergey Konoplev
='192.168.1.12' rm tmp/filtered.log if [ ! -z $SUB ]; then cat /var/log/postgresql/postgresql-$DT.log | \ perl -pe 's/(^\d{4}-\d{2}-\d{2} )/###$1/; s/\n/@@@/; s/###/\n/' | \ grep -E $SUB | perl -pe 's/@@@/\n/g' tmp/filtered.log fi -- Kind regards, Sergey Konoplev PostgreSQL Consultant

Re: [GENERAL] Looking for settings/configuration for FASTEST reindex on idle system.

2014-01-09 Thread Sergey Konoplev
cluster all your tables a similar way by several tables in parallel. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Sudden slow down and spike in system CPU causes max_connections to get exhausted

2014-01-07 Thread Sergey Konoplev
/defrag , the names might be slightly different on CentOS, like redhat_transparent_hugepage or something like this, I don't remember exactly. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979

Re: [GENERAL] help interpreting pg_stat_user_index view values

2014-01-05 Thread Sergey Konoplev
as in the previous question. Eg OFFSET 150 LIMIT 50. I am assuming an index with values like idx4 could never exist, it is an impossible result. Is that a correct assumption? Yes, this is correct one. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415

Re: [GENERAL] help interpreting pg_stat_user_index view values

2014-01-05 Thread Sergey Konoplev
On Sun, Jan 5, 2014 at 2:19 PM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: On 06/01/14 11:08, Sergey Konoplev wrote: [...] An index might be considered as useless when there were no idx scans for the significantly long period. However it might be non-trivial to define this period. Eg

Re: [GENERAL] Replication failed after stalling

2013-12-30 Thread Sergey Konoplev
conflicted with the query on the standby, perhaps with a tuple cleaned up after a HOT update. Replication will stall until the query is done. IIRC, the applying process is paused but the receiving one is going on in this case, isn't it? -- Kind regards, Sergey Konoplev PostgreSQL Consultant

Re: [GENERAL] Replication: GZIP compression in WAL sender/receiver processes communication?

2013-12-30 Thread Sergey Konoplev
with compression, a watchdog and lock management. Very useful for cross data center streaming. [1] https://github.com/grayhemp/pgcookbook/blob/master/ssh_tunnel_with_compression_setup.md -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415

Re: [GENERAL] Replication failed after stalling

2013-12-30 Thread Sergey Konoplev
On Mon, Dec 30, 2013 at 8:56 PM, Joe Van Dyk j...@tanga.com wrote: On Mon, Dec 30, 2013 at 10:27 AM, Sergey Konoplev gray...@gmail.com wrote: On Mon, Dec 30, 2013 at 12:02 AM, Joe Van Dyk j...@tanga.com wrote: On Sun, Dec 29, 2013 at 10:52 PM, Sergey Konoplev gray...@gmail.com wrote

Re: [GENERAL] Replication failed after stalling

2013-12-30 Thread Sergey Konoplev
log_checkpoints on if it is off. And also how many WAL your system generates and for what period. ls -lt /path/to/pg_xlog/ | wc -l ls -lt /path/to/pg_xlog/ | head ls -lt /path/to/pg_xlog/ | tail -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp

Re: [GENERAL] Replication failed after stalling

2013-12-29 Thread Sergey Konoplev
On Sun, Dec 29, 2013 at 9:56 PM, Joe Van Dyk j...@tanga.com wrote: On Wed, Dec 18, 2013 at 3:39 PM, Sergey Konoplev gray...@gmail.com wrote: On Wed, Dec 18, 2013 at 11:26 AM, Joe Van Dyk j...@tanga.com wrote: I'm running Postgresql 9.3. I have a streaming replication server. Someone

Re: [GENERAL] FATAL: index contains unexpected zero page at block

2013-12-26 Thread Sergey Konoplev
/static/release-9-3-2.html -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] pg_upgrade tablespaces

2013-12-19 Thread Sergey Konoplev
/ not in /usr/local/pgsql/data/drupal_dbspace/ as the pg_upgrade query tries to do. Can you show what ls -l /home/jkregloh/pg_data/data/pg_tblspc/ prints, please? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7

Re: [GENERAL] pg_upgrade tablespaces

2013-12-19 Thread Sergey Konoplev
On Thu, Dec 19, 2013 at 12:49 PM, Joseph Kregloh jkreg...@sproutloud.com wrote: On Thu, Dec 19, 2013 at 3:46 PM, Sergey Konoplev gray...@gmail.com wrote: On Thu, Dec 19, 2013 at 12:27 PM, Joseph Kregloh jkreg...@sproutloud.com wrote: So what I get from this is that it does create the correct

Re: [GENERAL] pg_upgrade tablespaces

2013-12-19 Thread Sergey Konoplev
On Thu, Dec 19, 2013 at 1:18 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Dec 19, 2013 at 01:08:18PM -0800, Sergey Konoplev wrote: On Thu, Dec 19, 2013 at 12:49 PM, Joseph Kregloh jkreg...@sproutloud.com wrote: On Thu, Dec 19, 2013 at 3:46 PM, Sergey Konoplev gray...@gmail.com wrote

Re: [GENERAL] Question(s) about crosstab

2013-12-18 Thread Sergey Konoplev
://www.cureffi.org/2013/03/19/automatically-creating-pivot-table-column-names-in-postgresql/ -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general

Re: [GENERAL] Replication failed after stalling

2013-12-18 Thread Sergey Konoplev
at 9:30 am and replication data started catching up. What do you mean by COPY on the standby halted replication? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent

Re: [GENERAL] Prefix search on all hstore values

2013-11-28 Thread Sergey Konoplev
! The idea is to de-normalize the hstore_column to an assisting table with 2 columns: original_record_id, hstore_column_value. And to create a btree index on hstore_column_value that will effectively be used in prefix search. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http

Re: [GENERAL] Prefix search on all hstore values

2013-11-28 Thread Sergey Konoplev
-- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Primary Key Index Bloat?

2013-11-18 Thread Sergey Konoplev
/static/contrib.html -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Tuning 9.3 for 32 GB RAM

2013-11-14 Thread Sergey Konoplev
/database_server_configuration.md -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Equivalent syntax of PL/SQL using array in PL/pgSQL

2013-11-14 Thread Sergey Konoplev
rec[1] := (1, 'a')::a; rec[2] := (2, 'b')::a; rec[1] := rec[1] #= (hstore('id', 3::text) || hstore('n', null)); raise info '% %', rec[1].id, rec[1].n; end $$; INFO: 3 NULL DO [1] http://www.postgresql.org/docs/9.3/static/hstore.html -- Kind regards, Sergey Konoplev PostgreSQL

Re: [GENERAL] database redesign

2013-11-08 Thread Sergey Konoplev
/bigserial types instead of integer/bigint + sequence. This will automatically create a sequence that is depended on the table. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com

Re: [GENERAL] autovaccum task got cancelled

2013-10-31 Thread Sergey Konoplev
request arrives. [1]: http://www.postgresql.org/docs/9.0/static/release-9-0-12.html -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing

Re: [GENERAL] postgres 9.0.4 configuration and performance issue

2013-10-13 Thread Sergey Konoplev
various blogs that I have read ) Hm.. looks like I missed this fact. Is it possible to install the 64bit one? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via

Re: [GENERAL] postgres 9.0.4 configuration and performance issue

2013-10-13 Thread Sergey Konoplev
will try pg_reorg. When you move your cluster to the 64bit version you need to do dump/restore, because it is the only way to migrate between architectures. In this case you don't need to use pg_reorg, as your cluster will be recreated from scratch. -- Kind regards, Sergey Konoplev PostgreSQL Consultant

Re: [GENERAL] like optimization

2013-10-12 Thread Sergey Konoplev
to set FASTUPDATE to off on the GIN index, because it might lead to unpredictable stalls (http://www.postgresql.org/docs/9.3/static/gin-implementation.html#GIN-FAST-UPDATE). -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901

Re: [GENERAL] postgres 9.0.4 configuration and performance issue

2013-10-11 Thread Sergey Konoplev
autovacuum_naptime = 5s autovacuum_vacuum_scale_factor = 0.05 autovacuum_analyze_scale_factor = 0.05 autovacuum_vacuum_cost_delay = 5ms -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com

Re: [GENERAL] Postgres replication question :- One master 2 slaves 9.0.10

2013-10-01 Thread Sergey Konoplev
is the reason not to do it streaming? BTW, you will find the SSH tunnel instructions here http://code.google.com/p/pgcookbook/wiki/Streaming_Replication_Setup -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988

Re: [GENERAL] Postgres replication question :- One master 2 slaves 9.0.10

2013-10-01 Thread Sergey Konoplev
be a good idea to set hot_standby_feedback to on and max_standby_archive_delay to something larger than 30s Doesn't replica need a connection to master for hot_standby_feedback? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7

Re: [GENERAL] Postgres replication question :- One master 2 slaves 9.0.10

2013-10-01 Thread Sergey Konoplev
0: Bad configuration option: ExitOnForwardFailure command-line: line 0: Bad configuration option: ExitOnForwardFailure It looks like your SSH version or implementation doesn't support ExitOnForwardFailure. Try to find an alternative. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA

Re: [GENERAL] ENUM drop label workaround

2013-09-27 Thread Sergey Konoplev
might need to recreate some foreign keys. We will have a lot of big tables with such fields and we couldn't afford downtime on the ALTERs and other things. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7

Re: [GENERAL] truncate/rotate pgbouncer log using .ini settings

2013-09-27 Thread Sergey Konoplev
daemon to rotate it. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

[GENERAL] ENUM drop label workaround

2013-09-26 Thread Sergey Konoplev
: ccc Are there any caveats of this solution and may be there is a better one? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list

Re: [GENERAL] Strange message from pg_receivexlog

2013-08-21 Thread Sergey Konoplev
regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

[GENERAL] Strange message from pg_receivexlog

2013-08-20 Thread Sergey Konoplev
it was? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Strange message from pg_receivexlog

2013-08-20 Thread Sergey Konoplev
NEW -m tcp -p tcp --dport 22 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited Nothing looks suspicious for me. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867

Re: [GENERAL] Performance of ORDER BY RANDOM to select random rows?

2013-08-13 Thread Sergey Konoplev
of records, it might affect things. You can try to look at pg_stats.histogram_bounds to work the issue around, however it is just my assumption, I have newer tried it. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903

Re: [GENERAL] Fastest Index/Algorithm to find similar sentences

2013-08-11 Thread Sergey Konoplev
regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] How to avoid Force Autovacuum

2013-08-09 Thread Sergey Konoplev
On Thu, Aug 8, 2013 at 10:59 PM, Vishalakshi Navaneethakrishnan nvishalak...@sirahu.com wrote: Now the problem is autovacuum.. why it was invoked and increased the load? How to avoid this? Upgrade to the latest minor version 9.2.4 first. -- Kind regards, Sergey Konoplev PostgreSQL Consultant

Re: [GENERAL] Self referencing composite datatype

2013-08-08 Thread Sergey Konoplev
On Wed, Aug 7, 2013 at 11:38 PM, Alban Hertroys haram...@gmail.com wrote: On Aug 8, 2013, at 4:11, Sergey Konoplev gray...@gmail.com wrote: create table node as ( id integer primary key, r integer, s integer, children integer[] ); and check integrity by triggers. Or, instead

Re: [GENERAL] How to avoid Force Autovacuum

2013-08-08 Thread Sergey Konoplev
where datname = 'template0'; select * from pg_stat_database where datname = 'template0'; In addition to Kevin's notes, I think it is also worth to look at the result of the query below. select name, setting from pg_settings where name ~ 'vacuum' and setting reset_val; -- Kind regards, Sergey

Re: [GENERAL] Performance of ORDER BY RANDOM to select random rows?

2013-08-08 Thread Sergey Konoplev
in the table, but in the most cases I faced it works good. I had an idea to play with pg_stats.histogram_bounds to work around the described issue, but it was never so critical for tasks I solved. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415

Re: [GENERAL] Exit code -1073741819

2013-08-07 Thread Sergey Konoplev
moment of time. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979 Skype: gray-hemp Jabber: gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] How to avoid Force Autovacuum

2013-08-07 Thread Sergey Konoplev
of autovacuum process in the result but the query filed is Empty Was autovacuum the only process that you saw in pg_stat_activity? What OS do you use? Do you use huge pages? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7

Re: [GENERAL] Pl/Python runtime overhead

2013-08-07 Thread Sergey Konoplev
, and possibly attempt to introduce a language of my own choosing. The docs I've seen so far are mostly too specific, making it a bit for hard for me to see the forest from the trees. AFAIK, this one is the best one http://www.postgresql.org/docs/9.2/interactive/plpython.html. -- Kind regards, Sergey

Re: [GENERAL] Self referencing composite datatype

2013-08-07 Thread Sergey Konoplev
create table node as ( id integer primary key, r integer, s integer, children integer[] ); and check integrity by triggers. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray

Re: [GENERAL] Self referencing composite datatype

2013-08-07 Thread Sergey Konoplev
On Wed, Aug 7, 2013 at 7:11 PM, Sergey Konoplev gray...@gmail.com wrote: so you could download 9.3rc2 and experimant with it. Sorry, 9.3beta2 of course. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7

Re: [GENERAL] How to avoid Force Autovacuum

2013-08-07 Thread Sergey Konoplev
/transparent_hugepage/enabled cat /sys/kernel/mm/transparent_hugepage/defrag -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-general mailing list

Re: [GENERAL] Exit code -1073741819

2013-08-06 Thread Sergey Konoplev
-0547 msn: carlos.rei...@opendb.com.br -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979 Skype: gray-hemp Jabber: gray...@gmail.com -- Sent via pgsql-general

Re: [GENERAL] Hierarchical numeric data type

2013-08-06 Thread Sergey Konoplev
. Feedback? Suggestions? Use integer arrays. It works just like you need select array_to_string(c, '.') from (values (array[1,10,2]), (array[1,5,3])) as sq(c) order by c; array_to_string - 1.5.3 1.10.2 and it is pretty fast when indexed. -- Kind regards, Sergey Konoplev PostgreSQL

Re: [GENERAL] Installing 9.2 on Ubuntu from packages: what is the current recommendation?

2013-08-03 Thread Sergey Konoplev
-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867

Re: [GENERAL] Fastest Index/Algorithm to find similar sentences

2013-07-29 Thread Sergey Konoplev
? -- t Or may be I understand something wrong again? Janek -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA

Re: [GENERAL] Speed up Switchover

2013-07-26 Thread Sergey Konoplev
that on following link: http://www.postgresql.org/message-id/flat/ca+tgmoy4j+p7jy69ry8gposmmdznyqu6dtionprcxavg+sp...@mail.gmail.com#ca+tgmoy4j+p7jy69ry8gposmmdznyqu6dtionprcxavg+sp...@mail.gmail.com -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com

Re: [GENERAL] Fastest Index/Algorithm to find similar sentences

2013-07-26 Thread Sergey Konoplev
On Thu, Jul 25, 2013 at 3:54 PM, Janek Sendrowski jane...@web.de wrote: The Fulltextsearch is not really suitable because it doesn't have a tolerance. What do you exactly mean by tolerance here? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com

Re: [GENERAL] Rule Question

2013-07-25 Thread Sergey Konoplev
= new.b. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979 Skype: gray-hemp Jabber: gray...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Speed up Switchover

2013-07-25 Thread Sergey Konoplev
uses the WAL to determine changed data blocks, and does not require reading through all files in the cluster. That makes it a lot faster when the database is large and only a small portion of it differs between the clusters. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile

Re: [GENERAL] unique index corruption

2013-07-24 Thread Sergey Konoplev
autovacuum might not manage with bloat, and in this case you can use this tool pgcompactor (https://code.google.com/p/pgtoolkit/) in conjunction with pgstattuple extension or pg_repack (https://github.com/reorg/pg_repack). -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile

Re: [GENERAL] Transaction control in shards through PLPROXY

2013-07-15 Thread Sergey Konoplev
performance issues - it could cause ones, mostly if somebody forget to do commit/rollback as it still holds locks. Moreover it involves application-DBs communications and persistence, so it is surely might affect performance. Warm regards, GB On Mon, Jul 15, 2013 at 10:51 AM, Sergey Konoplev

Re: [GENERAL] Transaction control in shards through PLPROXY

2013-07-14 Thread Sergey Konoplev
so that all updates on shards can be rolled back if any one among the set fails? It is called two-phase commit. You need to consult with this [1] section of documentation. [1] http://www.postgresql.org/docs/9.2/static/sql-prepare-transaction.html -- Kind regards, Sergey Konoplev PostgreSQL

Re: [GENERAL] Triggers NOT running as table owner

2013-06-27 Thread Sergey Konoplev
of their owners illegally. --strk; http://strk.keybit.net -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http

Re: [GENERAL] Get multiple columns with counts from one table.

2013-06-12 Thread Sergey Konoplev
://www.postgresql.org/docs/9.2/static/tablefunc.html#AEN144882 It is documented pretty good and has a lot of useful examples. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979

Re: [GENERAL] Really poor gist index performance with tstzrange types

2013-06-11 Thread Sergey Konoplev
rows=0 loops=1) Index Cond: (tstzrange(now(), now(), '[]'::text) duration) Total runtime: 0.098 ms (7 rows) Time: 0.801 ms -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867-9984, Russia +7 (901

  1   2   3   >