Re: [GENERAL] Sequential vs. random values - number of pages in B-tree

2016-08-18 Thread Francisco Olarte
ent numbers in the range 2**32/64. I think there are some pseudo-random number generators which can be made to work with any range, but do not recall which ones right now. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscr

Re: [GENERAL] Sequential vs. random values - number of pages in B-tree

2016-08-18 Thread Francisco Olarte
ideally I would just write 10M integers to a disk file, then shuffle it and compare COPY FROM times from both ) ( unless you know of an easy way to generate a random permutation on the fly without using a lot of memory, I do not ). Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] SQL help - multiple aggregates

2016-08-18 Thread Francisco Olarte
CCing to the list ( if you are new to this list, messages come from the sender address, you have to use "reply all" ( at least in my MUA, web gmail ) to make your replies appear in the list ). On Thu, Aug 18, 2016 at 3:03 PM, <haman...@t-online.de> wrote: > Hi Francisco

Re: [GENERAL] SQL help - multiple aggregates

2016-08-18 Thread Francisco Olarte
counts for the case where not al vendids are present. If you prefer null you can use it, IIRC max ignores them. Francisco Olarte. -- 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] Any reasons for 'DO' statement not returning result?

2016-08-13 Thread Francisco Olarte
-PSQL-VARIABLES and be sure to scroll down to "SQL Interpolation" after the built in variables list and read that. I've used it several times, just remember it's a macro processor and it's done by psql, not by the server. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-ge

Re: [GENERAL] Corrupted Data ?

2016-08-13 Thread Francisco Olarte
) tracks can give this kind of problems ( although the disk CRC should catch all odd number of bit errors , but with VMs in the mix who knows where the messages could end up ). Francisco Olarte. -- 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] Corrupted Data ?

2016-08-12 Thread Francisco Olarte
of problems, with programs as tested as postgres and rsync, tend to indicate controller/RAM/disk going bad ( in your case it could be caused by a single bit getting flipped in a sector for the data portion of the table, and not being propagated either because it happened after your sync of drdb or beca

Re: [GENERAL] Corrupted Data ?

2016-08-12 Thread Francisco Olarte
rieved if I filter by drawid = 318220 Specially if this happens, you may have some slightly bad disks/ram/ leading to this kind of problems. Francisco Olarte. -- 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] SELECT col INTO TEMP TABLE tab2 ON COMMIT DROP FROM tab1

2016-08-12 Thread Francisco Olarte
ing to solve the problem. I was just trying to point that "select" is not the same in plpgsql and in sql, so you need to read the docs for plpgsql to find how to solve it. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

Re: [GENERAL] SELECT col INTO TEMP TABLE tab2 ON COMMIT DROP FROM tab1

2016-08-12 Thread Francisco Olarte
tinto.html just But are looking at the docs for SQL. This kind of languages are similar to SQL, but not the same. I think https://www.postgresql.org/docs/9.5/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-SQL-ONEROW is the proper place to look it up. Francisco Olarte. -- Sent via pgsql-gener

Re: [GENERAL] Postgres Pain Points: 1 pg_hba conf

2016-08-11 Thread Francisco Olarte
les. In general this works, in nearly every situation. If you have problems, consider explaining it and may be you wil get some ``advice''. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [SPAM] Re: [SPAM] Re: [GENERAL] WAL directory size calculation

2016-08-04 Thread Francisco Olarte
eed it we stop the cluster, boot it with that, restore, stop it again and reboot with the normal fsync=on config. In this case we do not mind losing data as we are doing a full restore anyway. But normally, its a bad idea. As a classic photo caption says, fsync=off => DBAs running with scissors

Re: [SPAM] Re: [GENERAL] WAL directory size calculation

2016-07-29 Thread Francisco Olarte
-wal and the hd cache, then crash and have nothing on reboot. Francisco Olarte. -- 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] WAL directory size calculation

2016-07-28 Thread Francisco Olarte
ies to the archive and relying on it for recovery ) ? Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Re: pg_basebackup vs archive_command - looking for WAL archive older than archive_command start

2016-07-17 Thread Francisco Reyes
On 07/17/2016 06:35 PM, Francisco Reyes wrote: Why is the pg_basebackup restore looking for a WAL file that is even older than the ones I have, when I turned on WAL archiving before I started the pg_basebackup? Figured it out.. the error is from a secondary slave trying to sync from

[GENERAL] pg_basebackup vs archive_command - looking for WAL archive older than archive_command start

2016-07-17 Thread Francisco Reyes
I turned on archive_command and have wal archiving going. I did a pg_basebackup and copied the resulting file from source machine to target, yet when I restore I am getting requested WAL segment 000508AE009B has already been removed The earliest WAL archives I have are

Re: [GENERAL] [BUGS] Where clause in pg_dump: need help

2016-07-11 Thread Francisco Olarte
eds a BOOLEAN. YOU need to be able to identify the inserted rows. YOU know your data definitions. Ar you able to query them ? > but this, I am sure has some syntax errors, could you help correct this, NOT, because I do not know the table structure. Only you can do that. Francisco O

Re: [GENERAL] pasting a lot of commands to psql

2016-07-08 Thread Francisco Olarte
when the text being pasted > contains tabs and readline uses to do completion. Doesn't 'cat | psql ' disable it? I use it with other programs for these purpose ( as well as things like ls | cat to avoid colors/wordwrapping, just makes the program see a non-tty on stidn/stdout ). Francisco Ola

Re: [GENERAL] [BUGS] Where clause in pg_dump: need help

2016-07-08 Thread Francisco Olarte
r and back using freebcp, IIRC, on the sql server side ) You still can have problems IF you have updates to the tables, or deletions, or . But if you just have insertions, copy is easy to do. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] pg_dump fundenental question

2016-07-05 Thread Francisco Olarte
andyou can have the sql script but asking pg_restore to generate it if you need it, but not the other way round ). Francisco Olarte. -- 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] dblink authentication failed

2016-06-27 Thread Francisco Olarte
jún 24 13:54 ./.pgpass This '#' seems to indicate you run those commands as root, while the server typically runs as postgres. Have you checked the commands work when issued as the server user? Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] [HACKERS] Online DW

2016-06-10 Thread Francisco Olarte
o post much more details on what you are proposing, what are the use cases for the general public, etc.. Just eyeballing it I would estimate this will need many pages just to state the problems and the intended semantics of your proposal. Regards. Francisco Olarte. -- Sent via pgsql-general mai

Re: [GENERAL] Switching roles as an replacement of connection pooling tools

2016-05-31 Thread Francisco Olarte
roles and grant combos of N 'schema roles' to them to achieve this, but if N is, say, a hundred, and you have a huge M, like ten thousand, with a different combo for each one, his solution may make sense ( I do not think such a bizarre case justifies the bug-risk of including the feature, but it ca

Re: [GENERAL] Drop/Re-Creating database extremely slow + doesn't lose data

2016-05-31 Thread Francisco Olarte
they have the system catalogs inside them ). Francisco Olarte.​

Re: [GENERAL] Deleting a table file does not raise an error when the table is touched afterwards, why?

2016-05-30 Thread Francisco Olarte
bly alter the running server memory, which would you think the correct behaviour would be for a 'poke rand(),rand()' in the server process? It could have triple redundancy copy of every page and try to vote and detect in each instruction, but is pointless. Francisco Olarte. -- Sent via pgsq

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

2016-05-29 Thread Francisco Olarte
MNSHO. You can ask the OP for the reason to stay in 8.3 directly. Maybe is something as simple as "I'm the one who pays, you do what I pay you for.". I've had several of these. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

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

2016-05-28 Thread Francisco Olarte
it ( arguing it's a simpler an more testable process ). Francisco Olarte. -- 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] Connections - Postgres 9.2

2016-05-16 Thread Francisco Olarte
ata, just in the legend ). Francisco Olarte. -- 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] Connections - Postgres 9.2

2016-05-16 Thread Francisco Olarte
nless your app has a reason for them, as they are the ones which can block things ). Plain 'Idle' are normally connections between transactions, totally normal if you use poolers, or if your app keeps connection opens while it does other things ( like preparing for a transaction ). Francisco Olarte.

Re: [GENERAL] View not allowing to drop column (Bug or Feature enhancement )

2016-05-16 Thread Francisco Olarte
res I do not impact other code if I inadvertently rename a column, or delete it. If the feature were to be removed, and backwards-incompatible changes were allowed, a lot of people will be unhappy. Francisco Olarte. -- 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] View not allowing to drop column (Bug or Feature enhancement )

2016-05-16 Thread Francisco Olarte
output columns may be completely different. <<<<<< Francisco Olarte. -- 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] Thoughts on "Love Your Database"

2016-05-05 Thread Francisco Olarte
mystified. Show me your tables, and I won’t usually need your flowcharts; they’ll be obvious. " from TMMM, so its normal I remember it that way ( I still own it and reread some chunks every couple of years. ) Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@pos

Re: [GENERAL] psql color hostname prompt

2016-04-28 Thread Francisco Olarte
le set appropriately. You > need to avoid colliding with a custom GUC used by an extension. But perhaps > it is useful. Not this hacky, I'll use it in preference to changing the prompt with scripts ( I'll continue using %M and changing terminal titles, but I'm too used to it ). Well seen. Fr

Re: [GENERAL] psql color hostname prompt

2016-04-27 Thread Francisco Olarte
to have the prompt updated. Anyway, TIMTOWTDI. > But again, I think the more elegant approach is to alter the %M logic. > Any thoughts? At risk of being redundant, not altering %M, another %x better. Francisco Olarte. -- 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] Calculating Minkowski distance between two rows

2016-04-25 Thread Francisco Olarte
and then write the numeric array version of the func and call them, divide and conquer. Francisco Olarte. -- 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] psql color hostname prompt

2016-04-25 Thread Francisco Olarte
Hi: On Mon, Apr 25, 2016 at 4:04 PM, Achilleas Mantzios wrote: > Hello, have done that, looked really nice, but unfortunately this resulted > in a lot of garbled output, in case of editing functions, huge queries, up > arrows, etc... Did you use %[ %] to delimit

Re: [GENERAL] psql color hostname prompt

2016-04-25 Thread Francisco Olarte
ot a fan of html mail. lsof may give you longer or more acurate names, but I think std escapes are enough. Francisco Olarte. -- 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] Columnar store as default for PostgreSQL 10?

2016-04-21 Thread Francisco Olarte
od for a lot of postgres usages. If columnar were the silver bullet everybody would be doing it. Francisco Olarte. -- 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] Fetching last n records from Posgresql

2016-03-30 Thread Francisco Olarte
analyze a nice chunk of the time is spent sending them over my 60 ms RTT connection ). Anyway, try things, measure, post results so we know what happens. Francisco Olarte. -- 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] psql question: aborting a "script"

2016-03-15 Thread Francisco Olarte
ing, not a session setting, so he'll probably need to use the \set psql mettacommand: \set ON_ERROR_STOP on and also, use on as suggested on the docs, not ON, I'm not sure wether PSQL is case sensitive. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] Unexpected result using floor() function

2016-03-15 Thread Francisco Olarte
v | pg_typeof -+--- 473 | numeric (1 row) which makes your intention clear. Francisco Olarte. -- 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] Suppress decimal point like digits in to_char?

2016-03-14 Thread Francisco Olarte
ales, as the regexp does ( as a note, in Spain they are inverted, dot for grouping comma for decimals ) ) I do not think it's a big deal, uglier things are coded by me continuously nearly via muscle memory. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] Suppress decimal point like digits in to_char?

2016-03-14 Thread Francisco Olarte
prices, so I would use 990D00, but anyway ). Francisco Olarte. -- 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] Suppress decimal point like digits in to_char?

2016-03-14 Thread Francisco Olarte
e the global result ( I use it but it seems to be like a restricted sprintf which can not do the supress the zero stuff ) ? Francisco Olarte. -- 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] pg_restore fails

2016-03-13 Thread Francisco Olarte
but I've never used the directory format for ( serious, I've tried all when learning ) backups. Francisco Olarte. -- 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] multiple UNIQUE indices for FK

2016-03-07 Thread Francisco Olarte
ust cache the last message in each person record, then when you insert a new one you update each sender / recipient with the last message id at the same time you insert the records, preferably sorting the ids first to avoid deadlocks if your concurrency is high, although I suspect you'll need a linke

Re: [GENERAL] multiple UNIQUE indices for FK

2016-03-05 Thread Francisco Olarte
Hi Rafal: On Fri, Mar 4, 2016 at 11:46 PM, Rafal Pietrak <ra...@ztk-rp.eu> wrote: > W dniu 04.03.2016 o 18:59, Francisco Olarte pisze: >> Make sender_person_id NOT NULL in messages if you want to insure every >> message ahs exactly ONE SENDER, leave it out if you want t

Re: [GENERAL] multiple UNIQUE indices for FK

2016-03-04 Thread Francisco Olarte
. (I'm really > emotionally bond to that NEXT field there :) ON this I cannot help you too much. I do not see what you are trying to achieve with the NEXT field. These will need more explanations, and more study, and as I said before, I do not have the available resources for them. Sorry for th

Re: [GENERAL] multiple UNIQUE indices for FK

2016-03-04 Thread Francisco Olarte
s systems, but that is not the way rdbms work, they like to have a declared structure and decide by themselves what to do. This is nice in that once you write a query you can partition, add indexes, create views, and let the rdbms work out how to do it, but imposes some ( some would say a lot ) constr

Re: [GENERAL] How jsonb updates affect GIN indexes

2016-02-27 Thread Francisco Olarte
CCing to list to maintain context. On Sat, Feb 27, 2016 at 12:14 PM, Eric Mortensen <e...@appstax.com> wrote: > Thanks Francisco, I had not considered MVCC. If that is true, it would seem > to me that a GIN index would "always" be less efficient, as it potentially > w

Re: [GENERAL] How jsonb updates affect GIN indexes

2016-02-27 Thread Francisco Olarte
e details, I just know it's a complex decision, someone with more knowledge of the internals may give you a more acurate descriptin if needed. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/ma

Re: [GENERAL] Why Postgres use a little memory on Windows.

2016-02-20 Thread Francisco Olarte
clause or a small function, filter that and join with data.id. I suppose adding a third c column, null on b=1 and =b on b=0/2 and selecting the previous non-null in the sequence could do it, but it's somehow above my window-fu, I'm more of a code gouy and would do it with two nested loops on a fu

Re: [GENERAL] Why Postgres use a little memory on Windows.

2016-02-20 Thread Francisco Olarte
possible to see the schema definitions for the two tables? My bet is on somethink like data.id ~serial primary key, gap.start/end_id foreign key to that. Francisco Olarte. -- 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] repeated characters in SQL

2016-01-24 Thread Francisco Olarte
need "(.)\\1". If you send "(.)\1" to a C compiler it will build the string leftp, dot, rightp, SOH=(char)(1). It will arrive to the backslash when parsing, see it is followed by a digit less than 8, interpret it as an octal escape, and emit the SOH. Francisco Olarte. -- Sent via p

Re: [GENERAL] PostgreSQL upgrade 9.3.4 -> 9.3.10

2016-01-12 Thread Francisco Olarte
pg_upgrade was developed because the on-disk format changes are tipically minor, and a special program could be made to transform the data from a version to a later one faster than dumping & restoring, but is more or less equivalent to doing that. As minor version upgrades do not need dump/restore,

Re: [GENERAL] Options for complex materialized views sharing most of the same logic?

2015-12-28 Thread Francisco Olarte
ompiled by x86_64-pc-linux-gnu-gcc (Gentoo 4.9.3 p1.4, pie-0.6.4) 4.9.3, 64-bit (1 row) s=> :head and 0>1 :tail ; version - (0 rows) If posible I would try the composite stuff mentioned first, but one of these should be enough, in the second case you still recreate the things,

[GENERAL] How to audit non LDAP connections?

2015-12-03 Thread Francisco Reyes
Due to security/audits have moved most users to LDAP. Looking for a way to tell if a connection is/is not going through LDAP. Other than errors, such as bad password, have not found a way to tell if a connection is using LDAP or postgresql internal authentication in the logs. Tried going

Re: [GENERAL] JSONB performance enhancement for 9.6

2015-11-29 Thread Francisco Olarte
off compresion CAN decrease the eficiency ( hit ratio ) of the shared buffers and the cache, IIRC ( but worth testing anyway ). Francisco Olarte. -- 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] Convert from hex to string

2015-11-25 Thread Francisco Olarte
o it and save a few bytes, or you can convert to/from utf8 an insure you can represent anything. Then you can encode/decode the bytes in whatever sutis you, hex, as in yuour eample or base64 if you need to save a few bytes. Types are there for a reason. Francisco Olarte. -- Sent via pgsql-gener

Re: [GENERAL] Convert from hex to string

2015-11-25 Thread Francisco Olarte
pack H*'. So I tried to show how the data flows without relying on any implicit conversion, the convert_to+encode => decode+convert_from works in any client encoding, even in a thing like ebcdic. Francisco Olarte. -- 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] Convert from hex to string

2015-11-25 Thread Francisco Olarte
ve a '0' in a ebcdic database, transform it to to [0x30] byte array, encode this as "30" and then transform the later to 00 30 00 10 because you are using UTF16-BE wire encoding. Encoding is tricky enough without relying on implicit convertion or on a character being the same as a byte

Re: [GENERAL] Convert from hex to string

2015-11-25 Thread Francisco Olarte
le stop trying to encode/decode strings directly normally they problems vanish. Francisco Olarte. -- 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 Timezone and Brazilian DST

2015-10-28 Thread Francisco Olarte
ate -R -d '1 month ago' Mon, 28 Sep 2015 09:09:55 -0300 ( I'm not familiar with your distro, but I got bitten by one of those soem years ago, incorrect timezone definitions ) Francisco Olarte. -- 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] Can we make regexp processing more friendly by recognizing "\r\n" as a "newline" for "^$" purposes?

2015-10-18 Thread Francisco Olarte
d to whatever the language uses for newlines ( in C and perl that means \n, which needs not be \012, BTW . In unix \n=\012 on disk, on CP/M it's \015\012 and when I worked with Mac ( before the unixy osX they use now ) it was \015, and I cannot think on what they can use on EBCDIC machines ). Francisco Olarte. -- 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] question

2015-10-17 Thread Francisco Olarte
u'll need to decompress it before restoring ( this does not happen for text format, as you can do stream restore, but the restore options for text format are limited, it's an all or nothing approach unless you are really fluent in stream editors ). Francisco Olarte.

Re: [GENERAL] question

2015-10-17 Thread Francisco Olarte
Hi Anj: On Sat, Oct 17, 2015 at 3:11 AM, anj patnaik <patn...@gmail.com> wrote: > My question is for Francisco who replied regarding xz. I was curious what > options he used. Thanks. 1st, we do not normally top post on this list. Second, I do not remember the exact options I use

Re: [GENERAL] question

2015-10-16 Thread Francisco Olarte
one of the levels of xz beat it in BOTH size & time, that was for my data, YMMV ). Francisco Olarte. -- 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] Best way to sync table DML between databases

2015-10-09 Thread Francisco Reyes
On 10/05/2015 09:46 AM, jimbosworth wrote: Im not in a position to change the database setup on server A. Can you have the owners/maintainers do the needed changes to setup replication? Or that is 100% out of the question? -- Sent via pgsql-general mailing list

Re: [GENERAL] Test failover for PosgreSql 9.2

2015-09-25 Thread Francisco Reyes
On 09/25/2015 11:20 AM, yuryu wrote: According to manual I have to kill completely Master and "touch" a trigger to make Slave new Master. You don't have to do anything in the master. If you have configured the slave to check for a file, then it will become Read Write when that file is

Re: [GENERAL] Dropped connections with pg_basebackup

2015-09-25 Thread Francisco Reyes
On 09/24/2015 04:29 PM, Sherrylyn Branchaw wrote: I'm assuming based on the "SSL error" that you have ssl set to 'on'. What's your ssl_renegotiation_limit? The default is 512MB, but setting it to 0 has solved problems for a number of people on this list, including myself. I have also seen

Re: [GENERAL] Dropped connections with pg_basebackup

2015-09-25 Thread Francisco Reyes
On 09/24/2015 04:34 PM, Alvaro Herrera wrote: Sherrylyn Branchaw wrote: Moreover, the default has been set to 0, because the bugs both in our usage and in OpenSSL code itself seem never to end. Just disable it. Set it to 0 and did not help. Likely will move all machines to have it =0 since I

Fwd: [GENERAL] Convert number to string

2015-09-24 Thread Francisco Olarte
- gp gc ffjo hb (4 rows) clasical trick. But, as I said above, you need to specify it much better. Francisco Olarte. -- 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] Convert number to string

2015-09-24 Thread Francisco Olarte
is translate.​ ;-> > > You would then need a little further processing to determine the tens, > hundreds, etc. > > I'll leave that to you to work out, but additional functions of > strpos(string, substring) > substr(string, from [, count]) > length(string) > ​Do not forget replace, shorter, easier. Francisco Olarte.​

[GENERAL] Dropped connections with pg_basebackup

2015-09-24 Thread Francisco Reyes
Have an existing setup of 9.3 servers. Replication has been rock solid, but recently the circuits between data centers were upgraded and pg_basebackup now seems to fail often when setting up streaming replication. What used to take 10+ hours now only took 68 minutes, but had to do many

Re: [GENERAL] Table using more disk space than expected

2015-09-23 Thread Francisco Olarte
k space, if you shrink and fill the rest with other uses server will crash on next growth ( some very special cases may be different, but in general if you have free space is because you create/delete, be it directly or via MVCC updates, so having it there for next usage is not so bad ). Francisco Ola

Re: [GENERAL] GIN Trigram Index Size

2015-09-14 Thread Francisco Olarte
pdates are done directly in the partitions ). Francisco Olarte. -- 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-ctl systemd failed: permission denied

2015-07-28 Thread Francisco Olarte
is using some extended thingies ). Francisco Olarte. -- 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] INSERT ... ON CONFLICT DO UPDATE

2015-07-21 Thread Francisco Olarte
Hi Rafal: On Tue, Jul 21, 2015 at 12:43 PM, Rafal Pietrak ra...@ztk-rp.eu wrote: W dniu 21.07.2015 o 09:34, Francisco Olarte pisze: In this case I think you are mixing vouchers with voucher-numbers. IMO you could get a better dessign by using an auxiliary table and not nullifying the number

Re: [GENERAL] INSERT ... ON CONFLICT DO UPDATE

2015-07-21 Thread Francisco Olarte
upon. So far the only one I could extract from this thread is something which magically solves the current Rafal problem. I would vote against that. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] INSERT ... ON CONFLICT DO UPDATE

2015-07-21 Thread Francisco Olarte
the values from a tree walk, so both of them come in order, and being a reindex ( where you know in advance the full set of values, so you can plan ahead where to put the leaves, how many levels you need and how many splits ) you get an even bigger advantage from the squential insertion case. Francisco

Re: [GENERAL] INSERT ... ON CONFLICT DO UPDATE

2015-07-21 Thread Francisco Olarte
. Francisco Olarte. -- 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] INSERT ... ON CONFLICT DO UPDATE

2015-07-21 Thread Francisco Olarte
no collisions. If you run for some years, you can see which vouchers have been used, so you can debug potential problems. Francisco Olarte. -- 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] INSERT ... ON CONFLICT DO UPDATE

2015-07-20 Thread Francisco Olarte
not ). Francisco Olarte. -- 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 test SSL cert from CA?

2015-07-16 Thread Francisco Reyes
On 07/11/2015 07:32 PM, James Cloos wrote: FR == Francisco Reyes li...@natserv.net writes: Did you include the intermediate cert(s) in the bundle which the server presents to the client? Yes. And did you confirm that the client trusts the issuer's root? Some require explicit configurastion

Re: [GENERAL] Bounded Zone Offset Query

2015-07-11 Thread Francisco Olarte
) Francisco Olarte. -- 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 test SSL cert from CA?

2015-07-09 Thread Francisco Reyes
On 07/09/2015 03:07 PM, Vick Khera wrote: On Wed, Jul 8, 2015 at 10:17 PM, Francisco Reyes li...@natserv.net mailto:li...@natserv.net wrote: openssl s_client -connect HOST:PORT -CAfile /path/to/CA.pem According to this post: http://serverfault.com/questions/79876/connecting-to-postgresql

Re: [GENERAL] How to test SSL cert from CA?

2015-07-09 Thread Francisco Reyes
On 07/08/2015 10:52 PM, Tom Lane wrote: What's the complaint exactly? The error we are getting is: The security of this transaction may be compromised. The following SSL errors have been reported: * The issuer certificate of a locally looked up certificate could not be found. * The root

Re: [GENERAL] Backup Method

2015-07-08 Thread Francisco Reyes
On 07/03/2015 08:08 AM, howardn...@selestial.com wrote: I am trying to move away from pg_dump as it is proving too slow. Have you looked into barman? http://www.pgbarman.org Also, another potential approach is to setup replication and to do the backups from the slave. -- Sent via

[GENERAL] How to test SSL cert from CA?

2015-07-08 Thread Francisco Reyes
Have a client using a commercial application. For a year plus we had been using a local self signed certificate without issues. As of a few weeks ago a change/update to the program is making it complain about the self signed cert. I bought a SSL cert and installed it, but the program is still

Re: [GENERAL] Inserting from multiple processes?

2015-06-29 Thread Francisco Olarte
( it may even be faster, as the docs explicitly say exception blocks are expensive, but as usual YMMV depending on the exact query and the collision ratio ). Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Inserting from multiple processes?

2015-06-27 Thread Francisco Olarte
you do too many transactions without a vacuum ( also reading your pointed threas it sees you do vacuum fulls, which seems unneeded ) and expecting postgres has some kind of magic to avoid burning the xids. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] DB access speeds, App(linux)-PG(linux) vs App(linux) -MSSql(Windows)

2015-06-24 Thread Francisco Olarte
, and if this is a problem to you, you should look for optimizing the common path firsts, things like how many roundtrips each PROTOCOL needs for the small query and other similar. You should measure before. Requester is not normally going to be your big problem. Francisco Olarte. -- Sent via pgsql-general

Re: [GENERAL] double precision[] storage space questions

2015-06-12 Thread Francisco Olarte
be greatly surprised that any database stores an array ( which can be multidimensional, I do not know if other databases have single dimensional array types ) in a more compact way than an specialized serialization format for one dimensional double arrays. Francisco Olarte. -- Sent via pgsql-general

Re: [GENERAL] Planner cost adjustments

2015-06-11 Thread Francisco Olarte
of the first record in the wire a hundred times, which was nice since the short table was wide and I only needed 3 short fields from the second one, and that made the first query run at wire speed and the second at disk speed ). Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] select count(*);

2015-06-11 Thread Francisco Olarte
it seems to be done, would be nice. And, as I said, * only means the columns in a select, I think on no from Pg may be generating a fake one row table to satisfy the requirements ( maybe not, but is one easy way to make this work given how select is explained to work in the docs ). Francisco Olarte

Re: [GENERAL] Efficient sorting the results of a join, without denormalization

2015-06-01 Thread Francisco Olarte
Hi Glen: On Mon, Jun 1, 2015 at 1:16 AM, Glen M. Witherington g...@fea.st wrote: Thanks Francisco, that makes sense. I've started moving my code to that, and it eliminates all the performance issues I had. Happty to hear it. Seems you have a kind of speed-size trade off. If you can solve

Re: [GENERAL] Efficient sorting the results of a join, without denormalization

2015-05-31 Thread Francisco Olarte
(Glen, PGlist) and message (Glen,PGlist,27), different from (Glen,Inbox,27) or (Glen, PgList,28) or (Francisco,PgList,27) ( Where the 'tuples' I've printed are the PK values ). This has a lot of advantages, which you pay for in other ways, like redundancies, but having composite primary keys

Re: [GENERAL] How to retrieve Comment text using SQL, not psql?

2015-05-31 Thread Francisco Olarte
with versions, but you can always port them touse the information_schema ( http://www.postgresql.org/docs/9.4/static/information-schema.html ) which should be a little more stable. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] FW: Constraint exclusion in partitions

2015-05-26 Thread Francisco Olarte
there. Francisco Olarte. -- 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] MD5 password storage - should be the same everywhere?

2015-05-26 Thread Francisco Reyes
On 05/25/2015 07:58 PM, Adrian Klaver wrote: On 05/25/2015 01:41 PM, Francisco Reyes wrote: I understood that is just a md5 hash of the password and the username with the string md5 pre-appended, so it should be the same. Mistery solved.. Because I usually do script of most of my work

<    1   2   3   4   5   6   >