Re: [GENERAL] Major Version Upgradation from 9.4 to 9.6 in Replication Environment

2017-07-25 Thread Jov
Not sure windows,on linux,you can use pg_upgrade hardlink mode and use rsync to achieve this. See 9.6 pg_upgrade doc for detail. Jov 2017年7月26日 5:50 AM,"Amee Sankhesara - Quipment India" < amee.sankhes...@quipment.nl>写道: > [image: Quipment Logo] > > Hello, > > > > We have a windows setup where

[GENERAL] Major Version Upgradation from 9.4 to 9.6 in Replication Environment

2017-07-25 Thread Amee Sankhesara - Quipment India
[Quipment Logo] Hello, We have a windows setup where we have 2 node primary-slave setup which comprises Async Replication + Log Shipping on slave. Now we want to upgrade it from 9.4 to 9.6 version. Do we need to upgrade slave to 9.6, upgrade master to 9.6 and setup replication again from

Re: [GENERAL] How to get transaction started always in WRITE mode.

2017-07-25 Thread rob stone
On Tue, 2017-07-25 at 11:32 +0200, Adam Šlachta wrote: > Hello, >   > In short: Is there any way how to setup PostgreSql 9.6 to always > start a transaction in WRITE mode? >   > Our related configuration: > "default_transaction_isolation" --> "read committed" > "default_transaction_read_only"

Re: [GENERAL] How to get transaction started always in WRITE mode.

2017-07-25 Thread Jerry Sievers
Adam Šlachta writes: > Hello Scott and other potential readers/writers, > > > >> Login to the database with psql as the same user that your java app > connects with try: > >> > >> show default_transaction_read_only; > >> This can be set per-user, it's possible you're

[GENERAL] getting error while parsing log file using pgbadger

2017-07-25 Thread PAWAN SHARMA
Hi All, I am facing below error while parsing log file. [postgres@abc pgaudit]$ pgbadger -f stderr postgres-2017-07-25_121445.csv Can't locate Text/CSV_XS.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl

Re: [GENERAL] How to get transaction started always in WRITE mode.

2017-07-25 Thread Adam Šlachta
Hello Scott and other potential readers/writers, > Login to the database with psql as the same user that your java app connects > with try: > > show default_transaction_read_only; > This can be set per-user, it's possible you're getting tripped up there. show default_transaction_read_only;

Re: [GENERAL] Partitioning (constraint exclusion involving joins)

2017-07-25 Thread Krithika Venkatesh
We understand the constraints exclusion will work only on constant values. But in our case we will never pass a constant value to the partitioning key when we query the partition tables. Will the partition be beneficial in this case. If yes, can you please explain. Thanks On 25-Jul-2017 6:46 PM,

Re: [GENERAL] Partitioning (constraint exclusion involving joins)

2017-07-25 Thread Justin Pryzby
On Tue, Jul 25, 2017 at 06:21:43PM +0530, Krithika Venkatesh wrote: > I have a table that is partitioned on a numeric column (ID). > > Partitioning works when I query the table with no joins. > > SELECT * FROM TABLE A a WHERE ID IN (SELECT ID FROM TABLE B b WHERE > CREATED_TS =

[GENERAL] Partitioning

2017-07-25 Thread Krithika Venkatesh
Hi, I have a table that is partitioned on a numeric column (ID). Partitioning works when I query the table with no joins. SELECT * FROM TABLE A a WHERE ID IN (SELECT ID FROM TABLE B b WHERE CREATED_TS = CURRENT_TIMESTAMP) Partitioning doesn't work when I do join. SELECT A.* FROM TABLE A a

Re: [GENERAL] How to get transaction started always in WRITE mode.

2017-07-25 Thread Scott Mead
On Tue, Jul 25, 2017 at 5:32 AM, Adam Šlachta wrote: > Hello, > > > > In short: Is there any way how to setup PostgreSql 9.6 to always start a > transaction in WRITE mode? > > > > Our related configuration: > > "default_transaction_isolation" --> "read committed" > >

Re: [GENERAL] Row based permissions: at DB or at Application level?

2017-07-25 Thread vinny
On 2017-07-25 11:40, Thomas Güttler wrote: I would like to reduce the "ifing and elsing" in my python code (less conditions, less bugs, more SQL, more performance) Regards, Thomas Güttler A quick brainstorm: You could, probably... but you'd have to create a separate database user for

Re: [GENERAL] Row based permissions: at DB or at Application level?

2017-07-25 Thread Daniel Westermann
>How could an application which gets written from scratch use PostgreSQL to >implement >row based permissions? Are you looking for this? https://www.postgresql.org/docs/9.6/static/ddl-rowsecurity.html Regards Daniel

[GENERAL] Row based permissions: at DB or at Application level?

2017-07-25 Thread Thomas Güttler
I am thinking about rewriting an existing application which uses PostgreSQL via Django (ORM and Web-Framework written in Python). Up to now the permission checks are done at the application level. Up to now queries like: "Show all items which the current user is allowed to modify" result in

[GENERAL] How to get transaction started always in WRITE mode.

2017-07-25 Thread Adam Šlachta
Hello, In short: Is there any way how to setup PostgreSql 9.6 to always start a transaction in WRITE mode? Our related configuration: "default_transaction_isolation" --> "read committed" "default_transaction_read_only" --> "off" Longer description (for those who are interested, since it

Re: [GENERAL] Perfomance of IN-clause with many elements and possible solutions

2017-07-25 Thread Dmitry Lazurkin
On 25.07.2017 05:50, Jeff Janes wrote: It isn't either-or. It is the processing of millions of rows over the large in-list which is taking the time. Processing an in-list as a hash table would be great, but no one has gotten around to it implementing it yet. Maybe Dmitry will be the one to