Re: Getting rid of "tuple concurrently updated" elog()s with concurrent DDLs (at least ALTER TABLE)

2017-12-25 Thread Andres Freund
On December 26, 2017 5:55:03 AM GMT+01:00, Michael Paquier wrote: >Hi all, > >Triggering "tuple concurrently updated" from heapam.c, which is an >elog(), >is not that difficult for some DDL commands. For example with ALTER >ROLE, >just create a role: >psql --no-psqlrc -c 'create role popo' > >A

Ethiopian calendar year(DATE TYPE) are different from the Gregorian calendar year

2017-12-25 Thread Lelisa Diriba
In Ethiopia the year have 13 months and but in Gregorian calendar the year have 12 months, The Ethiopian society's are want to use his Ethiopian calendar year,i have the algorithm, but the way i add to the postgresql source code as EXTENSION? or to the backend(to kernel)? 13th month have 5 days and

Deadlock in multiple CIC.

2017-12-25 Thread Jeff Janes
c3d09b3bd23f5f6 fixed it so concurrent CIC would not deadlock (or at least not as reliably as before) by dropping its own snapshot before waiting for all the other ones to go away. With commit 8aa3e47510b969354ea02a, concurrent CREATE INDEX CONCURRENTLY on different tables in the same database sta

Getting rid of "tuple concurrently updated" elog()s with concurrent DDLs (at least ALTER TABLE)

2017-12-25 Thread Michael Paquier
Hi all, Triggering "tuple concurrently updated" from heapam.c, which is an elog(), is not that difficult for some DDL commands. For example with ALTER ROLE, just create a role: psql --no-psqlrc -c 'create role popo' And then run that in two sessions and the error will show up, triggered from Cata

Re: AS OF queries

2017-12-25 Thread Masahiko Sawada
On Thu, Dec 21, 2017 at 3:57 AM, Alvaro Hernandez wrote: > > > On 20/12/17 14:48, Konstantin Knizhnik wrote: > > > > On 20.12.2017 16:12, Laurenz Albe wrote: > > Konstantin Knizhnik wrote: > > I wonder if Postgres community is interested in supporting time travel > queries in PostgreSQL (something

Re: [HACKERS] Replication status in logical replication

2017-12-25 Thread Masahiko Sawada
On Tue, Dec 26, 2017 at 1:10 AM, Petr Jelinek wrote: > On 21/11/17 22:06, Masahiko Sawada wrote: >> >> After investigation, I found out that my previous patch was wrong >> direction. I should have changed XLogSendLogical() so that we can >> check the read LSN and set WalSndCaughtUp = true even aft

Re: How to Works with Centos

2017-12-25 Thread Michael Paquier
On Mon, Dec 25, 2017 at 06:48:09PM -0500, Jaime Casanova wrote: > so you have two options: > > 1) use the packages from yum.postgresql.org for a supported version > 2) get commercial support for your out-of-community-support verssion > > but even if you do 2, that would be a preparatory step loo

Re: How to Works with Centos

2017-12-25 Thread Jaime Casanova
On 25 December 2017 at 09:39, Benyamin Guedj wrote: > > Upon doing so, our DevOps team in response insisted (and still insists) that > we keep using version 9.2 as it is part of the Centos 7 distribution, and > they believe that version to be “best practice”, even though PostgreSQL 9.2 > is no lon

How to Works with Centos

2017-12-25 Thread Benyamin Guedj
Hello, The company I’m working for develops a product which uses Centos 6/7 (different versions of the product) and also uses Vertica and PostgreSQL. During the course of the development of the latest version of our product, we ran into problems that lead us to contact Vertica’s R&D team, which

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2017-12-25 Thread Erik Rijkers
That indeed fixed the problem: running that same pgbench test, I see no crashes anymore (on any of 3 different machines, and with several pgbench parameters). Thank you, Erik Rijkers

Re: Unique indexes & constraints on partitioned tables

2017-12-25 Thread Alvaro Herrera
Amit Langote wrote: > Have you considered what happens when ON CONFLICT code tries to depend on > such an index (a partitioned unique index)? Not yet, but it was on my list of things to fix. Thanks for working on it -- I'll be reviewing this soon. > +create table parted_conflict_test_2 partitio

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2017-12-25 Thread Tomas Vondra
On 12/24/2017 10:00 AM, Erik Rijkers wrote: > > logical replication of 2 instances is OK but 3 and up fail with: > > TRAP: FailedAssertion("!(last_lsn < change->lsn)", File: > "reorderbuffer.c", Line: 1773) > > I can cobble up a script but I hope you have enough from t

Re: General purpose hashing func in pgbench

2017-12-25 Thread Fabien COELHO
Hello, However, the key can be used if controlled so that different values do not have the same randomization in different part of the script, so as to avoid using the same patterns for different things if not desirable. Original murmur algorithm accepts seed as a parameter, which can be used

Re: [HACKERS] Replication status in logical replication

2017-12-25 Thread Petr Jelinek
On 21/11/17 22:06, Masahiko Sawada wrote: > > After investigation, I found out that my previous patch was wrong > direction. I should have changed XLogSendLogical() so that we can > check the read LSN and set WalSndCaughtUp = true even after read a > record without wait. Attached updated patch pas

Re: compress method for spgist - 2

2017-12-25 Thread Teodor Sigaev
Now, this patch is ready for committer from my point of view. Thank you, pushed -- Teodor Sigaev E-mail: teo...@sigaev.ru WWW: http://www.sigaev.ru/

Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2017-12-25 Thread Petr Jelinek
Hi, thanks for writing the patch. On 05/12/17 06:58, Craig Ringer wrote: > Hi all > > [...] >> The cause appears to be that walsender.c's ProcessRepliesIfAny writes a > LOG for unexpected EOF then calls proc_exit(0). But  serialized txn > cleanup is done by  > ReorderBufferRestoreCleanup, as cal

Re: General purpose hashing func in pgbench

2017-12-25 Thread Ildar Musin
25/12/2017 17:12, Fabien COELHO пишет: > > However, the key can be used if controlled so that different values do > not have the same randomization in different part of the script, so as > to avoid using the same patterns for different things if not desirable. Original murmur algorithm accepts see

Re: genomic locus

2017-12-25 Thread Teodor Sigaev
I think I can wrangle this type into GiST just by tweaking consistent(), union(), and picksplit(), if I manage to express my needs in C without breaking too many things. My first attempt segfaulted. Actually, consistent() can determ actual query data type by strategy number. See examples in l

Re: [HACKERS] Flexible configuration for full-text search

2017-12-25 Thread Aleksandr Parfenov
Hi Arthur, Thank you for the review. On Thu, 21 Dec 2017 17:46:42 +0300 Arthur Zakirov wrote: > I noticed that there are typos in the documentation. And I think it > is necessary to keep information about previous sintax. The syntax > will be supported anyway. For example, information about TSL

Re: General purpose hashing func in pgbench

2017-12-25 Thread Fabien COELHO
Hello, I noticed from the source of all human knowledege (aka Wikipedia:-) that there seems to be a murmur3 successor. Have you considered it? One good reason to skip it would be that the implementation is long and complex. I'm not sure about a 8-byte input simplified version. Murmur2 naturall

Re: General purpose hashing func in pgbench

2017-12-25 Thread Ildar Musin
Hello Fabien, 24/12/2017 11:12, Fabien COELHO пишет: > > Yep. The ugliness is significantly linked to the choice of name. With > MM2_MUL and MM2_ROT ISTM that it is more readable: > >>     k *= MM2_MUL; >>     k ^= k >> MM2_ROT; >>     k *= MM2_MUL; >>     result ^= k; >>     result *= MM2_MUL; O

Re: Unique indexes & constraints on partitioned tables

2017-12-25 Thread Amit Langote
Hi Alvaro, On 2017/12/23 6:29, Alvaro Herrera wrote: > Hello, > > I'm giving this patch its own thread for mental sanity, but this is > essentially what already posted in [1], plus some doc fixes. This patch > depends on the main "local partitioned indexes" in that thread, last > version of whic

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-12-25 Thread Amit Langote
On 2017/12/25 13:52, Amit Langote wrote: > Hi Alvaro, > > On 2017/12/23 0:10, Alvaro Herrera wrote: >> I believe these are all fixed by the attached delta patch. > > @@ -1676,7 +1694,12 @@ psql_completion(const char *text, int start, int end) > "UNION SELECT 'A

Re: Huge backend memory footprint

2017-12-25 Thread Konstantin Knizhnik
On 22.12.2017 16:21, Andres Freund wrote: Hi, On 2017-12-22 16:07:23 +0300, Konstantin Knizhnik wrote: While my experiments with pthreads version of Postgres I find out that I can not create more than 100k backends even at the system with 4Tb of RAM. I don't think this is a problem we need t

Re: AS OF queries

2017-12-25 Thread Konstantin Knizhnik
On 25.12.2017 06:26, Craig Ringer wrote: On 24 December 2017 at 04:53, konstantin knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: But what if I just forbid to change recent_global_xmin? If it is stalled at FirstNormalTransactionId and never changed? Will it protect all versio