[GENERAL] pg_column_size strange result...

2017-08-16 Thread marin
Hi, I was calculating row sizes with pg_column_size and came to this strange result: CREATE TABLE t1( c1 NUMERIC(10,7) NOT NULL DEFAULT 123.1234567 ); INSERT INTO t1(c1) VALUES (DEFAULT); SELECT pg_column_size(c1) AS first, pg_column_size(123.1234567::NUMERIC(10,7)) as second, c1 = 123

[GENERAL] Checking data checksums...

2016-12-16 Thread marin
Hi, I enabled data checksums (initdb --data-checksums) on a new instance and was wandering is there a command in the psql console, or from the linux console, to force a checksum check on the entire cluster and get error reports if it finds some corrupted pages. Regards, Mladen Marinović --

[GENERAL] pg_rewind rewinded too much...

2016-11-29 Thread marin
Hi, I am doing some testing with pg_rewind and I encountered a very strange situation. So, let me describe the scenario: 1. Create a master (server1) node (max_wal_size = 2GB, checkpoint_timeout = 10min) 2. Create a test database on it (server1) 3. Create a test table (server1) 4. Insert a c

[GENERAL] pg_rewind and WAL size...

2016-11-22 Thread marin
Hi, I did a series of test to see the WAL size impact of enabling data checksums/wal_log_hints on our databases (so that we can use pg_rewind to fix split brain situations). Having a set of servers available the last few days I did a few tests. Here are the results: No data checksums and wal

Re: [GENERAL] Slave promotion problem...

2015-09-04 Thread marin
On 2015-08-31 16:05, ma...@kset.org wrote: On 2015-08-31 14:38, Martín Marqués wrote: El 31/08/15 a las 03:29, ma...@kset.org escribió: Last week we had some problems on the master server which caused a failover on the slave (the master was completely unresponsive due to reasons still unknown).

Re: [GENERAL] Slave promotion problem...

2015-08-31 Thread marin
On 2015-08-31 14:38, Martín Marqués wrote: El 31/08/15 a las 03:29, ma...@kset.org escribió: Last week we had some problems on the master server which caused a failover on the slave (the master was completely unresponsive due to reasons still unknown). The slave received the promote signal (pg_c

[GENERAL] Slave promotion problem...

2015-08-30 Thread marin
Last week we had some problems on the master server which caused a failover on the slave (the master was completely unresponsive due to reasons still unknown). The slave received the promote signal (pg_ctl promote) and logged that in the logs: 2015-08-28 23:05:10 UTC [6]: [50-1] user=,db= LOG:

Re: [GENERAL] Missing WALs when doing pg_basebackup from slave...

2015-06-11 Thread marin
On Thu, 11 Jun 2015 14:48:44 +1000, Venkata Balaji N wrote: > On Wed, Jun 10, 2015 at 6:47 PM, wrote: > Is it normal that pg_basebackup runs successfully (rc=0) and there is no > WAL files present? > > Yes, it is normal. "pg_basebackup" ensures that required WALs are backed > along with the da

[GENERAL] Missing WALs when doing pg_basebackup from slave...

2015-06-10 Thread marin
I have been testing a master slave configuration of PostgreSQL 9.4.2 using streaming replciation. The master is initialised with a blank database and the slave is created with a pg_start_backup()/rsync/pg_stop_backup() procedure. The slave connects to the master and works flawlessly. For testing pu

Re: [GENERAL] 9.3 view / cross join / flat table solution

2014-10-19 Thread marin
On Sat, 18 Oct 2014 12:13:00 -0700, Wells Oliver wrote: > Hi everyone. I have a view setup like so: > screate view myview asselectdepartment,employee_id, > report_status,sum(reports) reportsfrom logger.reportsgroup by > department, employee_id, report_statu; > Which gives me the tot

Re: [GENERAL] Row number estimation...

2014-10-18 Thread marin
On Sat, 18 Oct 2014 11:34:18 -0400, Tom Lane wrote: > If the comparison value is outside the range recorded in the histogram, > and there's a suitable index available, the planner uses the index to > find out the actual column min or max rather than believing the histogram > completely. See get

[GENERAL] Row number estimation...

2014-10-18 Thread marin
Hi, Yesterday I was trying to calculate by hand the row number estimates using the examples from http://www.postgresql.org/docs/9.3/static/row-estimation-examples.html It is usually correct, except when you try to get an estimate near the first (or last) histogram bound. Let me demonstrate with an

[GENERAL] Migrate Postgres 7.2 to Postgres 8.1

2006-06-02 Thread Marin Alonso, David
Hi all   All people have advised me that I should migrate my database Postgres 7.2.2   PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2 20020903 ( Red Hat Linux 8.0 3.2-7)   to new version 8.1.4.   I have downloaded postgresql-8.1.4-1PGDG.i686.rpm postgresql-co

[GENERAL] BLOB

2001-10-17 Thread Benny Marin
Hello, Can someone tell me how to work with large objects ? All I want to do is to store an image into my database and retrieve them back. What datatype do I have to use? What is the sql statement to send a image to the database and how can I retrieve it back. I'm using php or VB. Thanks -

Re: [GENERAL] Q: How to convert int to date?

1998-06-23 Thread Marin D
on... ->how do I convert these integer dates to date dates? -> I would propose to modify your table with DATE column, dump your old table, write a script modifying the 980622 to 98-06-22 and import it back in the new table or write your own function dealing with such 'dates' Best

Re: [GENERAL] Foreign Keys

1998-06-09 Thread Marin D
PGSRC_DIR/contrib/spi/refint* is the answer Marin -= Why do we need gates in a world without fences? =- On Mon, 8 Jun 1998, ENTER YOU NAME HERE wrote: > Hi all > I am using PostgreSQL as part of my MSc project. Because it is an > object-relational databas

Re: [GENERAL] A couple of LIBPQ questions

1998-06-07 Thread Marin D
ght be. Where can I find a list of the > options? > > The source says this is for setting backend options for this connection. man postgres to see the backend options. Hope this helps.. Marin -= Why do we need gates in a world without fences? =-

Re: [GENERAL] SQL Where Statement

1998-06-07 Thread Marin D
NOT LIKE ('a'..'z') SELECT * FROM somewhere WHERE lastname !~ '[A-Z]' AND lastname !~ '[a-z]'; will INCLUDE the fields that *don't* start with A-Za-z while SELECT * FROM somewhere WHERE lastname ~ '[A-Z]' AND lastname ~ '[a

Re: [GENERAL] A couple of LIBPQ questions

1998-06-07 Thread Marin D
On Sat, 6 Jun 1998, Marin D wrote: > > > > > (2) I noticed there are some C++ classes in /usr/include/libpq++ which > > look similar to code I'm writing for my own education and use. Is there > > any documentation which deals with these classes?

[GENERAL] European/American dates

1998-06-03 Thread Marin D
Why does postgres (started *without* "-o -e") accept dates like "21-2-98" which is not (is it?) a valid American date? Thanx for the attention! Marin -= Why do we need gates in a world without fences? =-

[GENERAL] no shared libs

1998-05-31 Thread Marin D
6.2.1 release Pleaz give me some hint as I need Postgres working ASAP Thanx for the attention! Marin -= Why do we need gates in a world without fences? =-

Re: [GENERAL] GRANT/REVOKE problems

1998-05-25 Thread Marin D
It doesnt make difference for postgres user. The result is the same for any user... Marin -= Why do we need gates in a world without fences? =- On Mon, 25 May 1998, Jose' Soares Da Silva wrote: > > Do you want revoke all previleges from postgres? > Reme