Re: [GENERAL] CPU load high

2007-08-23 Thread Patrick
even show more information which might come in handy. Good Luck, Patrick Lindeman > Hello. > > I have a web-server with php 5.2 connected to postgres 8.0 backend. Most > of the queries the users are doing are SELECTs (100-150 in a second for > 100 concurrent users), with a 5-10 IN

[GENERAL] tsearch2 in postgresql 8.3.1 - invalid byte sequence for encoding "UTF8": 0xc3

2008-03-18 Thread patrick
hi, i have an issue with tseach2, i just installed postgresql 8.3.1 on windows using UTF8 server encoding / client encoding and LOCALE Canada / French. CREATE DATABASE mydbWITH OWNER = me ENCODING = 'UTF8'; CREATE TABLE product ( product_id SERIAL NOT NULL, name VAR

Re: [GENERAL] tsearch2 in postgresql 8.3.1 - invalid byte sequence for encoding "UTF8": 0xc3

2008-03-19 Thread patrick
Can you identify which row(s) are causing this problem? If we have the value that's causing this, someone can reproduce it. i have only 1 row: 46; "the product name"; "the description"; i don't see any specials chars or accents. knowing that some of my clients are french, should i use LATIN9 a

Re: [GENERAL] tsearch2 in postgresql 8.3.1 - invalid byte sequence for encoding "UTF8": 0xc3

2008-03-19 Thread patrick
SELECT 'abc'::text || 'def'::text; it's working fine (no need to convert the query ASCII to UTF8 or such i am using pgadmin (1.8.2) to pass the query: show client_encoding = UNICODE. in postgresql.conf i have: client_encoding; Value = UTF8, Current value = UNICODE; i tried to restart postgresql

[GENERAL] recover from base directory?

2006-04-04 Thread patrick
hi all, 1) do backup always... on cd, tape, raid. my hd just burn. there is hope for me, in lost+found there is a directory called base with multiples sub-direcotry (403274 for example). is this my database, can i recover them with thoses directory? look in the archive for recover base... no

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
hi again, my postgresql version for the base directory is: 8.0.4 now i have installed the last one, but of course if need be i can reinstall 8.0.4. thanks you! pat - Original Message - From: "patrick" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 04, 2006

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
Only part of it. Can you find the pg_clog and pg_xlog directories? [EMAIL PROTECTED] lost+found]# find . | grep pg_clog ./#3044578/pg_clog ./#3044578/pg_clog/ ./#3044578/pg_clog/0001 ./#3044578/pg_clog/0002 (3 files) [EMAIL PROTECTED] lost+found]# find . | grep pg_xlog ./#3044578/pg_xlog

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
Looks promising. If you've also got the "global" directory then you should have everything you really need. i don't have the global directory... can i do something??? pat ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
hi again, the postgresql version i was using before the crash was 8.0.4 - i still don't have the global directory. pat ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
the oid. starting postmaster is working fine, but i had to do a pg_resetxlog and now it start like normal. but the problem is when i pgsql mydb1 \d no relations founds... what can i do? pat - Original Message - From: "patrick" <[EMAIL PROTECTED]> To: Sent: Tuesday

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
with pg_resetxlog? pat - Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: "patrick" <[EMAIL PROTECTED]> Cc: Sent: Tuesday, April 04, 2006 3:58 PM Subject: Re: [GENERAL] recover from base directory? "patrick" <[EMAIL PROTEC

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
hi, just found about recovery.conf ? should i use it or in my case not having data/global doesn't help. pat ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL

Re: [GENERAL] recover from base directory?

2006-04-05 Thread patrick
last day to find a solution for me - i am on the edge. here's a resume of what i am doing. note that i don't have the global direcotry of $PGDATA. first of all reinstall a new hard-drive and installed the same version of postgresql (8.0.4) with the same configuration. now d

[GENERAL] pgfsck for 8.0.4?

2006-04-05 Thread patrick
.html patrick ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] pgfsck for 8.0.4?

2006-04-05 Thread patrick
this is what i got when trying it: ./pgfsck -D /virtual/data -s 8192 -d mydb -- Detected database format 8.0 Couldn't find relation pg_class(1259) mydb should be a text or the oid... hum... patrick ---(end of broadcast)--- TIP 5: don't

[GENERAL] Find similar records (compare tsvectors)

2015-03-02 Thread Patrick Dung
timestampattachment bytea tsv tsvector The problem is that this is very slow.Any comment? Thank and regards,Patrick

Re: [GENERAL] Find similar records (compare tsvectors)

2015-03-06 Thread Patrick Dung
Resend. How to quickly compare the similarity of two tsvector? On Monday, March 2, 2015 11:01 PM, Patrick Dung wrote: Hello, I had a database with articles or attachment stored in bytea format.I also had a trigger: it insert/update the tsv column when a record is added/updated.The

Re: [GENERAL] Find similar records (compare tsvectors)

2015-03-07 Thread Patrick Dung
Thanks. smlar is fast and quite good.I need find tuning on the search result. On Saturday, March 7, 2015 12:07 AM, Oleg Bartunov wrote: On Fri, Mar 6, 2015 at 5:05 PM, Patrick Dung wrote: > Resend. > > How to quickly compare the similarity of two tsvector? >

[GENERAL] unnesting hstore data

2015-10-31 Thread patrick keshishian
key IN ('key 2', 'key 5150', 'duck') db-> ORDER BY id,key ; id | name | key|val +--+--+---- 2 | id 2 | key 2| value 2 2 | id 2 | key 5150 | value 5150 (2 rows) Now, two questions: 1. Is there something

[GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-01 Thread Patrick Baker
Hi guys, I need a function ( PL/PGSQL ) to perform a deletion of some BLOBS... I have four tables: *- original_table1_b =* Original table, where the BLOBS are > *- table1_n_b =* Table where everything related to the BLOBS is stored > (file_id, account_id, note_id, etc) > *- table2_y_b =* Table B

Re: [GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-01 Thread Patrick Baker
> > > ​I'd suggest you setup a test environment with some unimportant data on a > non-production machine and try it yourself. > ​ > ​​ > > David J. > ​ > > > Thanks.. but if I'm asking the list that's because I'm already testing it and it's not working... ;) Patrick

Re: [GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-01 Thread Patrick Baker
> > >> > I maybe be missing it, but I see no LIMIT in the function. > > I do see OFFSET and it looks backwards to me?: > > || $1 ||' offset '|| > > https://www.postgresql.org/docs/9.5/static/sql-select.html > > LIMIT Clause > > The LIMIT clause consists of two independent sub-clauses: > > LIMIT { c

Re: [GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-02 Thread Patrick Baker
2016-06-03 2:10 GMT+12:00 David G. Johnston : > On Thu, Jun 2, 2016 at 1:04 AM, Patrick Baker > wrote: > >> >>>> It's all working, except the LIMIT... if possible can you please give >> me an example of that LIMIT in some of those queries? >> >

Re: [GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-02 Thread Patrick Baker
> > >> > > Why are you joining to table3_nb? > You do not use any fields from it. > > How do you know what data in table1_n_b to get? > I see this grabbing the same information over and over again. SELECT * INTO table3_n_b FROM ( SELECT account_id, note_id, file_id FROM (

Re: [GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-02 Thread Patrick Baker
I did: CREATE or REPLACE FUNCTION function_1_data() RETURNS INTEGER AS $$ declare row record; BEGIN -- copying the data to the backup table (not the blobs) FOR row IN EXECUTE ' SELECT t1.file_id FROM table1_n_b t1

Re: [GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-02 Thread Patrick Baker
Hi guys, - The function works... All the data is updated as expected. However, when I call the function for the second time, it touches the rows that had already been touched by the previous call - It triplicate ( LIMIT 3 ) the records. *Question:* How can I make the fun

Re: [GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-02 Thread Patrick Baker
2016-06-03 15:50 GMT+12:00 David G. Johnston : > On Thu, Jun 2, 2016 at 11:37 PM, Patrick Baker > wrote: > >> >> How can I make the function to gets the next 3 rows and not use the same >> rows that have been used before? >> > ​WHERE migrated = 0 > ​ >

Re: [GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-03 Thread Patrick Baker
> > > > -- Creating the backup table with the essential data > INSERT INTO table2 (row.note_id, row.size, row.file_id, row.full_path) > > . > > Still not seeing what the JOIN to table3 t3 gets you? > > Any way the function works. > > I changed the function to use row.note_id, row.size, etc... t

[GENERAL] Re-sync slave server

2016-06-06 Thread Patrick B
. Or just doing an incremental rsync would work? Thanks Patrick

Re: [GENERAL] Re-sync slave server

2016-06-06 Thread Patrick B
p and discover later that did not work and have to do all over again Cheers Patrick

Re: [GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-06 Thread Patrick B
e function works with account_id? *Example: select function_data_1(1112)* and then it will do all the work just for that specific account_id? If you guys please could give me the way to do that.. thanks Patrick

Re: [GENERAL] Re-sync slave server

2016-06-07 Thread Patrick B
yep.. pg_basebackup the problem is that the servers are in a different country.. and the DB is 2TB the pg_basebackup will probably fail and I'll have to do a DUMP as I've already done with another slave time ago

Re: [GENERAL] Re-sync slave server

2016-06-07 Thread Patrick B
Anyway.. will do the pg_basebackup and see how it goes... cheers guys Patrick 2016-06-08 8:41 GMT+12:00 Patrick B : > yep.. pg_basebackup the problem is that the servers are in a > different country.. and the DB is 2TB > > the pg_basebackup will probably fail and I'll hav

Re: [GENERAL] Re-sync slave server

2016-06-07 Thread Patrick B
One more question guys... Does the pg_basebackup re-write the data? or do I have to have free space? Like.. the DB is 2 TB.. do I have to have more 2TB? or it will use those 2TB that already are there? cheers

Re: [GENERAL] PL/PGSQL + inserts+updates+limit - Postgres 9.3

2016-06-07 Thread Patrick B
Thanks Adrian... it's working ;)

Re: [GENERAL] Re-sync slave server

2016-06-08 Thread Patrick B
2016-06-08 11:03 GMT+12:00 Adrian Klaver : > On 06/07/2016 03:22 PM, Patrick B wrote: > >> One more question guys... >> >> Does the pg_basebackup re-write the data? or do I have to have free space? >> >> Like.. the DB is 2 TB.. do I have to have more 2TB? or i

[GENERAL] Automate copy - Postgres 9.2

2016-06-08 Thread Patrick B
Hi guys, I need to do a file backup for each account_id. Example: COPY (SELECT * FROM backup_table WHERE id = 1112 AND status = 1) TO '/var/lib/pgsql/1112.sql'; COPY (SELECT * FROM backup_table WHERE id = 1113 AND status = 1) TO '/var/lib/pgsql/1113.sql'; COPY (SELECT * FROM backup_table WHERE

Re: [GENERAL] Automate copy - Postgres 9.2

2016-06-08 Thread Patrick B
2016-06-09 12:19 GMT+12:00 Adrian Klaver : > On 06/08/2016 04:24 PM, Patrick B wrote: > >> Hi guys, >> >> I need to do a file backup for each account_id. >> >> Example: >> >> |COPY (SELECT*FROMbackup_table WHEREid =1112ANDstatus >> =1)TO&

Re: [GENERAL] Automate copy - Postgres 9.2

2016-06-08 Thread Patrick B
2016-06-09 12:13 GMT+12:00 John R Pierce : > On 6/8/2016 4:24 PM, Patrick B wrote: > > > I need to do a file backup for each account_id. > > Example: > > COPY (SELECT * FROM backup_table WHERE id = 1112 AND status = 1) TO > '/var/lib/pgsql/1112.sql'; > &g

Re: [GENERAL] Automate copy - Postgres 9.2

2016-06-08 Thread Patrick B
2016-06-09 13:15 GMT+12:00 John R Pierce : > On 6/8/2016 5:46 PM, Patrick B wrote: > > Single id as you show, a range of numbers or an array of numbers? > > > select function(21); > > Where 21 = Number of ids > > > how do you get the specific ID's from "

Re: [GENERAL] Automate copy - Postgres 9.2

2016-06-08 Thread Patrick B
2016-06-09 13:58 GMT+12:00 John R Pierce : > On 6/8/2016 6:47 PM, Patrick B wrote: > >> >> 21 is the number of IDS that I wanna perform that COPY command >> > > that didn't answer my question. if you call your function like SELECT > myfunction(21);

[GENERAL] Question about performance - Postgres 9.5

2016-06-12 Thread Patrick B
ld be stored here... log_table Can you please guys tell me which option would be faster in your opinion, and why? I'll be using PostgreSQL 9.5 - It's for a new product in the company that I work for, and it's being builded from the beginning. Cheers Patrick

Re: [GENERAL] Question about performance - Postgres 9.5

2016-06-12 Thread Patrick B
Also... if something is changed inside the visits table (delete/insert/update), the visits_logs table will be logging the change. However, some joins between those three tables will become necessary in some point, as visits and works tables are related somehow...

Re: [GENERAL] Automate copy - Postgres 9.2

2016-06-13 Thread Patrick B
t I need is:* When calling the function, I have to specify the limit of account_ids to be copied. For example: To perform the commands in the function to 40 different account_ids: select function (40); How can I do that? I can't... Cheers Patrick

Re: [GENERAL] Automate copy - Postgres 9.2

2016-06-13 Thread Patrick B
2016-06-14 9:47 GMT+12:00 Adrian Klaver : > On 06/13/2016 02:42 PM, Patrick B wrote: > >> Hi guys, >> >> I created this function: >> >> CREATE or REPLACE FUNCTION function(account_id integer) >> >> RETURNS void AS $$ >>

Re: [GENERAL] Automate copy - Postgres 9.2

2016-06-13 Thread Patrick B
Yep... thanks Melvin.. It's working as expected now Cheers

Re: [GENERAL] Help on recovering my standby

2016-06-22 Thread Patrick B
orked nice.... Patrick

[GENERAL] pg_archivecleanup - Increase time files are deleted

2016-06-26 Thread Patrick B
Hi guys, I've got one MASTER and three SLAVES servers, running PostgreSQL 9.2. I had a problem with one of the masters, and because the wal_files aren't kept for a long time, I had to re-sync all the DB. If the wal_files were being kept longer than they are now, I wouldn't have to re-sync (pg_bas

Re: [GENERAL] pg_archivecleanup - Increase time files are deleted

2016-06-26 Thread Patrick B
> > > > >...I'd like to have the wal_files stored for 24h, and then the > pg_archivecleanup could do its job and delete the files.. > > > *You cannot do that, but you can change the wal_keep_segments >

Re: [GENERAL] pg_archivecleanup - Increase time files are deleted

2016-06-26 Thread Patrick B
Apparently I can't do that via Postgres. So I've made a bash script to do the work for me. The script will only delete the wal_files older than 24h ( -mmin +1440 ) * It has been tested and it's working. *recovery.conf:* > archive_cleanup_command = 'exec nice -n 19 ionice -c 2 -n 7 > ../archiv

[GENERAL] wal_files from slave to another slave

2016-06-26 Thread Patrick B
Hi guys, can a slave server (streaming replication) send the wal_files to another slave, instead the master? If so, that would be done by setting the archive_mode = on and also a archive_command? I'm using PostgreSQL 9.2 Thanks! Patrick

Re: [GENERAL] wal_files from slave to another slave

2016-06-26 Thread Patrick B
Sorry guys.. just found the answer on the docs: https://www.postgresql.org/docs/9.2/static/warm-standby.html#Cascading-Replication (were trying to find it for a while lol) it is indeed possible to do that!

[GENERAL] Unable to recovery due missing wal_file

2016-07-03 Thread Patrick B
ckup_label file exists? Thanks Patrick

Re: [GENERAL] Unable to recovery due missing wal_file

2016-07-03 Thread Patrick B
One more question: Could I use pg_basebackup (or another tool like RSYNC) and re-sync the data folder only with the missing data? for example... incremental? So I wouldn't need to copy 2TB again?

Re: [GENERAL] Unable to recovery due missing wal_file

2016-07-03 Thread Patrick B
Yes, I read that! However, I store the wal_files manually into three different servers. I've double checked the files! I got over 500GB of wal_files when the pg_basebackup finished, and still, wasn't enough. I'll re-do the steps but now using the STREAM option.

Re: [GENERAL] Unable to recovery due missing wal_file

2016-07-03 Thread Patrick B
I don't have it now! But I didn't know that postgres would need that file! If I knew it, I'd have checked just after pg_basebackup started

Re: [GENERAL] Unable to recovery due missing wal_file

2016-07-03 Thread Patrick B
> > >> > Not sure that would have mattered for the reasons below. > > You might want to take a look at the below: > > https://www.postgresql.org/docs/9.5/static/wal.html > > In particular: > > https://www.postgresql.org/docs/9.5/static/wal-intro.html > > Short version WAL files are essential to res

Re: [GENERAL] Unable to recovery due missing wal_file

2016-07-03 Thread Patrick B
pg_basebackup --pgdata=- --format=tar --label=bkp_server --progress --host=localhost --port=5432 --username=replicator --xlog-method=stream Is that right? Once is finished, just need to restart postgres and set the recovery.conf.restored.command? Cheers

Re: [GENERAL] Unable to recovery due missing wal_file

2016-07-03 Thread Patrick B
*slave_new:* server that needs a new copy of the DB *slave01:* streaming replication slave *My steps are:* *1.* ssh slave_new *2.* Stop postgres *3.* rm -rf /var/lib/pgsql/9.2/data/* *4.* ssh postgres@slave01 'pg_basebackup --pgdata=- --format=tar --label=slave_new --progress --host=localhost --p

[GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
slave02? So it would be on slave01 archive_mode = ok archive_command = wal_level = hot_standby max_wal_senders = 2 wal_keep_segments = 128 Is that right? Cheers guys! Patrick

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
Thanks! Someone from another list told me that wouldn't be possible on the 9.2 version, that's why I asked even that I read that doc... cheers

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
Yep.. thanks for the help!

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
> > > > On Thu, 7 Jul 2016, 9:20 a.m. Patrick B, wrote: > >> Hi guys, >> >> I got two slaves using Postgresql 9.2. >> >> slave01 - Streaming replication from master >> slave02 - nothing.. new server >> >> is it possible to get sla

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
ok.. cool... cheers mate! Patrick

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
> > > > a slave doesn't generate wal_files at all. > > if your master is keeping a wal_archive, slaves, including cascaded > streaming slaves, can all use that same archive as their wal source, these > are only used for catchup when streaming is interrupted. > > > so.. is or isn't possible a slave

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
ok... I'll archive the wal_files locally on slave01, and then send them to slave02 every 10 minutes, for example. This will be done by rsync or something else. I'll have still the problem with timeline, and slave02 won't be able to become a master in the future. Is that right?

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
The slave02 server will be a copy of the DB into Amazon. There will be a migration to Amazon in the future, and the company's managers want a copy of the current DB there to test and do all the stuffs they need (migrating to 9.5, too). slave01 is already working as a streaming replication server.

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
2016-07-07 14:55 GMT+12:00 Sameer Kumar : > > > On Thu, 7 Jul 2016, 10:32 a.m. Patrick B, > wrote: > >> The slave02 server will be a copy of the DB into Amazon. There will be a >> migration to Amazon in the future, and the company's managers want a copy >>

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Patrick B
2016-07-07 15:19 GMT+12:00 Sameer Kumar : > > > On Thu, Jul 7, 2016 at 11:02 AM Patrick B > wrote: > >> 2016-07-07 14:55 GMT+12:00 Sameer Kumar : >> >>> >>> >>> On Thu, 7 Jul 2016, 10:32 a.m. Patrick B, >>> wrote: >>> >

[GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
er. The trigger_file line on recovery.conf on the slave server is commented, so should be ok here right? The slave will be still a slave once master is down.... Thanks! Patrick

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
thanks guys.. thanks for all the comments... I'm not shipping the wal_files into master, I actually ship them into slave and another backup server as well. So I'll have to change my archive_command then :) Thanks!

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
archive_command = 'cp %p /var/lib/pgsql/archive/%f' That would be ok right guys? I will also setup wal_keep_segments to 512

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
2016-07-11 12:18 GMT+12:00 Adrian Klaver : > On 07/10/2016 04:28 PM, Patrick B wrote: > >> archive_command = 'cp %p /var/lib/pgsql/archive/%f' >> > > This would be where? > master server > > And does the corresponding restore_command point to

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
If the master server can't send the wal_files through the slaves, shouldn't the wal_files be in "background" waiting to be delivered? Otherwise what's the purpose of them? If a network fails I'd loose those files?

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
oh ok.. got it.. wal_keep_segments = To prevent the primary server from removing the WAL segments required for the standby server before shipping them, set the minimum number of segments retained in the pg_xlog directory so it would be ok just by increasing that parameter, right? Once the serve

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
2016-07-11 15:48 GMT+12:00 John R Pierce : > On 7/10/2016 4:28 PM, Patrick B wrote: > >> >> archive_command = 'cp %p /var/lib/pgsql/archive/%f' >> >> >> That would be ok right guys? >> >> > > normally, you want to ship your WAL archi

[GENERAL] Tracking IO Queries

2016-07-13 Thread Patrick B
ement? I'm using Postgres 9.2. Thanks Patrick

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-15 Thread Patrick B
Hi guys, I'm setting up a new slave server, using Postgres 9.2. This new slave server I'll call: New_slave. I ran this command, from the new_slave server. It will connects to my other slave and copy the DB. ssh postgres@slave05 'pg_basebackup --pgdata=- --format=tar > --label=new_slave --progres

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-15 Thread Patrick B
sorry... wrong email. Will create a new topic.

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-15 Thread Patrick B
Hi guys,* (I'm sending this email here because it has the same subject, wal_files)* I'm setting up a new slave server, using Postgres 9.2. This new slave server I'll call: New_slave. I ran this command, from the new_slave server. It will connects to my other slave and copy the DB. ssh postgres@s

[GENERAL] Reset stats - Pg 9.2

2016-07-17 Thread Patrick B
Hi all, > > > select stats_reset from pg_stat_database; It says the statistics were reseted back in 2014. I want to reset it now (production database), to get more clear data. select pg_stat_reset(); Should be ok? Those stats aren't used for Query plan, right? Thanks Patrick

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-27 Thread Patrick B
We can't use the pg_upgrade in our 3TB database just does not work.. that's the main reason we're still using 9.2.

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-27 Thread Patrick B
> > I think it's safe to say that that has absolutely nothing to do > with the size being 3TB. They symptoms you report are a little > thin to diagnose the actual cause. might be... we're using SATA disks... and that's a big problem. But still.. the size of the DB is indeed a problem.

[GENERAL] pg_archivecleanup standalone bash script

2016-07-31 Thread Patrick B
specify restartfilename > Try "pg_archivecleanup --help" for more information. > archive_cleanup_command "exec nice -n 19 ionice -c 2 -n 7 > ../../bin/pg_archivecleaup_mv.bash -d "../archive" "%r"": return code 512 And I can't figure out what is wrong Please, do you guys can help? Cheers; Patrick

Re: [GENERAL] pg_archivecleanup standalone bash script

2016-07-31 Thread Patrick B
This has been resolved. cheers

[GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Patrick B
But when looking for the process: ps fax/ps aux ... it doesn't show postgres. Also, the logs aren't being created. the pg_log folder is empty. It's my first time using Ubuntu I've done a pg_basebackup from my master and I'm trying to start this slave server. Do you guys know what should be going on? Cheers Patrick

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Patrick B
2016-08-03 8:13 GMT+12:00 Adrian Klaver : > On 08/02/2016 01:04 PM, Patrick B wrote: > >> Hi guys, >> >> I've installed potgres on a Ubuntu machine. >> > > Postgres version? > have a look on the subjec of this email (9.2) > > Ubuntu versio

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Patrick B
So, I found a log file on /var/log/postgres/ DETAIL: "max_stack_depth" must not exceed 7680kB. > HINT: Increase the platform's stack depth limit via "ulimit -s" or local > equivalent. > 2016-08-02 19:54:06.293 UTC|12960|FATAL: configuration file > "/etc/postgresql/9.2/main/postgresql.conf" cont

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Patrick B
> > > Short version: > > That probably should be postgresql not postgres > > Long version: > > https://help.ubuntu.com/community/PostgreSQL > > >> > Yep.. my mistake.. /etc/init.d/postgresql start/stop/restart

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Patrick B
th) and it started to work. Now, the server is restoring the wal_files and it's all good restored log file "000214AB0063" from archive Thanks Patrick

Re: [GENERAL] pg_archivecleanup standalone bash script

2016-08-02 Thread Patrick B
I'll ajust the script and once is done will share here with u guys Patrick

[GENERAL] Question about wal files / pg_xlogs

2016-08-03 Thread Patrick B
ut if that goes down, I'll need the wal_files up to date to recover the database. How can I see what's going on? What would be the steps? any tips? Cheers Patrick.

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-03 Thread Patrick B
> > >> > Both machines have same timezone? > Yes! Shouldn't be showing 2 hours before.. I just checked and both server has the same date / timezone > > How fast are you generating WALs? > Check below please checkpoint_segments = 64 > checkpoint_timeout = 5min > checkpoint_completion_target =

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Patrick B
ing replication and all of them are working fine... also, my backup server has never failed... so no networking issues. Thanks, Patrick

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Patrick B
> > >> > https://www.postgresql.org/docs/9.5/static/continuous-archiv > ing.html#BACKUP-ARCHIVING-WAL > > "However, archive_command can be changed with a configuration file reload." > > Cheers... I removed the IONICE command from the archive_command. However, did not see any difference. Any ide

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Patrick B
> > >> > Just out of curiostity, are the slaves in the same physical location, or > by some chance are they on a remote site? > > > two of them in the same physical location, and the other two different country.

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Patrick B
> > > And the time difference is on ALL slaves, or just the two in a different > country? > > > All of them! :(

Re: [GENERAL] Tunning Server 9.1.

2016-08-04 Thread Patrick B
@John R Pirce, on a 128GB ram system, I would probably have shared_buffers up around 4-8GB. I'm using shared_buffer = 52GB in a 128GB RAM server :O

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-05 Thread Patrick B
Hi guys, I can now confirm that by taking off the IONICE command solved my problem. Thanks a lot ! Patrick

Re: [GENERAL] pg_archivecleanup standalone bash script

2016-08-07 Thread Patrick B
IR}) cd $ARCHIVEDIRexec "/usr/pgsql-9.2/bin/pg_archivecleanup" -d /var/lib/pgsql/archive ${LAST_BACKUP} | find $ARCHIVEDIR -type f -mmin +30 -delete 2016-08-03 8:32 GMT+12:00 Patrick B : > I'll ajust the script and once is done will share here with u guys > > > Patrick >

  1   2   3   4   5   6   >