Re: [GENERAL] Install pgAudit extension

2016-12-05 Thread Devrim Gündüz
Hi, On Tue, 2016-12-06 at 05:44 +, Dylan Luong wrote: > I need some advice on installing the pgAudit extension as I am new to > PostgreSQL extenstions. Looks like you installed PostgreSQL via community RPMS, so: https://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgaudit_95-1.0.4-1.rhel6.x8

Re: [GENERAL] Migrating data from DB2 zOS to PostgreSQL

2016-12-05 Thread Julien Rouhaud
On Tue, Dec 06, 2016 at 11:06:12AM +0530, Swapnil Vaze wrote: > Hello, > Hello > We need some help on how we can migrate data from DB2 zOS database to > postgres database. > > Are there any utilities present? Any thoughts how we should approach? You can use this utility: https://github.com/dal

Re: [GENERAL] Install pgAudit extension

2016-12-05 Thread John R Pierce
On 12/5/2016 9:44 PM, Dylan Luong wrote: As I have Postrgres9.5 installed and downloaded the zip file (pgaudit-REL9_5_STABLE.zip), I assume I only have to perform steps 7 and 8. if you installed postgres from the yum.postgresql.org repository, try... yum install pgaudit_95 https://yum.p

[GENERAL] Install pgAudit extension

2016-12-05 Thread Dylan Luong
Hi I need some advice on installing the pgAudit extension as I am new to PostgreSQL extenstions. I currently have Postgres95 on Linux Redhat 6.8 running on the server and I need to test out the pgAudt extension. I downloaded the file pgaudit-REL9_5_STABLE.zip from https://github.com/pgaudit/pg

[GENERAL] Migrating data from DB2 zOS to PostgreSQL

2016-12-05 Thread Swapnil Vaze
Hello, We need some help on how we can migrate data from DB2 zOS database to postgres database. Are there any utilities present? Any thoughts how we should approach? -- Thanks & Regards, Swapnil Vaze

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Joseph Brenner
Well yeah, trying to run a PAGER that's not there might throw an error. Or you know, nothing in PAGER might imply "pager off". > I find it a bit odd that all of your queries were using the pager...did I > miss where you reported that setting? I didn't report it because I wasn't looking in that d

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread David G. Johnston
On Mon, Dec 5, 2016 at 9:53 PM, Joseph Brenner wrote: > And I guess I did that intentionally, my .bashrc has > > # I use emacs shells, I got a "pager" already: > export PAGER='' > > ​PAGER= psql --pset=pager=always -c 'select 1;'​ Remove PAGER= and I'm good. I guess that psql could be a bi

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Joseph Brenner
And I guess I did that intentionally, my .bashrc has # I use emacs shells, I got a "pager" already: export PAGER='' On Mon, Dec 5, 2016 at 8:52 PM, Joseph Brenner wrote: > Wait, that's not quite right. The user 'postgres' has no PAGER envar, > but user 'doom' has an empty value: > > PAGER=

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Joseph Brenner
Wait, that's not quite right. The user 'postgres' has no PAGER envar, but user 'doom' has an empty value: PAGER= On Mon, Dec 5, 2016 at 8:50 PM, Joseph Brenner wrote: >> So what does: >> >> env | grep PAGER >> >> show? > > Nothing. I have no PAGER settting (I don't normally use one). > > > On

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Joseph Brenner
> So what does: > > env | grep PAGER > > show? Nothing. I have no PAGER settting (I don't normally use one). On Mon, Dec 5, 2016 at 5:33 PM, Adrian Klaver wrote: > On 12/05/2016 05:13 PM, Joseph Brenner wrote: > > >> I just went around temporarily undoing things I did while >> straigtening up,

Re: [GENERAL] WAL File archive time

2016-12-05 Thread Michael Paquier
On Tue, Dec 6, 2016 at 7:24 AM, Israel Brewster wrote: > Simple question: are WAL files archived when full, or when recycled? When full. > That is, are the WAL archive files "up-to-date" other than the current WAL > file, > or will the archives always be wal_keep_segments behind? WAL archives

Re: [GENERAL] Index size

2016-12-05 Thread Melvin Davidson
On Mon, Dec 5, 2016 at 8:06 PM, Samuel Williams < space.ship.travel...@gmail.com> wrote: > Melvin, uh... I'm a software engineer... since when was it a problem to > want to know how things work and why they are different? If you have > nothing to contribute of a relevant technical nature, please d

Re: [GENERAL] Index size

2016-12-05 Thread Joshua D. Drake
On 12/03/2016 03:57 PM, Samuel Williams wrote: With some indexes, it looks like MySQL might not be adding all data to the index (e.g. ignoring NULL values). Does MySQL ignore null values in an index? Can we get the same behaviour in Postgres to minimise usage? What would be the recommendation he

[GENERAL] Streaming Replication delay getting bigger

2016-12-05 Thread Patrick B
Hi guys, I've got some database servers in USA (own data center) and also @ AWS Japan. *USA:* master01 slave01 (Streaming Replication from master01 + wal_files) slave02 (Streaming Replication from master01 + wal_files) *Japan: (Cascading replication)* slave03 (Streaming Replication from slave02

[GENERAL] Does PostgreSQL support BIM(Building Information Modeling) storage?

2016-12-05 Thread sunpeng
Does PostgreSQL support BIM(Building Information Modeling) storage?Or how? I can only find few infomation: http://repository.tudelft.nl/islandora/object/uuid:dcb7fc18-208c-4e3b-bc2a-d24a2346d44b?collection=research Are there any other articles/books/software recommended? Thanks! peng

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Tom Lane
Joseph Brenner writes: > Okay: I think I'm closing in on the trouble. I didn't used to > have a ~/.psqlrc file, but recently I experimented with > creating one. When I have a .psqlrc file containing the magic > incantaion >\pset pager off > *Then* everything works. Ah! So, most likely, t

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Adrian Klaver
On 12/05/2016 05:13 PM, Joseph Brenner wrote: I just went around temporarily undoing things I did while straigtening up, and I find there's one thing I can do that consistently breaks things: removing my new ~/.psqlrc file. In fact, it appears that I need to have a file that exists and contains

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread David G. Johnston
On Mon, Dec 5, 2016 at 6:13 PM, Joseph Brenner wrote: > Another oddity I noticed is that I expected that the .psqlrc > file would not be read at all when using the --command feature, > but instead I would see messaging that indicated the commands > in there were being executed ​New behavior in

Re: [GENERAL] Select works only when connected from login postgres

2016-12-05 Thread Joseph Brenner
Okay: I think I'm closing in on the trouble. I didn't used to have a ~/.psqlrc file, but recently I experimented with creating one. When I have a .psqlrc file containing the magic incantaion \pset pager off *Then* everything works. All three of my extant postgresql installations work correc

Re: [GENERAL] Index size

2016-12-05 Thread Samuel Williams
Melvin, uh... I'm a software engineer... since when was it a problem to want to know how things work and why they are different? If you have nothing to contribute of a relevant technical nature, please don't reply, I'm really not interested.

[GENERAL] WAL File archive time

2016-12-05 Thread Israel Brewster
Simple question: are WAL files archived when full, or when recycled? That is, are the WAL archive files "up-to-date" other than the current WAL file, or will the archives always be wal_keep_segments behind?---Israel BrewsterSystems Analyst IIRavn Alaska52

Re: [GENERAL] Transaction lock granting order

2016-12-05 Thread Joshua Ma
Thanks a bunch Tom, appreciate the quick response. On Mon, Dec 5, 2016 at 12:33 PM, Tom Lane wrote: > Joshua Ma writes: > > Can someone point me to documentation on (or confirm) this detail on > > Postgres locking? > > > - Transaction X starts and acquires a lock on a table T > > - Transaction

Re: [GENERAL] Transaction lock granting order

2016-12-05 Thread Tom Lane
Joshua Ma writes: > Can someone point me to documentation on (or confirm) this detail on > Postgres locking? > - Transaction X starts and acquires a lock on a table T > - Transaction Y starts and attempts to acquire a conflicting lock on T - it > is now blocked > - Transaction Z starts and also a

[GENERAL] Transaction lock granting order

2016-12-05 Thread Joshua Ma
Can someone point me to documentation on (or confirm) this detail on Postgres locking? - Transaction X starts and acquires a lock on a table T - Transaction Y starts and attempts to acquire a conflicting lock on T - it is now blocked - Transaction Z starts and also attempts to acquire a conflictin

Re: [GENERAL] INSERT - UPDATE throughput oscillating and SSD activity after stopping the client

2016-12-05 Thread Jeff Janes
On Fri, Dec 2, 2016 at 9:40 AM, Tom DalPozzo wrote: > Hi, > I've two tables, t1 and t2, both with one bigint id indexed field and one > 256 char data field; t1 has always got 1 row, while t2 is increasing as > explained in the following. > > My pqlib client countinously updates one row in t1

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-05 Thread Rich Shepard
On Sun, 4 Dec 2016, Martin Collins wrote: The problem with kexi is that it does not run on Microsoft OSes which is what my clients use. There is a Windows package in the works, apparently. Version 3 already builds on Windows. Martin, However, it is highly unlikely that my clients (all

Re: [GENERAL] Postgres Traffic accounting

2016-12-05 Thread basti
I have try the network-analyzer-for-postgresql but I get no data. On 05.12.2016 14:12, Achilleas Mantzios wrote: > On 05/12/2016 14:35, William Ivanski wrote: >> >> Does it need to be done by listening to network packets? You can get >> statistics by query and user with pgbadger. >> > I guess he'

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-05 Thread Martin Collins
On 04/12/16 17:54, Rich Shepard wrote: > >The problem with kexi is that it does not run on Microsoft OSes which is > what my clients use. There is a Windows package in the works, apparently. Version 3 already builds on Windows. > I'm also seriously looking at peewee, which is an ORM simpler >

[GENERAL] How to config start/stop scripts in a different data dir for CentOS7/systemctl/PG9.6

2016-12-05 Thread Edilmar LISTAS
Hi, I do these steps to config Postgresql 9.6 in CentOS 6.x using a different data directory: yum -y install postgresql96-server postgresql96-contrib pg_top96 chkconfig postgresql-9.6 on service postgresql-9.6 initdb service postgresql-9.6 start echo "localhost:5432:*:postgres:mypass" > ~/.pgpa

Re: [GENERAL] Bad query? Or planner?

2016-12-05 Thread Devin Smith
Correct. There is no WHERE filter in the first query. The JOIN condition from the first query was moved into a WHERE filter in the second query (enabled by LATERAL). Both have the same ordering applied with a limit of 1. I chatted with a couple users in the IRC channel, and I think I got the conse

Re: [GENERAL] Postgres Traffic accounting

2016-12-05 Thread basti
I have try the network-analyzer-for-postgresql but I get no data. On 05.12.2016 14:12, Achilleas Mantzios wrote: > On 05/12/2016 14:35, William Ivanski wrote: >> >> Does it need to be done by listening to network packets? You can get >> statistics by query and user with pgbadger. >> > I guess he'd

Re: [GENERAL] INSERT - UPDATE throughput oscillating and SSD activity after stopping the client

2016-12-05 Thread Tom DalPozzo
I tried to tune some parameters without appreciable changes in this behaviour. I tried to play with: checkpoint timeout wal size shared buffers commit delay checkpoijnt completion target No meaningful info found in the log file. Regards 2016-12-04 4:02 GMT+01:00 Tomas Vondra : > On Fri, 2016-

Re: [GENERAL] postgres pg_restore append data

2016-12-05 Thread Melvin Davidson
On Mon, Dec 5, 2016 at 4:36 AM, dhanuj hippie wrote: > Hi, > I have a pg backup created using pg_dump custom format. I'm trying to > restore into a DB which already has some data, using pg_restore data-only. > This fails in scenarios where same data (some rows) is present in DB as > well as dump.

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-05 Thread Rich Shepard
On Mon, 5 Dec 2016, Johann Spies wrote: Web2py is another (and maybe simpler) alternative to Django. Johann, Thank you. I'll look at it. Rich -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgs

Re: [GENERAL] Postgres Traffic accounting

2016-12-05 Thread basti
As I can see pgbadger is a log Analyzer. I need to know how many traffic (in kb or mb) does a query produce. On 05.12.2016 13:35, William Ivanski wrote: > Does it need to be done by listening to network packets? You can get > statistics by query and user with pgbadger. > > > Em 9h41 Seg, 05/12/

Re: [GENERAL] Postgres Traffic accounting

2016-12-05 Thread Achilleas Mantzios
On 05/12/2016 14:35, William Ivanski wrote: Does it need to be done by listening to network packets? You can get statistics by query and user with pgbadger. I guess he'd have to use some tool like this : https://www.vividcortex.com/resources/network-analyzer-for-postgresql https://www.vividco

Re: [GENERAL] Postgres Traffic accounting

2016-12-05 Thread William Ivanski
Does it need to be done by listening to network packets? You can get statistics by query and user with pgbadger. Em 9h41 Seg, 05/12/2016, basti escreveu: > Hallo, > > I have to try traffic accounting for postgres using tcpdump and nfdump. > I can see what traffic is produced but cant see the que

[GENERAL] Postgres Traffic accounting

2016-12-05 Thread basti
Hallo, I have to try traffic accounting for postgres using tcpdump and nfdump. I can see what traffic is produced but cant see the query / activity who do it. because there is an ssl connection. use plain text is not an option. I also try to use tcap-postgres. this does not compile on my server a

Re: [GENERAL] count(*) in binary mode returns 0

2016-12-05 Thread Daniel Verite
imagene...@gmail.com wrote: > nfields: 1 > from_psql bytes_to_read:4 read:4 > host_order bytes_to_read:4 read:4 > conv_int ir:0 Note that count(*) produces a bigint (8 bytes), not an int (4 bytes). => select pg_typeof(coun

Re: [GENERAL] Extensions and privileges in public schema

2016-12-05 Thread Charles Clavadetscher
Hello > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Paul Ramsey > Sent: Sonntag, 4. Dezember 2016 22:24 > To: Lee Hachadoorian > Cc: pgsql-general > Subject: Re: [GENERAL] Extensions and privileges in public sc

[GENERAL] postgres pg_restore append data

2016-12-05 Thread dhanuj hippie
Hi, I have a pg backup created using pg_dump custom format. I'm trying to restore into a DB which already has some data, using pg_restore data-only. This fails in scenarios where same data (some rows) is present in DB as well as dump. Is there a way to ignore such rows and proceed with restoring th