Update blocking another update

2018-01-11 Thread Sachin Kotwal
Hi All, As update operation is "ROW Exclusive" It should not block another update operation. In below case we are updating all values for in one column. It is blocking another update operations. It this expected behavior ? Please clarify . 1. Setup database by initializing with pgbench with so

Moving from pgFouine to pgBadger Issue with Total query duration metric

2018-01-11 Thread Sreekanth Palluru
Hi , I am moving from pgFouine to pgBadger. When I compare the reports I see that there is major difference in time reported by metric *Total query duration* for given same postgres server log file.( excuse me for not sharing the postgres server logfile ) pgfouine reports around 2hrs where as pgBad

Re: characters converted to ??? in postgres

2018-01-11 Thread armand pirvu
Hi Peter The -n flag worked fine on OS X. I don’t have this issue on Centos. As a side question I wonder why was postgres built with libedit instead of libreadline , just curious. Back to my developer issue , he is using what he calls a data object in java. Apparently this is the place where th

Re: Updating a pre-10 partitioned table to use PG 10 partitioning

2018-01-11 Thread Michael Paquier
On Thu, Jan 11, 2018 at 04:40:30PM +0100, Alban Hertroys wrote: > What is a good approach here? By having a some point an origin and target table in the same cluster, you would just need to define things properly. I have not checked, but perhaps this is the kind of use cases where pg_partman (http

Re: Missing WAL file after running pg_rewind

2018-01-11 Thread Michael Paquier
On Thu, Jan 11, 2018 at 04:58:02PM +, Dylan Luong wrote: > The steps I took were: > > 1. Stop all watchdogs > > 2. Start/stop the old master > > 3. Run 'checkpoint' on new master > > 4. Run the pg_rewind on old master to resync with new master > > 5. Start the

Re: characters converted to ??? in postgres

2018-01-11 Thread Peter Eisentraut
On 1/11/18 16:34, armand pirvu wrote: > On OS X: > - case 1 fails > testdb=# insert into jt1 values ('??') ; > ERROR: invalid byte sequence for encoding "UTF8": 0xe2 0xa4 0x27 > Note that at paste time ≤ changed in ?? This looks like something is wrong with your libedit library. Try running psq

characters converted to ??? in postgres

2018-01-11 Thread armand pirvu
Hi all, Got the following thing : ≠, ≤, and ≥ store in the database as question marks according to one of my developers. I have postgres installed on both MAC OS X and Centos 7 All locale on both point to UTF8 LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US

RE: Updating a pre-10 partitioned table to use PG 10 partitioning

2018-01-11 Thread Igor Neyman
-Original Message- From: Alban Hertroys [mailto:haram...@gmail.com] Sent: Thursday, January 11, 2018 10:41 AM To: Postgres General Subject: Updating a pre-10 partitioned table to use PG 10 partitioning I'm trying to update an existing table that was created in PG9.6 using the old approac

Re: Multiple central connection service files

2018-01-11 Thread David G. Johnston
On Thu, Jan 11, 2018 at 9:23 AM, Curt Tilmes wrote: > The convention that many utilities that use such a config file have > adopted is allowing an additional > directory where more config sections are found, e.g. > $PGSYSCONFDIR/pg_service.conf.d/* > ​I already do this via configuration manageme

Missing WAL file after running pg_rewind

2018-01-11 Thread Dylan Luong
Hi We had a failover situation where our monitoring watchdog processes promoted the slave to become the new master. I restarted the old master database to ensure a clean stop/start and performed pg_rewind on the old master to resync with the new master. However, after successful rewind, there w

Multiple central connection service files

2018-01-11 Thread Curt Tilmes
Moving database config descriptions into $PGSYSCONFDIR/pg_service.conf is great, but for a large enterprise, we may have a bunch that are managed independently, it would be nice to have multiple of such files. The convention that many utilities that use such a config file have adopted is allowing

Updating a pre-10 partitioned table to use PG 10 partitioning

2018-01-11 Thread Alban Hertroys
I'm trying to update an existing table that was created in PG9.6 using the old approach with manual inheritance and check constraints to make use of the new approach in PG 10 using 'partitioned by', 'attach partition', etc. I ran into some how-to's on the internet, but they all assume you start pa

Sv: ORDER BY custom type

2018-01-11 Thread Andreas Joseph Krogh
På torsdag 11. januar 2018 kl. 12:00:55, skrev Andreas Joseph Krogh < andr...@visena.com >: Hi all.   I have this custom-type:   CREATE TYPE PERSONTYPE AS ( id BIGINT, firstname VARCHAR, lastname VARCHAR, initialsVARCHAR );   I'm returning a column with this type using

Re: String comparison problem in select - too many results

2018-01-11 Thread Durumdara
Dear Francesco! My "bug" is that I commonly used Windows environment where the default collation is ANSI, based on Windows language which is Hungarian here (Windows1250). But because of special characters we used UTF8 to store data in database. I supposed that UTF8.hu_HU is working like local natu

ORDER BY custom type

2018-01-11 Thread Andreas Joseph Krogh
Hi all.   I have this custom-type:   CREATE TYPE PERSONTYPE AS ( id BIGINT, firstname VARCHAR, lastname VARCHAR, initialsVARCHAR );   I'm returning a column with this type using the following query, which lists activities and its responsible-person (using the PERSONTYPE): SELECT act.entity_id AS

Re: String comparison problem in select - too many results

2018-01-11 Thread Francisco Olarte
On Thu, Jan 11, 2018 at 9:57 AM, Durumdara wrote: > I tried in in different servers, different databases. > 1.) Windows local PG: LC_COLLATE = 'Hungarian_Hungary.1250' - ok. > 2.) Linux remote PG: LC_CTYPE = 'en_US.UTF-8' - also wrong!!! - UTF > problem??? Your problem seems to be you consider w

RE: How Many Partitions are Good Performing

2018-01-11 Thread pinker
yes, it doesn't look good. and it seems that statistics aren't accurate: GroupAggregate (cost=271794.39..330553.67 rows=215630 width=152) (actual time=30.641..37.303 rows=2792 loops=1) -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Parallel Query

2018-01-11 Thread Rafia Sabih
On Thu, Jan 11, 2018 at 12:24 PM, Krithika Venkatesh < krithikavenkates...@gmail.com> wrote: > Hi All, > > I was reading about parallel queries in postgresql 10. > > I came across the property max_parallel_workers_per_gather. It sets the > maximum number of workers that can be started by a single

Re: String comparison problem in select - too many results

2018-01-11 Thread Durumdara
Dear David! I tried in in different servers, different databases. 1.) Windows local PG: LC_COLLATE = 'Hungarian_Hungary.1250' - ok. 2.) Linux remote PG: LC_CTYPE = 'en_US.UTF-8' - also wrong!!! - UTF problem??? 3.) Forcing C collation: - ok 4.) Replace '/' to 'A': - ok select replace('18/0113'