Re: [GENERAL] Major Version Upgradation from 9.4 to 9.6 in Replication Environment

2017-07-25 Thread Jov
Not sure windows,on linux,you can use pg_upgrade hardlink mode and use rsync to achieve this. See 9.6 pg_upgrade doc for detail. Jov 2017年7月26日 5:50 AM,"Amee Sankhesara - Quipment India" < amee.sankhes...@quipment.nl>写道: > [image: Quipment Logo] > > Hello, > > &g

Re: [GENERAL] FULL_PAGE_WRITES

2017-06-13 Thread Jov
what's the table and index look like? how do you test? Is it HOT update? For update table and index ,you can read this: http://www.dbrnd.com/2016/12/postgresql-increase-the-speed-of-update-query-using-hot-update-heap-only-tuple-mvcc-fill-factor-vacuum-fragmentation/ 2017年6月13日 1:06 PM,"Potukanuma

[GENERAL] wal receiver process always start after startup process recovering all WALs and need new WAL?

2015-12-15 Thread Jov
recovery_min_apply_delay is not good,because if the receiver do not fetch the wal for a long time(in these cases it must replay 3d's wal before wal receiver start),the master will delete the wal,and the standby will need be re do. Jov blog: http:amutu.com/blog <http://amutu.com/blog>

Re: [GENERAL] Postgresql 9.4 and ZFS?

2015-09-29 Thread Jov
I use pg with zfs on freebsd,it work great.I test zol 1 years ago,it will crash the os on load. Some note for pg on freebsd from my experience: 1.if you use compression,8k recordsize make the compression ratio poor.I reach 7.x with gzip using default record size(128k if I remember) while get 2.x

Re: [GENERAL] call pl/pgsql function from main pl/pgsql function

2014-09-28 Thread Jov
Plain pg function is synchronization,the main function must wait for the sub function over. I rember dblink can send asynchronous query,maybe you can wrap your sub function with dblink.but transition behavior should be careful thought. 2014年9月28日 8:25 PM于 "Mehdi Ravanbakhsh" 写道: > Hi All > > I hav

Re: [GENERAL] How can i monitor exactly what (partition) tables are accessed by a query?

2014-09-18 Thread Jov
Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2014-09-19 2:44 GMT+08:00 Robert Nix : > I'm experiencing a problem with queries apparently not using the check > constraints of my partition tables (tried constraint_exclusion =partition > and =on with same result

Re: [GENERAL] I want the stupidest possible binary export

2014-09-18 Thread Jov
psql can only input/output text string,which can not be binary content。with 9.2,you can encode bytea to base64,save to file,then use shell command to decode the file。 google “amutu.com pg bytea” can get a blog post。 with upcoming 9.4,you can change bytea to large object,then use lo_* psql cmd save

Re: [GENERAL] Linux replication to FreeBSD problem

2014-08-20 Thread Jov
I will recreate all the index with collate "C". Thanks very much! Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2014-08-20 23:36 GMT+08:00 Tom Lane : > Adrian Klaver writes: > > On 08/20/2014 07:53 AM, Jov wrote: > >> I setup a PG 9.3.5 master on CentO

[GENERAL] Linux replication to FreeBSD problem

2014-08-20 Thread Jov
d by Filter: 63481 Total runtime: 71.379 ms (5 rows) So,Is this a un-support replication method? Jov blog: http:amutu.com/blog <http://amutu.com/blog>

Re: [GENERAL] New wrapper library: QUINCE

2014-08-18 Thread Jov
A cool project! Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2014-08-19 6:43 GMT+08:00 Michael Shepanski : > Hi PostgreSQLers, > > I've released an open-source library called quince (QUeries In C++ > Expressions) that helps you access PostgreSQL from C++. I kno

[GENERAL] wired problem for a 9.1 slave:receive wal but do not replay it?

2014-08-11 Thread Jov
ve PG,and find it recover from a very old wal which is one month ago. We are now set up a new slave for the master while let the recover from this slave go. the PG version is 9.1.9,OS is CentOS 6 x86-64. Jov blog: http:amutu.com/blog <http://amutu.com/blog>

Re: [GENERAL] Could use some advice on search architecture

2014-04-19 Thread Jov
the other is named imcs. imcs is mainly a memory database,it is very fast for olap,because of multi threads parallel query plan and column storage.for billions of data,most group by like querys return within 2s. we use it for several weeks and happy for the performance. jov 在 2014-4-19 下午8:27

Re: [GENERAL] why does documentation use "END CASE" when that doesn't work

2014-02-25 Thread Jov
plpgsql case use end case,while sql case use end,they are different language jov 在 2014-2-26 上午8:32,"Susan Cassidy" 写道: > The documentation says: > > CASE search-expression > WHEN expression [, expression [ ... ]] THEN > statements > [ WHEN expression

Re: [GENERAL] stand by is starting until I do some work in the primary

2014-02-22 Thread Jov
Sure.Before the restart,I have login in the slave many times. some more info ,but I don't think related: centOS 6 ,amd64,128GB memory,24 core, pgsql-9.3.3,master and slave in the same host. this is my first instance of 9.3,I don't exprence this before on 9.0~9.2. Jov blog: http:amut

[GENERAL] stand by is starting until I do some work in the primary

2014-02-22 Thread Jov
some udf get the alived slave for client read.Now I find I'm wrong. Any comment? Jov blog: http:amutu.com/blog <http://amutu.com/blog>

Re: [GENERAL] validate synatax

2013-12-11 Thread Jov
you can use the transition. eg: begin; creat table(...); catch error if the statement not validated. rollback; jov 在 2013-12-11 上午5:43,"Peter Kroon" 写道: > Hi, > > How can I validate any query on PostgreSQL without executing the sql. > I was able with EXPLAIN to find som

Re: [GENERAL] pgadmin III query

2013-12-06 Thread Jov
use pg_dump -s can get the DDL SQL. jov 在 2013-12-6 下午6:50,"Peter Kroon" 写道: > When you click on a table in the "Object browser" you'll see in the "SQL > pane" the sql that is needed to create that table. > > Which function can I call to get that SQL? > > Best, > Peter >

Re: [GENERAL] copy 5.3000000000e+01 to bigint column error while Insert ok

2013-10-29 Thread Jov
thanks,that make sense.changing the column type from bigint to double pecision solves the problem. Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2013/10/29 John R Pierce > On 10/28/2013 11:34 PM, Jov wrote: > > when use insert command,we can insert 5.30e+01 to

[GENERAL] copy 5.3000000000e+01 to bigint column error while Insert ok

2013-10-28 Thread Jov
when use insert command,we can insert 5.30e+01 to table,but when use copy command,we get this: ERROR: invalid input syntax for integer: "'5.30e+01'" CONTEXT: COPY tdsort_metrics, line 1, column monitor_value: "'5.30e+01'" any id

Re: [GENERAL] no syntax error on limit1

2013-10-09 Thread Jov
here the limit1 is a table alias, = as limit1 jov 在 2013-10-9 下午8:27,"Willy-Bas Loos" 写道: > Hi, > > Postgres 9.1.9 gives me no syntax error on this, but all the records: > with a as (values > (1),(2),(3)) > select * > from a > limit1 > > Cheers, > &

Re: [GENERAL] Hot standby & SR - log shipping required?

2013-09-13 Thread Jov
on,the slave will replay the WAL from archives,when catch up,RS will start again. Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2013/9/14 Ray Stell > > On Sep 13, 2013, at 3:51 PM, Raymond O'Donnell wrote: > > [1] and one of the wiki > > articles [2] seem

Re: [GENERAL] replication server: LOG: invalid magic number 0000 in log file 169, segment 77, offset 4325376

2013-08-11 Thread Jov
This means the slave meet the end of the WAL when it replay the WAL files/records.The message level is "LOG",so it can be safely ignored. Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2013/8/11 ascot.m...@gmail.com > Hi, > > I found 'LOG: invalid mag

Re: [GENERAL] Enable WAL Archive in Replication server

2013-08-11 Thread Jov
a bug. Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2013/8/11 ascot.m...@gmail.com > Hi, > > I want to archive WAL log files in the replication server as well, the > postgresql.conf is added with following new lines, after restarting PG, the > /var/pgsql/data/archi

Re: [GENERAL] setting high value for wal_keep_segments

2013-08-08 Thread Jov
no problem if you have enough space. we have set it to 4096 one year ago,everything is OK. jov 在 2013-8-8 下午9:26,"AI Rumman" 写道: > Hi, > > I am going to sync slave with my master which is almost 500 G. I am not > using archive directory instead of I am using wal files for

Re: [GENERAL] Can we specify transaction level when connectting to external postgresql server via postgres_fdw

2013-07-10 Thread Jov
eb/?p=postgresql.git;a=blob;f=contrib/postgres_fdw/connection.c;h=ab098bea3af616c55cc7571936a8448b5b8b40d9;hb=f02b14f787980ac5b2f25407e5cd771e6b1a1dfc#l391> } it is hard code,so you can modify the code to add READ COMMIT level.but be carefull the code comment. Jov blog: http:amutu.com/blog &

Re: [GENERAL] backend hangs at sendto() and can't be terminated

2013-07-08 Thread Jov
n etstat show nothing about the socket of the process,so I think the TCP timeout took effect.so it is really wired. Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2013/7/8 Tom Lane > Merlin Moncure writes: > > On Mon, Jul 8, 2013 at 4:56 AM, Jov wrote: > >> m

Re: [GENERAL] backend hangs at sendto() and can't be terminated

2013-07-08 Thread Jov
my first post already try the pg_terminate_backend but failed: pg_terminate_backend return t but the backend still there. Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2013/7/8 Bill Mitchell > Hmm.. > In that case, I think that select pg_terminate_backend() might

Re: [GENERAL] backend hangs at sendto() and can't be terminated

2013-07-08 Thread Jov
we do select pg_cancel_backend(8243) several times,but the backend still hang there. Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2013/7/8 Bill Mitchell > You can do select pg_cancel_backend(8243); > > and that should terminate that process that is sending, but sti

[GENERAL] backend hangs at sendto() and can't be terminated

2013-07-08 Thread Jov
Process 8243 attached - interrupt to quit 17:02:26 sendto(10, "70804\0\0\0\f{2012070804}D\0\0\0`\0\5\0\0\0\1"..., 8152, 0, NULL, 0^C Process 8243 detached os is centos 6 x86-64,pg version is 9.1.9. the process still there,how can I help to debug the problem? Jov blog: http:amutu.com/

Re: [GENERAL] Triggers

2013-07-05 Thread Jov
the later ,in same db jov 在 2013-7-5 下午4:32,"itishree sukla" 写道: > Hello Every one, > > Is Postgresql providing triggers on DB level, schema level ( in same DB)? > > > Regards, > Itishree >

Re: [GENERAL] Can't create plpython language

2013-07-04 Thread Jov
try the postgresql official rpm package for centos 5: http://yum.postgresql.org/9.2/redhat/rhel-5-x86_64/pgdg-centos92-9.2-6.noarch.rpm or build your own from source. Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2013/7/5 Michael Paquier > On Thu, Jul 4, 2013 at 6:26 PM, gux

Re: [GENERAL] search_path for database vs user vs session

2013-05-27 Thread Jov
you can use the psql \drds command: \drds [PATRN1 [PATRN2]] list per-database role settings Jov blog: http:amutu.com/blog <http://amutu.com/blog> 2013/5/28 bricklen > > On Mon, May 27, 2013 at 12:16 PM, Moshe Jacobson wrote: > >> Oh, and I'd also like to see

Re: [GENERAL] How to check if Postgresql files are OK

2013-05-27 Thread Jov
there is a wiki page aouble corruption detection: http://wiki.postgresql.org/index.php?title=Corruption_detection but I think avoid corruption is more important and practical than try to check corruption: http://blog.ringerc.id.au/2012/10/avoiding-postgresql-database-corruption.html Jov blog

Re: [GENERAL] Human readable or full text of xlog (pg_xlog) for vs 9.2

2013-05-26 Thread Jov
the data. Is the xlog compressed in a >> standard way >> > that I can "uncompress" it or is there a simple way to convert it over. >> > >> > Thanks so much. >> > >> > Any suggestions would be very very much appreciated. >> > >> >> Have you been taking backups? Or do you have a backup you could >> restore to using PITR? >> >> -- >> Amit Langote >> > > -- Jov blog: http:amutu.com/blog <http://amutu.com/blog>

Re: [GENERAL] There are many processes created and died frequently during PostgreSQl idle

2013-05-23 Thread Jov
launcher process > postgres 22107 22101 0 09:45 ?00:00:00 postgres: stats collector > process > postgres 22108 4710 0 09:45 pts/400:00:00 ./psql > postgres 22109 22101 0 09:45 ?00:00:00 postgres: postgres > postgres [local] idle > postgres 22113 4773 0 09:46 pts/500:00:00 ./psql > postgres 22114 22101 0 09:46 ?00:00:00 postgres: postgres > postgres [local] idle > root 22187 6429 0 09:55 pts/600:00:00 grep post > [root@lex ~]# > > So I think that some process is created and then quickly died . But would > somebody can kindly say what are the purpose of those process? > How about using one worker process and keep it be alive? > -- Jov blog: http:amutu.com/blog <http://amutu.com/blog>

Re: [GENERAL] Interrupt WAL recovery

2013-05-22 Thread Jov
y.conf file only has this line : >>>>> >>>>> restore_command = 'envdir /etc/wal-e.d/env /etc/wal-e.d/wal-e >>>>> wal-fetch "%f" "%p"' >>>>> >>>>> Thanks in advance. >>>>> >>>> >>>> You can control the recovery process with recovery_target_time >>>> parameter. This parameter helps you to recover wals till to the acceptable >>>> time for you from the snapshot. >>>> >>>> http://www.postgresql.org/docs/9.2/static/recovery-target-settings.html >>>> >>>> --- >>>> Regards, >>>> Raghavendra >>>> EnterpriseDB Corporation >>>> Blog: http://raghavt.blogspot.com/ >>>> >>>> >>> >> > -- Jov blog: http:amutu.com/blog <http://amutu.com/blog>

Re: [GENERAL] Group by -- precedence question

2013-03-22 Thread Jov
jov On Mar 23, 2013 9:26 AM, "Joe Van Dyk" wrote: > > begin; > create table f (v numeric); > insert into f values (1), (0.8); > select ceil(v) as v from f group by v; > > -- sorta expected the result to be grouped by the column alias, > -- not by the in the tab

Re: [GENERAL] Group by bug?

2012-12-27 Thread Jov
2012/12/28 wd > hi, > > wd_test=# \d t1 > Table "public.t1" > Column | Type |Modifiers > +-+- > id | integer | not null default nextval('t1_id_seq'::regclass) > tag| text

[GENERAL] alter user and alter cmd do not have same functions

2012-02-28 Thread Jov
for alter user,there is a description: > ALTER USER is now an alias for ALTER ROLE. > so,people will think they are the same.but there are differences: > ALTER USER *name* SET *configuration_parameter* { TO | = } { *value* | > DEFAULT } ALTER USER *name* SET *configuration_parameter* FROM CURREN

Re: [GENERAL] Pg and compress

2011-09-26 Thread Jov
Most are bigint and one field is varchar. There is no index. 在 2011-9-27 上午3:34,"John R Pierce" 写道: > > On 09/26/11 6:59 AM, Jov wrote: >> >> >> Hi all, >> We are going to use pg as data warehouse,but after some test,we found that plain text with csv for

[GENERAL] Pg and compress

2011-09-26 Thread Jov
Hi all, We are going to use pg as data warehouse,but after some test,we found that plain text with csv format is 3 times bigger when load to pg.we use copy to load data.we try some optimize and it reduce to 2.5 times bigger.other db can avarage compress to 1/3 of the plain text.bigger data means

Re: [GENERAL] 9.0.4 run configure failed with readline enable on susu linux x86-64

2011-08-16 Thread Jov
/08/2011 5:16 PM, Jov wrote: >> but if run configure without any args,it error with: >> ... >> checking for -lreadline... no >> checking for -ledit... no >> configure: error: readline library not found >> If you have readline already installed, see config.log

[GENERAL] 9.0.4 run configure failed with readline enable on susu linux x86-64

2011-08-16 Thread Jov
./configure --prefix=/data/pgsql --with-includes=/data/readline/include --with-libraries=/data/readline/lib failed with: ... checking for the pthreads library -lpthread... yes checking whether pthreads work with --thread-safe... no checking whether pthreads work with -mt... no checking for the pth

Re: [GENERAL] how can I get back superuser back?

2011-03-11 Thread Jov
single-user mode solve my problem.thank you ,Bruce! 在 2011-3-11 下午6:35,"Bruce Momjian" 写道: > Jov wrote: >> hi pgers >> >> I use pg9.0.3 and do some mistake which cause my superuser >> non-super,is there any way I can get back the superuser privilege? the &g

[GENERAL] how can I get back superuser back?

2011-03-11 Thread Jov
hi pgers I use pg9.0.3 and do some mistake which cause my superuser non-super,is there any way I can get back the superuser privilege? the superuser is the only super in my pg server ,without it ,I will not able to create new user or new database. thank you! -- Sent via pgsql-general mailing li