[GENERAL] How to log query's from servers ?

2011-06-06 Thread Condor
Hello ppl, any one can tell me how i make my postgresql server to log commands coming from another postgres server ? I have one postgresql and give to 2 other sql server to access my db. I want to log all query's coming only from one of the servers. Is that possibly ? -- Regards, Condor

Re: [GENERAL] How to log query's from servers ?

2011-06-06 Thread Condor
On Mon, 06 Jun 2011 18:53:57 +0800, Craig Ringer wrote: On 6/06/2011 4:14 PM, Condor wrote: Hello ppl, any one can tell me how i make my postgresql server to log commands coming from another postgres server ? I have one postgresql and give to 2 other sql server to access my db. I want to log

Re: [GENERAL] How to log query's from servers ?

2011-06-07 Thread Condor
On Tue, 07 Jun 2011 06:44:02 +0800, Craig Ringer wrote: On 06/06/2011 09:26 PM, Condor wrote: Can you explain little more how i can use database-level or user-level SET commands to set log_statement for only one of them ? http://www.postgresql.org/docs/current/static/sql-set.html http

Re: [GENERAL] perl and php connect problems to pgsql all of a sudden

2011-06-07 Thread Condor
postgresql. For perl use: perl -MCPAN -e shell and then: install DBD::Pg For perl this is happened when you update your perl version or postgresql library is missing or is not installed. -- Regards, Condor

Re: [GENERAL] insert a SYSTIMESTAMP value in postgres

2011-06-20 Thread Condor
); -- Regards, Condor

[GENERAL] Real type with zero

2011-06-29 Thread Condor
Hello, how I can tell my postgresql to store last zero of real type ? I put value 2.30 and when I select that column i see 2.3 without zero. -- Regards, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

[GENERAL] Difference in DB size with dump and pg_database_size

2011-07-05 Thread Condor
? -- Regards, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Dump large DB and restore it after all.

2011-07-05 Thread Condor
' (also without single quotes) and this was not inserted into db. I use for now gzip but I don't know how safe is that, because when I check db size uncompressed is 5G and pg_database_size show me 10 G -- Regards, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Difference in DB size with dump and pg_database_size

2011-07-05 Thread Condor
On Tue, 5 Jul 2011 10:43:38 +0200, Magnus Hagander wrote: On Tue, Jul 5, 2011 at 10:38, Condor con...@stz-bg.com wrote: Hello, any one can explain me why I have difference between db size when I dump db, I see it's 5G and when I run SELECT pg_size_pretty(pg_database_size('somedatabase

Re: [GENERAL] Dump large DB and restore it after all.

2011-07-05 Thread Condor
On Tue, 05 Jul 2011 18:08:21 +0800, Craig Ringer wrote: On 5/07/2011 5:00 PM, Condor wrote: Hello ppl, can I ask how to dump large DB ? Same as a smaller database: using pg_dump . Why are you trying to split your dumps into 1GB files? What does that gain you? Are you using some kind of old

[GENERAL] Postgresql problem with update double precision

2011-08-05 Thread Condor
can be the problem and why some times records is fine, some times isnt ? -- Regards, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Postgresql problem with update double precision

2011-08-05 Thread Condor
On Fri, 05 Aug 2011 07:20:01 -0400, Jerry Sievers wrote: Condor con...@stz-bg.com writes: Hello ppl, for few years I have problem when update double precision field. I have table and few double precision columns, here is example: sumall double precision, sumin double precision, My php script

[GENERAL] securing the sql server ?

2011-08-22 Thread Condor
Hello ppl, any one can tell me how I can secure linux server with database postgres for example ? Im thinking to make a cryptfs file system and to deploy database over the cryptfs. The problem here may will be when front end need any data for in/out cpus of the server will aways

Re: [GENERAL] securing the sql server ?

2011-08-22 Thread Condor
On Mon, 22 Aug 2011 09:32:39 -0500, Merlin Moncure wrote: On Mon, Aug 22, 2011 at 3:40 AM, Condor con...@stz-bg.com wrote: Hello ppl, any one can tell me how I can secure linux server with database postgres for example ? Im thinking to make a cryptfs file system and to deploy database over

Re: [GENERAL] securing the sql server ?

2011-08-22 Thread Condor
On Mon, 22 Aug 2011 10:54:23 -0700, John R Pierce wrote: On 08/22/11 10:34 AM, Condor wrote: I did not worry about hackers attack, I worrying how to secure data if I physical loss hard drives or server. so when this remote server reboots, where does the encryption key come from? -- john

Re: [GENERAL] securing the sql server ?

2011-08-23 Thread Condor
On Mon, 22 Aug 2011 14:20:00 -0400 (EDT), Gary Chambers wrote: so when this remote server reboots, where does the encryption key come from? Why, from a file that resides in /root on the server, of course! :-) That's secure, right? -- Gary Chambers Isn't necessary to be on the same server.

[GENERAL] COPY FROM how long should take ?

2011-08-26 Thread Condor
. Is everything normal ? Postgresql 9.0.4 -- Regards, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] COPY FROM how long should take ?

2011-08-26 Thread Condor
log file no any errors. -- Regards, Condor

[GENERAL] How to make replica and use it when master is down ?

2011-10-12 Thread Condor
, update and so on and when original master server become online to sync his db or just to stay slave / replica server until one of the servers does not going down ? Well, I don't know if this is possibly. -- Regards, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] How to make replica and use it when master is down ?

2011-10-15 Thread Condor
On 13.10.2011 22:47, Mark Keisler wrote: It is possible. See http://www.postgresql.org/docs/9.0/interactive/high-availability.html [3] On Wed, Oct 12, 2011 at 3:31 AM, Condor wrote: Hello everyone, from a few days I want to ask how to make replica server of my database and when

[GENERAL] How to add conversion between LATIN1 and WIN1251 ?

2011-11-25 Thread Condor
. With few terminals on few different databases that is pretty disgustingly. Any way how I can avoid it ? -- Regards, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to add conversion between LATIN1 and WIN1251 ?

2011-11-25 Thread Condor
On 26.11.2011 00:42, Adrian Klaver wrote: On Friday, November 25, 2011 1:19:29 am Condor wrote: Hello, early postgresql versions ( 9.1) did not show this error message: FATAL conversion between LATIN1 and WIN1251 is not supported and connect to db. I access server over the network and every

Re: [GENERAL] How to add conversion between LATIN1 and WIN1251 ?

2011-11-28 Thread Condor
On 26.11.2011 22:33, Adrian Klaver wrote: On Friday, November 25, 2011 11:28:06 pm Condor wrote: No, charset of databases is the same. I use the same ENV when I upgrade sql servers and recreate psql database directory. About client encoding, I never ever has before a configured postgresql

Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-09 Thread Condor
reason why, may be was too slow sending / receiving data from master / sleave, but this fix the problem. Regards, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Problem with reading data from standby server ?

2012-04-20 Thread Condor
to can point me how I can resolve this problem ? Regards, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Problem with reading data from standby server ?

2012-04-20 Thread Condor
On 20.04.2012 22:01, Merlin Moncure wrote: On Fri, Apr 20, 2012 at 3:39 AM, Condor con...@stz-bg.com wrote: Hello, when I read binary replication tutorial (http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial) I see on Hot Standby: Hot Standby is identical to Warm Standby, except

Re: [GENERAL] Problem with reading data from standby server ?

2012-04-21 Thread Condor
On 21.04.2012 12:59, Andres Freund wrote: On Friday, April 20, 2012 10:39:25 AM Condor wrote: array_accumulate aggregate is: CREATE AGGREGATE array_accumulate ( sfunc = array_append, basetype = anyelement, stype = anyarray, initcond = '{}' ); Btw, if you replace

[GENERAL] Vacuum does not show in pg_stat_all_tables

2012-05-15 Thread Condor
/lib/postgres/vacuum.log 21 Any one can tell me why this is happened ? Regards, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Vacuum does not show in pg_stat_all_tables

2012-05-15 Thread Condor
On 15.05.2012 14:07, Tom Lane wrote: Condor con...@stz-bg.com writes: today when I do select relname, last_autovacuum, last_vacuum from pg_stat_all_tables I see last_vacuum and autovacuum fields is empty. This its seems strange for me, because every night crontab start at 01:10 am a vacuum

[GENERAL] Question about load balance

2012-06-07 Thread Condor
Hello ppl, I read in internet and in this mailing list, when some one asking about load balance, most of the answers is: pgpool. I want to asking how stable is pgpool ? How much query can handle ? What load average ? Im looking for something multi master solution. Thanks, Hristo -- Sent

[GENERAL] Two databases on the same server, looking for idea how to restrict access.

2012-06-07 Thread Condor
Hello, I have two databases on postgresql in different servers, one main database and one secondary not much important, but the problem is they should use some tables both for reading and writing and the secondary postgresql should not have access to whole database on the main database. Im

Re: [GENERAL] Question about load balance

2012-06-11 Thread Condor
On 2012-06-08 08:39, Craig Ringer wrote: On 06/07/2012 10:26 PM, Condor wrote: Hello ppl, I read in internet and in this mailing list, when some one asking about load balance, most of the answers is: pgpool. I want to asking how stable is pgpool ? How much query can handle ? What load

Re: [GENERAL] Question about load balance

2012-06-11 Thread Condor
On 2012-06-11 09:35, John R Pierce wrote: On 06/10/12 11:26 PM, Condor wrote: Im not sure, just looking how to make load balance. I have a small database around 20 gb, but I expect to join another database on different scheme and Im looking for solution about load balance or some cache

Re: [GENERAL] Question about load balance

2012-06-11 Thread Condor
On 2012-06-11 10:23, John R Pierce wrote: On 06/11/12 12:11 AM, Condor wrote: I seek advice if the server load is too much what I could do to it landed. I recommend a faster server for this. more CPU cores, more memory, faster storage. that will take you a LONG ways, much simpler than

Re: [GENERAL] Question about load balance

2012-06-11 Thread Condor
On 2012-06-11 21:03, John R Pierce wrote: On 06/11/12 2:11 AM, Condor wrote: Yes, I now but these parameters can't be increase forever. It's can but isn't cheep. For that reason I looking some other ways. why don't you worry about that when you get there, rather than before you even start

Re: [GENERAL] Question about load balance

2012-06-12 Thread Condor
On 2012-06-11 22:47, John R Pierce wrote: On 06/11/12 12:17 PM, Condor wrote: May be because some times when some one start a new business does not have 20k $ for a new server and resource of the server is enough for the moment and as I planed is enough for this year. and when you start

Re: [GENERAL] Question about load balance

2012-06-12 Thread Condor
On 2012-06-12 10:48, John R Pierce wrote: On 06/11/12 11:29 PM, Condor wrote: I think I'm trying to learn information what is the technique for managing large databases not to philosophize what was my server. you handle large databases with a lot of fast disk, and memory, this gets you

[GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-01 Thread Condor
Hello ppl, I have a problem with one sql query, can some one help me. My query is: SELECT array_agg(month) AS month, array_agg(status) AS status, array_agg(service) AS service, case when array_upper(array_agg(phone), 1) is not null THEN array_agg(phone) else array_agg(mobile) END FROM bills

Re: [GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-02 Thread Condor
On 2012-08-01 23:59, David Johnston wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Condor Sent: Wednesday, August 01, 2012 4:16 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Need help with SQL query

Re: [GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-03 Thread Condor
On 2012-08-02 21:32, David Johnston wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Condor Sent: Thursday, August 02, 2012 4:35 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Need help with SQL query

[GENERAL] How to analyze load average ?

2012-08-06 Thread Condor
Hello, can some tell me, how I can analyze from where my server bring up load average ? I have one server with 128 GB memory, 32 CPU x86_64, RAID5 - 3 15k SAS HDD ext4 fs. That is my produce server, also is configured to send wal files over the net. Here is my configuration:

Re: [GENERAL] How to analyze load average ?

2012-08-06 Thread Condor
On 2012-08-06 17:38, Tomas Vondra wrote: On 6 Srpen 2012, 16:23, Condor wrote: Hello, can some tell me, how I can analyze from where my server bring up load average ? ... When I connect to server i see only 2 query with select * from pg_stat_activity; that is not complicated, select rid

Re: [GENERAL] How to analyze load average ?

2012-08-17 Thread Condor
On , Tomas Vondra wrote: I think load avg is high because before I change the servers my produce server was on 16 cpu, 24 gb memory and load avg on that server was 0.24. Database is the same, users that use the server is the same, nothing is changed. I dump the DB from old server and import

[GENERAL] Result from Having count

2012-08-23 Thread Condor
Hello ppl, I try to make query and see how many ids have more then one row. few records is: ids | val | some a | 1 | x a | 1 | v b | 1 | x b | 2 | c I focus on ids and val with: SELECT ids, val FROM table WHERE ids = 'a' GROUP BY ids, val HAVING COUNT(ids) 1; and result

Re: [GENERAL] Result from Having count

2012-08-23 Thread Condor
On , Frank Lanitz wrote: Am 23.08.2012 09:52, schrieb Condor: Hello ppl, I try to make query and see how many ids have more then one row. few records is: ids | val | some a | 1 | x a | 1 | v b | 1 | x b | 2 | c I focus on ids and val with: SELECT ids, val FROM table WHERE

[GENERAL] Strange problem with string and select

2012-08-30 Thread Condor
Hello, can I ask is exist some kind of automatic escape string in postgresql ? I use pgsql 9.1.5 and I have very interest problem, I have field with text string that I cant find normally. Variable encoding from variables: server_encoding | WIN1251 lc_collate

Re: [GENERAL] Strange problem with string and select

2012-08-30 Thread Condor
On , Alban Hertroys wrote: On 30 August 2012 10:12, Condor con...@stz-bg.com wrote: Hello, can I ask is exist some kind of automatic escape string in postgresql ? I use pgsql 9.1.5 and I have very interest problem, I have field with text string that I cant find normally. Here is examples

[GENERAL] How to prevent clear screen when query finish ?

2013-08-07 Thread Condor
Hello, sorry for dumb question, did any one can tell me how the hell I can remove clear screen after finish the sql query from console ? This probably have some idea, but for me look like very ... not good idea. When I run query from console like: SELECT * FROM table_x; I got the result ...

Re: [GENERAL] How to prevent clear screen when query finish ?

2013-08-08 Thread Condor
On 2013-08-07 19:01, Adrian Klaver wrote: On 08/07/2013 08:53 AM, Condor wrote: Hello, sorry for dumb question, did any one can tell me how the hell I can remove clear screen after finish the sql query from console ? This probably have some idea, but for me look like very ... not good idea

[GENERAL] Question about permissions on database.

2012-09-22 Thread Condor
Hello, I wanna ask: is there a short way to giver permission to one user to select/insert (all privileges) on whole database ? Im create a user and try to give him all permission on existing database, but when I try to select always got: ERROR: permission denied for relation table_name I

Re: [GENERAL] Question about permissions on database.

2012-09-23 Thread Condor
On 2012-09-22 23:47, Ryan Kelly wrote: On Sat, Sep 22, 2012 at 11:35:00PM +0300, Condor wrote: Hello, I wanna ask: is there a short way to giver permission to one user to select/insert (all privileges) on whole database ? Im create a user and try to give him all permission on existing database

Re: [GENERAL] Upgrade from 8.4.13 to 9.2.0.1 successful but it still displays 8.4.13 if SELECT version();

2012-09-23 Thread Condor
On 2012-09-23 14:47, a...@hsk.hk wrote: Hi, I have upgraded postgresql 8.4.13 to 9.2.0.1 O/S Ubuntu, restarted postgresql, it displayed my postgresql is 9.2 but when I log into postgresql, show version, it is still 8.4.13, see a) and b) below, a) * Restarting PostgreSQL 9.2 database server

[GENERAL] How to raise index points when equal and like is used with gist ?

2012-10-11 Thread Condor
Hello, I have a problem with query and index scan based on pg_trgm module. Here is few examples: First example is with equal: explain analyze SELECT * FROM table WHERE firstname = 'OLEG' AND middlename || lastname LIKE '%KUZNICOV%IGORU%';

Re: [GENERAL] How to raise index points when equal and like is used with gist ?

2012-10-12 Thread Condor
On 2012-10-12 01:14, Sergey Konoplev wrote: On Thu, Oct 11, 2012 at 2:23 AM, Condor con...@stz-bg.com wrote: explain analyze SELECT * FROM table WHERE phone LIKE '12%' AND firstname = 'OLEG' AND middlename || lastname LIKE '%KUZNICOV%IGORU

Re: [GENERAL] How to raise index points when equal and like is used with gist ?

2012-10-12 Thread Condor
On 2012-10-12 03:27, Tom Lane wrote: Condor con...@stz-bg.com writes: explain analyze SELECT * FROM table WHERE phone LIKE '12%' AND firstname = 'OLEG' AND middlename || lastname LIKE '%KUZNICOV%IGORU%'; QUERY PLAN

Re: [GENERAL] How to raise index points when equal and like is used with gist ?

2012-10-14 Thread Condor
On 2012-10-12 11:30, Sergey Konoplev wrote: On Fri, Oct 12, 2012 at 1:20 AM, Condor con...@stz-bg.com wrote: Even without tel filed result and type of scan is the same (Seq Scan). This is because your table has to few rows and it is easier to seq scan. Add more rows, eg. 100 000, then ANALYZE

Re: [GENERAL] return query execute SQL-problem

2012-10-16 Thread Condor
On 2012-10-16 10:44, Maximilian Tyrtania wrote: Hi there, here is something I don't quite grasp (PG 9.1.3): This function: CREATE OR REPLACE FUNCTION f_aliastest() RETURNS setof text AS $BODY$ declare sql text; begin sql:='SELECT ''sometext''::text as alias'; return query execute SQL;

Re: [GENERAL] character encoding

2012-12-06 Thread Condor
On 2012-12-06 17:30, Adrian Klaver wrote: On 12/06/2012 07:20 AM, Doug Kunzman wrote: I'm trying to support an automatic character encoding to UNICODE so Java strings with none ASCII character can be stored in a table. I've edited my postgressql.conf with the following command,

[GENERAL] Query and index ... unexpected result need advice.

2012-12-08 Thread Condor
Hello, Yesterday when I read the email I came across an issue and I thought very interesting result. The topic is: Table with million rows - and PostgreSQL 9.1 is not using the index. I decided to try it because from 250 ms with millions rows to 15 ms is very good, but I did not get the

Re: [GENERAL] Query and index ... unexpected result need advice.

2012-12-09 Thread Condor
On 2012-12-10 00:31, Jeff Janes wrote: On Sat, Dec 8, 2012 at 5:54 AM, Condor con...@stz-bg.com wrote: I am interested to know where is my mistake or something wrong with server which I doubt. Here is my current query with explain: (I change names to XXX YYY ZZZ because original names

Re: [GENERAL] Linux Distribution Preferences?

2013-01-13 Thread Condor
On 2013-01-14 00:44, Gavin Flower wrote: On 14/01/13 07:27, Shaun Thomas wrote: Hey guys, I'm not sure the last time I saw this discussion, but I was somewhat curious: what would be your ideal Linux distribution for a nice solid PostgreSQL installation? We've kinda bounced back and forth

[GENERAL] Problem with records that disappear.

2013-01-14 Thread Condor
Hello, from some time I have a very strange problem with my postgresql 9.2.2 64bit. I make a few changes with an plp function: BEGIN UPDATE table SET X = X where id = aid; UPDATE table_2 SET Y=Y where id = aid; IF aid 0 THEN SELECT INTO ids id FROM table_3 WHERE x = x; IF aid

Re: [GENERAL] Problem with records that disappear.

2013-01-14 Thread Condor
On 2013-01-14 10:53, Vlad Arkhipov wrote: On 01/14/2013 05:15 PM, Condor wrote: Hello, from some time I have a very strange problem with my postgresql 9.2.2 64bit. I make a few changes with an plp function: BEGIN   UPDATE table SET X = X where id = aid;   UPDATE table_2 SET Y=Y where id

Re: [GENERAL] Problem with records that disappear.

2013-01-14 Thread Condor
On 2013-01-14 10:45, John R Pierce wrote: On 1/14/2013 12:15 AM, Condor wrote: When I call the function from php everything it's seems to work, but some time modify records just disappear. I don't have any ideas for the moment what is the problem in my postgresql or in my php code. I'm sure

Re: [GENERAL] Problem with records that disappear.

2013-01-14 Thread Condor
On 2013-01-14 11:41, John R Pierce wrote: On 1/14/2013 1:34 AM, Condor wrote: It's a standalone statements without BEGIN TRANSACTION. An update is easy to explain with another but insert with missing row and there is no DELETE command in whole code and no one other have access to server

[GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Condor
from mytable ? Cheers, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Condor
On 2013-04-05 00:38, Merlin Moncure wrote: On Thu, Apr 4, 2013 at 4:32 PM, Condor con...@stz-bg.com wrote: Hello, I have one query in my postgresql 9.2.3 that took 137 ms to me executed and looking a way what I can do to optimize it. I have one table generated numbers from 1 to 1 000 000

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-05 Thread Condor
, Condor -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] How to convert US date format to European date format ?

2013-04-10 Thread Condor
Hello ppl, I have a database where the previous owner use US date format in date fields: 2009-02-18 Is there a way how to convert the fields in European format 18-02-2009. I mean existing date in records. What's will be happened if I change format in postgresql.conf ? Cheers, Hristo S.

Re: [GENERAL] How to convert US date format to European date format ?

2013-04-12 Thread Condor
On 2013-04-10 22:35, Thomas Kellerer wrote: John R Pierce wrote on 10.04.2013 21:28: On 4/10/2013 6:15 AM, Thomas Kellerer wrote: psql (one of the possible client applications) uses the datestyle parameter to decide on how to format a date column when displaying it. If you change the

Re: [GENERAL] How to convert US date format to European date format ?

2013-04-12 Thread Condor
On 2013-04-12 10:59, John R Pierce wrote: On 4/12/2013 12:42 AM, Condor wrote: and ISO, DMY show me: 2012-10-15 11:00:49.397908 if I use Postgres, DMY show me Mon 15 Oct 11:00:49.397908 2012 But I want to be formatted: 11:00:49 15-10-2012 use the date formatting functions, like

[GENERAL] How to access array element in pgsql after array_agg

2014-06-17 Thread Condor
Hello, I wanna ask how I can access array element in array_agg ? I do select array_agg(ids) from x; in ids I have int and result is : array_agg - {3843,2,3543,33} I want to access one element or first one direct in sql query like: select array_agg(ids)[1] from

Re: [GENERAL] How to access array element in pgsql after array_agg

2014-06-17 Thread Condor
On 17-06-2014 22:44, François Beausoleil wrote: Le 2014-06-17 à 14:22, Condor con...@stz-bg.com a écrit : I do select array_agg(ids) from x; in ids I have int and result is : array_agg - {3843,2,3543,33} I want to access one element or first one direct in sql query

[GENERAL] Strange result using pg_dump gzip or split.

2014-11-10 Thread Condor
Hello, I found strange result when I use pg_dump described on postgresql site: http://www.postgresql.org/docs/9.3/static/backup-dump.html I have a database with 30 gb data and decide to archive it, postgresql is 9.3.5 x64_86, ext4 file system, kernel 3.14.18 Slackware 14.2 (current)

[GENERAL] Strange situation on slave server

2015-07-01 Thread Condor
Hello, I have master - slave replication hot standby. Both server are linux slackware64 current with postgresql 9.4.4. Today when I logged to check some things on slave server I see on top memory taken 26%. That was strange for me and I restart server. Well, I checked after 40 minute and I

Re: [GENERAL] Strange situation on slave server

2015-07-02 Thread Condor
On 01-07-2015 13:53, Condor wrote: Hello, I have master - slave replication hot standby. Both server are linux slackware64 current with postgresql 9.4.4. Today when I logged to check some things on slave server I see on top memory taken 26%. That was strange for me and I restart server. Well

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-26 Thread Condor
On 26-08-2015 10:13, Allan Kamau wrote: On Wed, Aug 26, 2015 at 5:23 AM, rob stone floripa...@gmail.com wrote: On Tue, 2015-08-25 at 20:17 -0400, Melvin Davidson wrote: I think a lot of people here are missing the point. I was trying to give examples of natural keys, but a lot of people are

[GENERAL] Unable to match same value in field.

2016-03-10 Thread Condor
Hello, I using postgresql 9.5.1 and I have problem to match value in one field. Both tables are text: =# \d list_cards_tbl; Column | Type | Modifiers ---+-+-- recid | integer |

Re: [GENERAL] Unable to match same value in field.

2016-03-11 Thread Condor
On 10-03-2016 15:37, Adrian Klaver wrote: On 03/10/2016 01:09 AM, Condor wrote: Hello, I using postgresql 9.5.1 and I have problem to match value in one field. Both tables are text: =# \d list_cards_tbl; Column | Type | Modifiers

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-27 Thread Condor
On 26-07-2016 21:04, Dorian Hoxha wrote: Many comments: https://news.ycombinator.com/item?id=12166585 https://www.reddit.com/r/programming/comments/4uph84/why_uber_engineering_switched_from_postgres_to/ On Tue, Jul 26, 2016 at 7:39 PM, Guyren Howe wrote: Honestly, I've

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-29 Thread Condor
On 29-07-2016 20:33, Jerry Sievers wrote: Condor <con...@stz-bg.com> writes: On 26-07-2016 21:04, Dorian Hoxha wrote: Many comments: https://news.ycombinator.com/item?id=12166585 https://www.reddit.com/r/programming/comments/4uph84/why_uber_engineering_switched_from_postgres_to/ On Tu

Re: [GENERAL] Dump all the indexes/constraints/roles

2016-10-18 Thread Condor
On 18-10-2016 06:32, Patrick B wrote: Hi guys, I need to export an entire database to another server, for testing purpose. Is there any way to export all indexes and constraints ? Postgres 9.2 Patrick Hello, pg_dump database is that you need, but if you asking do you can export data +

Re: [GENERAL] ALTER TABLE without long waiting is possibly ?

2016-10-11 Thread Condor
On 11-10-2016 15:59, Vitaly Burovoy wrote: On 10/11/16, Condor <con...@stz-bg.com> wrote: Hello, today I need to alter one of our biggest tables to add two new columns with default value 0. Server version: PostgreSQL 9.5.4 on x86_64-slackware-linux-gnu, compiled by x86_64-slackware

[GENERAL] ALTER TABLE without long waiting is possibly ?

2016-10-11 Thread Condor
Hello, today I need to alter one of our biggest tables to add two new columns with default value 0. Server version: PostgreSQL 9.5.4 on x86_64-slackware-linux-gnu, compiled by x86_64-slackware-linux-gcc (GCC) 5.3.0, 64-bit when I do: ALTER TABLE stocks ADD COLUMN promo INTEGER DEFAULT 0;

Re: [GENERAL] Copy database to another host without data from specific tables

2017-03-06 Thread Condor
On 07-03-2017 09:02, Panagiotis Atmatzidis wrote: Hello, I have 2 RDS instances on AWS running PSQL 9.4.7. I want to make a clone of database1 which belongs to user1, to database2 which belongs to user2. Database1 has 20+ tables. I want to avoid copying the DATA sitting on 5 tables on

Re: [GENERAL] Copy database to another host without data from specific tables

2017-03-06 Thread Condor
On 07-03-2017 09:02, Panagiotis Atmatzidis wrote: Hello, I have 2 RDS instances on AWS running PSQL 9.4.7. I want to make a clone of database1 which belongs to user1, to database2 which belongs to user2. Database1 has 20+ tables. I want to avoid copying the DATA sitting on 5 tables on

Re: [GENERAL] PG and database encryption

2017-08-22 Thread Condor
On 22-08-2017 22:48, rakeshkumar464 wrote: We have a requirement to encrypt the entire database. What is the best tool to accomplish this. Our primary goal is that it should be transparent to the application, with no change in the application, as compared to un-encrypted database. Reading

[GENERAL] Postgres Data Encryption Using LUKS with dm-crypt ?

2017-06-18 Thread Condor
Hello ppl, a few years ago I asked the same question but did not receive valued answers and we use different way to realize the project. Today I wanna ask did some one do it and most important for me, can some one share his experience ? What I should expect, what is good and bad things that

[GENERAL] Question about memory usage of pg_dump

2017-10-09 Thread Condor
Hello, I have a question .. okay I know it's a dump but need to ask it because probably I will need to tell of five of my collective bad things... :) My version is PostgreSQL 9.6.5 on x86_64-slackware-linux-gnu, compiled by x86_64-slackware-linux-gcc (GCC) 7.2.0, 64-bit on server IP

Re: [GENERAL] How to check streaming replication status

2017-08-31 Thread Condor
On 31-08-2017 11:24, Glyn Astill wrote: From: Condor <con...@stz-bg.com> To: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org> Sent: Thursday, 31 August 2017, 08:36:19 GMT+1 after a hour I get error message on slave server: LOG: restored log file "000

Re: [GENERAL] How to check streaming replication status

2017-08-31 Thread Condor
On 31-08-2017 12:14, Glyn Astill wrote: From: Condor <con...@stz-bg.com> To: Glyn Astill <glynast...@yahoo.co.uk> Cc: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>; "pgsql-general-ow...@postgresql.org" <pgsql-general-ow...@postgresql.or

[GENERAL] How to check streaming replication status

2017-08-31 Thread Condor
Hello, I have a question about master - slave replication. My version on both servers is : PostgreSQL 9.6.4 on x86_64-slackware-linux-gnu, compiled by x86_64-slackware-linux-gcc (GCC) 7.2.0, 64-bit Here is the story: Today I create a table space and move all indexes on nvmi drives. So far

Re: [GENERAL] Log storage

2017-10-19 Thread Condor
On 18-10-2017 09:18, Ivan Sagalaev wrote: Hello everyone, An inaugural poster here, sorry if I misidentified a list for my question. I am planning to use PostgreSQL as a storage for application logs (lines of text) with the following properties: - Ingest logs at high rate: 3K lines per