Re: AS OF queries

2017-12-27 Thread Konstantin Knizhnik
On 27.12.2017 10:29, Craig Ringer wrote: On 25 December 2017 at 15:59, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: On 25.12.2017 06:26, Craig Ringer wrote: On 24 December 2017 at 04:53, konstantin knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: B

Re: Postgres with pthread

2017-12-27 Thread Konstantin Knizhnik
On 21.12.2017 16:25, Konstantin Knizhnik wrote: I continue experiments with my pthread prototype. Latest results are the following: 1. I have eliminated all (I hope) calls of non-reentrant functions (getopt, setlocale, setitimer, localtime, ...). So now parallel tests are passed. 2. I have

Re: [HACKERS] [PATCH] Tap test support for backup with tablespace mapping

2017-12-27 Thread Tels
Dear Vaishnavi, On Tue, December 26, 2017 8:58 pm, Vaishnavi Prabakaran wrote: > Hi All, > > I have added support in Postgres TAP test framework to backup a data > directory with tablespace mapping. Also added support to move the backup > directory contents to standby node, because current option

Re: [PROPOSAL] Shared Ispell dictionaries

2017-12-27 Thread Arthur Zakirov
On Tue, Dec 26, 2017 at 07:03:48PM +0100, Pavel Stehule wrote: > > Tomas had some workable patches related to this topic > Tomas, have you planned to propose it? -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: Tracking of page changes for backup purposes. PTRACK [POC]

2017-12-27 Thread Andrey Borodin
Hi! > 21 дек. 2017 г., в 5:51, Michael Paquier > написал(а): > > On Thu, Dec 21, 2017 at 7:35 AM, Robert Haas wrote: >> On Wed, Dec 20, 2017 at 3:45 PM, Tomas Vondra >> wrote: Isn't more effective hold this info in Postgres than in backup sw? Then any backup sw can use this implemen

Re: Postgres with pthread

2017-12-27 Thread james
> All threads are blocked in semaphores. That they are blocked is inevitable - I guess the issue is that they are thrashing. I guess it would be necessary to separate the internals to have some internal queueing and effectively reduce the number of actively executing threads. In effect make th

Re: Postgres with pthread

2017-12-27 Thread Andres Freund
On December 27, 2017 11:05:52 AM GMT+01:00, james wrote: > > All threads are blocked in semaphores. >That they are blocked is inevitable - I guess the issue is that they >are >thrashing. >I guess it would be necessary to separate the internals to have some >internal queueing and effectively r

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-27 Thread Maksim Milyutin
On 27.12.2017 10:44, Craig Ringer wrote: On 22 December 2017 at 23:19, Maksim Milyutin > wrote: Noticing the interest in the calling some routines on the remote backend through signals, in parallel thread[1] I have proposed the possibility to define user

Re: Tracking of page changes for backup purposes. PTRACK [POC]

2017-12-27 Thread Magnus Hagander
On Thu, Dec 21, 2017 at 1:51 AM, Michael Paquier wrote: > On Thu, Dec 21, 2017 at 7:35 AM, Robert Haas > wrote: > > On Wed, Dec 20, 2017 at 3:45 PM, Tomas Vondra > > wrote: > >>> Isn't more effective hold this info in Postgres than in backup sw? > >>> Then any backup sw can use this implementat

Re: Postgres with pthread

2017-12-27 Thread james
On 27/12/2017 10:08, Andres Freund wrote: Optimizing for this seems like a pointless exercise. If the goal is efficient processing of 100k connections the solution is a session / connection abstraction and a scheduler. Optimizing for this amount of concurrency just will add complexity and sl

Re: Postgres with pthread

2017-12-27 Thread Konstantin Knizhnik
On 27.12.2017 13:08, Andres Freund wrote: On December 27, 2017 11:05:52 AM GMT+01:00, james wrote: All threads are blocked in semaphores. That they are blocked is inevitable - I guess the issue is that they are thrashing. I guess it would be necessary to separate the internals to have some

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

2017-12-27 Thread Hannu Krosing
On 26.12.2017 09:23, Lelisa Diriba wrote: > 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 t

Re: AS OF queries

2017-12-27 Thread Hannu Krosing
On 20.12.2017 14:45, Konstantin Knizhnik wrote: > I wonder if Postgres community is interested in supporting time travel > queries in PostgreSQL (something like AS OF queries in Oracle: > https://docs.oracle.com/cd/B14117_01/appdev.101/b10795/adfns_fl.htm). > As far as I know something similar is n

Re: Add hint about replication slots when nearing wraparound

2017-12-27 Thread Michael Paquier
On Wed, Dec 27, 2017 at 08:47:20AM +0100, Feike Steenbergen wrote: > Changed the block from a note to a caution, Thanks for the new version. - "You might also need to commit or roll back old prepared transactions."))); + "You might also need to commit or roll back old prepared transactions, or d

postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly

2017-12-27 Thread Etsuro Fujita
(2017/04/08 10:28), Robert Haas wrote: > On Wed, Mar 22, 2017 at 6:20 AM, Etsuro Fujita > wrote: >> On 2017/02/22 19:57, Rushabh Lathia wrote: >>> Marked this as Ready for Committer. >> >> I noticed that this item in the CF app was incorrectly marked as Committed. >> This patch isn't committed, s

Re: [HACKERS] Pluggable storage

2017-12-27 Thread Alexander Korotkov
Hi! On Wed, Dec 27, 2017 at 6:54 AM, Haribabu Kommi wrote: > > On Tue, Dec 12, 2017 at 3:06 PM, Haribabu Kommi > wrote: > >> >> I restructured that patch files to avoid showing unnecessary >> modifications, >> and also it will be easy for adding of new API's based on the all the >> functions >>

Comment typo in postgres_fdw.c

2017-12-27 Thread Etsuro Fujita
Here is a small patch for fixing $Subject: s/it's/its/. Best regards, Etsuro Fujita diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index fb65e2e..44db449 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -5115,7 +5

Re: [HACKERS] [PATCH] Lockable views

2017-12-27 Thread Yugo Nagata
On Tue, 26 Dec 2017 22:22:33 +0900 Michael Paquier wrote: > On Tue, Dec 26, 2017 at 06:37:06PM +0900, Yugo Nagata wrote: > > I have created a new entry in CF-2017-1 and registered this thread again. > > Fine for me. Thanks for the update. And I guess that you are planning to > send a new version

Re: AS OF queries

2017-12-27 Thread PostgreSQL - Hans-Jürgen Schönig
On 12/20/2017 01:45 PM, Konstantin Knizhnik wrote: > I wonder if Postgres community is interested in supporting time travel > queries in PostgreSQL (something like AS OF queries in Oracle: > https://docs.oracle.com/cd/B14117_01/appdev.101/b10795/adfns_fl.htm). > As far as I know something similar

Re: [HACKERS] [PATCH] Lockable views

2017-12-27 Thread Yugo Nagata
Hi, Attached is the updated patch. On Mon, 16 Oct 2017 10:07:48 +0900 (JST) Tatsuo Ishii wrote: > >> > It would be nice if the message would be something like: > >> > > >> > DETAIL: Views that return aggregate functions are not lockable > You could add a flag to view_query_is_auto_updatable()

Re: TupleDescCopy doesn't clear atthasdef, attnotnull, attidentity

2017-12-27 Thread Vik Fearing
On 11/29/2017 08:58 AM, Thomas Munro wrote: > Hi hackers, > > Andrew Gierth complained off-list that TupleDescCopy() doesn't clear > atthasdef. Yeah, that's an oversight. The function is new in commit > cc5f81366c36 and was written by me to support "flat" (pointer-free) > tuple descriptors for u

Re: AS OF queries

2017-12-27 Thread Konstantin Knizhnik
On 27.12.2017 17:14, PostgreSQL - Hans-Jürgen Schönig wrote: On 12/20/2017 01:45 PM, Konstantin Knizhnik wrote: I wonder if Postgres community is interested in supporting time travel queries in PostgreSQL (something like AS OF queries in Oracle: https://docs.oracle.com/cd/B14117_01/appdev.101

Re: AS OF queries

2017-12-27 Thread Konstantin Knizhnik
On 27.12.2017 00:52, Jeff Janes wrote: On Thu, Dec 21, 2017 at 6:00 AM, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: There is still one significant difference of my prototype implementation with SQL standard: it associates timestamp with select statement, not with

Re: Deadlock in multiple CIC.

2017-12-27 Thread Jeremy Finzel
On Tue, Dec 26, 2017 at 11:23 AM, Jeff Janes wrote: > On Tue, Dec 26, 2017 at 8:31 AM, Alvaro Herrera > wrote: > >> Jeff Janes wrote: >> > c3d09b3bd23f5f6 fixed it so concurrent CIC would not deadlock (or at >> least >> > not as reliably as before) by dropping its own snapshot before waiting >>

Re: [HACKERS] generated columns

2017-12-27 Thread Peter Eisentraut
On 9/12/17 15:35, Jaime Casanova wrote: > On 10 September 2017 at 00:08, Jaime Casanova > wrote: >> >> During my own tests, though, i found some problems: Here is an updated patch that should address the problems you have found. > also is interesting that in triggers, both before and after, the

Re: Deadlock in multiple CIC.

2017-12-27 Thread Jerry Sievers
Jeff Janes writes: > On Tue, Dec 26, 2017 at 8:31 AM, Alvaro Herrera < > alvhe...@alvh.no-ip.org> wrote: > > Jeff Janes wrote: > > c3d09b3bd23f5f6 fixed it so concurrent CIC would not deadlock > (or at least > > not as reliably as before) by dropping its own snapshot before >

Re: [HACKERS] taking stdbool.h into use

2017-12-27 Thread Peter Eisentraut
On 12/26/17 23:10, Michael Paquier wrote: > It would be nice to do something like that for GinTernaryValue in > tsginidx.c by mapping directly to GIN_FALSE and GIN_TRUE depending on > the input coming in gin_tsquery_consistent. The fix is more trivial > there. For GinTernaryValue, I think it's eas

Re: Deadlock in multiple CIC.

2017-12-27 Thread Jeff Janes
On Wed, Dec 27, 2017 at 8:50 AM, Jeremy Finzel wrote: > I was able to get this compiled, and ran the test before on stock 9.6.6, > then on this patched version. I indeed reproduced it on 9.6.6, but on the > patched version, it indeed fixes my issue. > > Let me know if I can be of further help.

Re: Deadlock in multiple CIC.

2017-12-27 Thread Jeremy Finzel
> > Since the purpose of CIC is to build an index with minimal impact on other > users, I think wanting to use it in concurrent cases might be rather rare. > In a maintenance window, I wouldn't want to use CIC because it is slower > and I'd rather just hold the stronger lock and do it fast, and as

Converting plpgsql to use DTYPE_REC for named composite types

2017-12-27 Thread Tom Lane
Those with long memories will recall that for some time now I've been arguing that plpgsql should be changed to treat all composite-type variables (both "record" and named composite types) via its DTYPE_REC code paths, instead of the current situation where it handles variables of named composite t

Re: [HACKERS] pow support for pgbench

2017-12-27 Thread Robert Haas
On Tue, Dec 26, 2017 at 4:45 PM, Raúl Marín Rodríguez wrote: > I've implemented the overflow checks and made some benchmarks and the ipow() > version became slower except with some specific inputs (base 0 for example). > It's true that the new auxiliary functions could be optimized, but I don't >

Re: How to Works with Centos

2017-12-27 Thread Robert Haas
On Mon, Dec 25, 2017 at 4:07 PM, Michael Paquier wrote: > 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 >>

Re: PathNameCreateTemporaryDir() vs concurrency

2017-12-27 Thread Robert Haas
On Tue, Dec 26, 2017 at 3:11 AM, Thomas Munro wrote: > While testing parallel hash join today, I saw a couple of errors like this: > > 2017-12-26 23:34:37.402 NZDT [13082] ERROR: cannot create temporary > subdirectory "base/pgsql_tmp/pgsql_tmp13080.0.sharedfileset": File > exists > > There is a t

Re: Comment typo in postgres_fdw.c

2017-12-27 Thread Robert Haas
On Wed, Dec 27, 2017 at 4:35 AM, Etsuro Fujita wrote: > Here is a small patch for fixing $Subject: s/it's/its/. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: AS OF queries

2017-12-27 Thread Peter van Hardenberg
On Wed, Dec 27, 2017 at 7:37 AM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > > > On 27.12.2017 00:52, Jeff Janes wrote: > > On Thu, Dec 21, 2017 at 6:00 AM, Konstantin Knizhnik < > k.knizh...@postgrespro.ru> wrote: > > >> There is still one significant difference of my prototype impl

Contributing with code

2017-12-27 Thread Antonio Belloni
Hi, This is my first post on the list. My name is Antonio. I am a CS grad student and my field of study is about databases and information retrieval. To get some practical knowledge, I've been studying Postgresql codebase for a while. Now I would like to contribute with some code and I've chosen

Contributing some code

2017-12-27 Thread Antonio Belloni
Hi, This is my first post on the list. My name is Antonio. I am a CS grad student and my field of study is about databases and information retrieval. To get some practical knowledge, I've been studying Postgresql codebase for a while. Now I would like to contribute with some code and I've chosen

plpgsql function startup-time improvements

2017-12-27 Thread Tom Lane
Attached are patches for two performance-improvement ideas that came to me while working on https://www.postgresql.org/message-id/8962.1514399...@sss.pgh.pa.us The three patches are logically independent and could be committed in any order. But they touch some overlapping code, so as presented, yo

Re: pgsql: Get rid of copy_partition_key

2017-12-27 Thread Alvaro Herrera
Pushed, thanks. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Unique indexes & constraints on partitioned tables

2017-12-27 Thread Alvaro Herrera
Thanks for the patch. Amit Langote wrote: > I mentioned this case at [1] and had a WIP patch to address that. Please > find it attached here. It is to be applied on top of both of your patches. In this bit: > + /* > + * When specific arbiter indexes requested, only ex

Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl

2017-12-27 Thread Tom Lane
Peter Eisentraut writes: > On 12/21/17 08:13, Andrew Dunstan wrote: >> Looks reasonable. Regarding the change to TestLib.pm, we should make >> sure that the tests have unique names. There is a small amount of >> duplication currently: >> >> ./src/bin/pg_dump/t/001_basic.pl >> ./src/bin/pg_rewind/

Re: [HACKERS] [PATCH] Lockable views

2017-12-27 Thread Tatsuo Ishii
> I didn't want to change the interface of view_query_is_auto_updatable() > because this might be called from other third-patry software, so I renamed > this function to view_query_is_auto_updatable_or_lockable() and added the flag > to this. I created view_query_is_auto_updatable() as a wrapper of

Re: [HACKERS] taking stdbool.h into use

2017-12-27 Thread Michael Paquier
On Wed, Dec 27, 2017 at 12:52:55PM -0500, Peter Eisentraut wrote: > On 12/26/17 23:10, Michael Paquier wrote: > > It would be nice to do something like that for GinTernaryValue in > > tsginidx.c by mapping directly to GIN_FALSE and GIN_TRUE depending on > > the input coming in gin_tsquery_consisten

MCV lists for highly skewed distributions

2017-12-27 Thread Jeff Janes
I want to revive a patch I sent couple years ago to the performance list, as I have seen the issue pop up repeatedly since then. Original thread is here: https://www.postgresql.org/message-id/CAK_s-G2tc8r0N3AqPr8fW5QsRQMbZNurgAQ%3D_ME1aaf4vOmnnA%40mail.gmail.com The problem is that if you have a

Re: [HACKERS] path toward faster partition pruning

2017-12-27 Thread David Rowley
On 22 December 2017 at 17:25, Amit Langote wrote: > Please find attached updated patches. Hi Amit, I've just completed a pass over the v17 patch set. I've found a number of things that need to be addressed. Some might seem a bit nit-picky, sorry about that. However, many of the others genuinely

RE: [HACKERS] Transactions involving multiple postgres foreign servers

2017-12-27 Thread Tsunakawa, Takayuki
From: Masahiko Sawada [mailto:sawada.m...@gmail.com] > I've updated documentation of patches, and fixed some bugs. I did some > failure tests of this feature using a fault simulation tool[1] for > PostgreSQL that I created. > > 0001 patch adds a mechanism to track of writes on local server. This i

Re: Contributing some code

2017-12-27 Thread Craig Ringer
On 28 December 2017 at 01:40, Antonio Belloni wrote: > Hi, > > This is my first post on the list. My name is Antonio. I am a CS grad > student and my field of study is about databases and information retrieval. > To get some practical knowledge, I've been studying Postgresql codebase for > a whil

Re: [HACKERS] Removing [Merge]Append nodes which contain a single subpath

2017-12-27 Thread David Rowley
I've attached a rebased patch. The previous patch was conflicting with parallel Hash Join (180428404) -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services remove_singleton_appends_2017-12-28.patch Description: Binary data

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-12-27 Thread Masahiko Sawada
On Thu, Dec 28, 2017 at 11:40 AM, Tsunakawa, Takayuki wrote: > From: Masahiko Sawada [mailto:sawada.m...@gmail.com] >> I've updated documentation of patches, and fixed some bugs. I did some >> failure tests of this feature using a fault simulation tool[1] for >> PostgreSQL that I created. >> >> 00

Re: How to Works with Centos

2017-12-27 Thread Asif Naeem
On Tue, Dec 26, 2017 at 4:48 AM, Jaime Casanova < jaime.casan...@2ndquadrant.com> wrote: > 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 distr

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

2017-12-27 Thread Michael Paquier
On Wed, Dec 27, 2017 at 04:53:42PM +0900, Michael Paquier wrote: > Indeed, this bit is important, and RangeVarGet does so. Looking at > get_object_address(), it also handles locking of the object. Using that > as interface to address all the concurrency problems could be appealing, > and less invas

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-12-27 Thread Michael Paquier
On Wed, Dec 27, 2017 at 09:27:40AM +0900, Michael Paquier wrote: > On Tue, Dec 26, 2017 at 03:28:09PM -0500, Peter Eisentraut wrote: >> On 12/22/17 03:10, Michael Paquier wrote: >>> Second thoughts on 0002 as there is actually no need to move around >>> errorMessage if the PGconn* pointer is saved

Re: [HACKERS] pgbench more operators & functions

2017-12-27 Thread Fabien COELHO
Hello Teodor, So, I intend to push thish patch in current state. I saw several objections from commiters in thread, but, seems, that objections are lifted. Am I right? Here is a rebase after "pow" addition. -- Fabien.diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml

Re: AS OF queries

2017-12-27 Thread Konstantin Knizhnik
On 27.12.2017 10:29, Craig Ringer wrote: On 25 December 2017 at 15:59, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: On 25.12.2017 06:26, Craig Ringer wrote: On 24 December 2017 at 04:53, konstantin knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: B

Re: Postgres with pthread

2017-12-27 Thread Konstantin Knizhnik
On 21.12.2017 16:25, Konstantin Knizhnik wrote: I continue experiments with my pthread prototype. Latest results are the following: 1. I have eliminated all (I hope) calls of non-reentrant functions (getopt, setlocale, setitimer, localtime, ...). So now parallel tests are passed. 2. I have

Re: [HACKERS] [PATCH] Tap test support for backup with tablespace mapping

2017-12-27 Thread Tels
Dear Vaishnavi, On Tue, December 26, 2017 8:58 pm, Vaishnavi Prabakaran wrote: > Hi All, > > I have added support in Postgres TAP test framework to backup a data > directory with tablespace mapping. Also added support to move the backup > directory contents to standby node, because current option

Re: [PROPOSAL] Shared Ispell dictionaries

2017-12-27 Thread Arthur Zakirov
On Tue, Dec 26, 2017 at 07:03:48PM +0100, Pavel Stehule wrote: > > Tomas had some workable patches related to this topic > Tomas, have you planned to propose it? -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: Tracking of page changes for backup purposes. PTRACK [POC]

2017-12-27 Thread Andrey Borodin
Hi! > 21 дек. 2017 г., в 5:51, Michael Paquier > написал(а): > > On Thu, Dec 21, 2017 at 7:35 AM, Robert Haas wrote: >> On Wed, Dec 20, 2017 at 3:45 PM, Tomas Vondra >> wrote: Isn't more effective hold this info in Postgres than in backup sw? Then any backup sw can use this implemen

Re: Postgres with pthread

2017-12-27 Thread james
> All threads are blocked in semaphores. That they are blocked is inevitable - I guess the issue is that they are thrashing. I guess it would be necessary to separate the internals to have some internal queueing and effectively reduce the number of actively executing threads. In effect make th

Re: Postgres with pthread

2017-12-27 Thread Andres Freund
On December 27, 2017 11:05:52 AM GMT+01:00, james wrote: > > All threads are blocked in semaphores. >That they are blocked is inevitable - I guess the issue is that they >are >thrashing. >I guess it would be necessary to separate the internals to have some >internal queueing and effectively r

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-27 Thread Maksim Milyutin
On 27.12.2017 10:44, Craig Ringer wrote: On 22 December 2017 at 23:19, Maksim Milyutin > wrote: Noticing the interest in the calling some routines on the remote backend through signals, in parallel thread[1] I have proposed the possibility to define user

Re: Tracking of page changes for backup purposes. PTRACK [POC]

2017-12-27 Thread Magnus Hagander
On Thu, Dec 21, 2017 at 1:51 AM, Michael Paquier wrote: > On Thu, Dec 21, 2017 at 7:35 AM, Robert Haas > wrote: > > On Wed, Dec 20, 2017 at 3:45 PM, Tomas Vondra > > wrote: > >>> Isn't more effective hold this info in Postgres than in backup sw? > >>> Then any backup sw can use this implementat

Re: Postgres with pthread

2017-12-27 Thread james
On 27/12/2017 10:08, Andres Freund wrote: Optimizing for this seems like a pointless exercise. If the goal is efficient processing of 100k connections the solution is a session / connection abstraction and a scheduler. Optimizing for this amount of concurrency just will add complexity and sl

Re: Postgres with pthread

2017-12-27 Thread Konstantin Knizhnik
On 27.12.2017 13:08, Andres Freund wrote: On December 27, 2017 11:05:52 AM GMT+01:00, james wrote: All threads are blocked in semaphores. That they are blocked is inevitable - I guess the issue is that they are thrashing. I guess it would be necessary to separate the internals to have some

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

2017-12-27 Thread Hannu Krosing
On 26.12.2017 09:23, Lelisa Diriba wrote: > 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 t

Re: AS OF queries

2017-12-27 Thread Hannu Krosing
On 20.12.2017 14:45, Konstantin Knizhnik wrote: > I wonder if Postgres community is interested in supporting time travel > queries in PostgreSQL (something like AS OF queries in Oracle: > https://docs.oracle.com/cd/B14117_01/appdev.101/b10795/adfns_fl.htm). > As far as I know something similar is n

Re: Add hint about replication slots when nearing wraparound

2017-12-27 Thread Michael Paquier
On Wed, Dec 27, 2017 at 08:47:20AM +0100, Feike Steenbergen wrote: > Changed the block from a note to a caution, Thanks for the new version. - "You might also need to commit or roll back old prepared transactions."))); + "You might also need to commit or roll back old prepared transactions, or d

postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly

2017-12-27 Thread Etsuro Fujita
(2017/04/08 10:28), Robert Haas wrote: > On Wed, Mar 22, 2017 at 6:20 AM, Etsuro Fujita > wrote: >> On 2017/02/22 19:57, Rushabh Lathia wrote: >>> Marked this as Ready for Committer. >> >> I noticed that this item in the CF app was incorrectly marked as Committed. >> This patch isn't committed, s

Re: [HACKERS] Pluggable storage

2017-12-27 Thread Alexander Korotkov
Hi! On Wed, Dec 27, 2017 at 6:54 AM, Haribabu Kommi wrote: > > On Tue, Dec 12, 2017 at 3:06 PM, Haribabu Kommi > wrote: > >> >> I restructured that patch files to avoid showing unnecessary >> modifications, >> and also it will be easy for adding of new API's based on the all the >> functions >>

Comment typo in postgres_fdw.c

2017-12-27 Thread Etsuro Fujita
Here is a small patch for fixing $Subject: s/it's/its/. Best regards, Etsuro Fujita diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index fb65e2e..44db449 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -5115,7 +5

Re: [HACKERS] [PATCH] Lockable views

2017-12-27 Thread Yugo Nagata
On Tue, 26 Dec 2017 22:22:33 +0900 Michael Paquier wrote: > On Tue, Dec 26, 2017 at 06:37:06PM +0900, Yugo Nagata wrote: > > I have created a new entry in CF-2017-1 and registered this thread again. > > Fine for me. Thanks for the update. And I guess that you are planning to > send a new version

Re: AS OF queries

2017-12-27 Thread PostgreSQL - Hans-Jürgen Schönig
On 12/20/2017 01:45 PM, Konstantin Knizhnik wrote: > I wonder if Postgres community is interested in supporting time travel > queries in PostgreSQL (something like AS OF queries in Oracle: > https://docs.oracle.com/cd/B14117_01/appdev.101/b10795/adfns_fl.htm). > As far as I know something similar

Re: [HACKERS] [PATCH] Lockable views

2017-12-27 Thread Yugo Nagata
Hi, Attached is the updated patch. On Mon, 16 Oct 2017 10:07:48 +0900 (JST) Tatsuo Ishii wrote: > >> > It would be nice if the message would be something like: > >> > > >> > DETAIL: Views that return aggregate functions are not lockable > You could add a flag to view_query_is_auto_updatable()

Re: TupleDescCopy doesn't clear atthasdef, attnotnull, attidentity

2017-12-27 Thread Vik Fearing
On 11/29/2017 08:58 AM, Thomas Munro wrote: > Hi hackers, > > Andrew Gierth complained off-list that TupleDescCopy() doesn't clear > atthasdef. Yeah, that's an oversight. The function is new in commit > cc5f81366c36 and was written by me to support "flat" (pointer-free) > tuple descriptors for u

Re: AS OF queries

2017-12-27 Thread Konstantin Knizhnik
On 27.12.2017 17:14, PostgreSQL - Hans-Jürgen Schönig wrote: On 12/20/2017 01:45 PM, Konstantin Knizhnik wrote: I wonder if Postgres community is interested in supporting time travel queries in PostgreSQL (something like AS OF queries in Oracle: https://docs.oracle.com/cd/B14117_01/appdev.101

Re: AS OF queries

2017-12-27 Thread Konstantin Knizhnik
On 27.12.2017 00:52, Jeff Janes wrote: On Thu, Dec 21, 2017 at 6:00 AM, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: There is still one significant difference of my prototype implementation with SQL standard: it associates timestamp with select statement, not with

Re: Deadlock in multiple CIC.

2017-12-27 Thread Jeremy Finzel
On Tue, Dec 26, 2017 at 11:23 AM, Jeff Janes wrote: > On Tue, Dec 26, 2017 at 8:31 AM, Alvaro Herrera > wrote: > >> Jeff Janes wrote: >> > c3d09b3bd23f5f6 fixed it so concurrent CIC would not deadlock (or at >> least >> > not as reliably as before) by dropping its own snapshot before waiting >>

Re: [HACKERS] generated columns

2017-12-27 Thread Peter Eisentraut
On 9/12/17 15:35, Jaime Casanova wrote: > On 10 September 2017 at 00:08, Jaime Casanova > wrote: >> >> During my own tests, though, i found some problems: Here is an updated patch that should address the problems you have found. > also is interesting that in triggers, both before and after, the

Re: Deadlock in multiple CIC.

2017-12-27 Thread Jerry Sievers
Jeff Janes writes: > On Tue, Dec 26, 2017 at 8:31 AM, Alvaro Herrera < > alvhe...@alvh.no-ip.org> wrote: > > Jeff Janes wrote: > > c3d09b3bd23f5f6 fixed it so concurrent CIC would not deadlock > (or at least > > not as reliably as before) by dropping its own snapshot before >

Re: [HACKERS] taking stdbool.h into use

2017-12-27 Thread Peter Eisentraut
On 12/26/17 23:10, Michael Paquier wrote: > It would be nice to do something like that for GinTernaryValue in > tsginidx.c by mapping directly to GIN_FALSE and GIN_TRUE depending on > the input coming in gin_tsquery_consistent. The fix is more trivial > there. For GinTernaryValue, I think it's eas

Re: Deadlock in multiple CIC.

2017-12-27 Thread Jeff Janes
On Wed, Dec 27, 2017 at 8:50 AM, Jeremy Finzel wrote: > I was able to get this compiled, and ran the test before on stock 9.6.6, > then on this patched version. I indeed reproduced it on 9.6.6, but on the > patched version, it indeed fixes my issue. > > Let me know if I can be of further help.

Re: Deadlock in multiple CIC.

2017-12-27 Thread Jeremy Finzel
> > Since the purpose of CIC is to build an index with minimal impact on other > users, I think wanting to use it in concurrent cases might be rather rare. > In a maintenance window, I wouldn't want to use CIC because it is slower > and I'd rather just hold the stronger lock and do it fast, and as

Converting plpgsql to use DTYPE_REC for named composite types

2017-12-27 Thread Tom Lane
Those with long memories will recall that for some time now I've been arguing that plpgsql should be changed to treat all composite-type variables (both "record" and named composite types) via its DTYPE_REC code paths, instead of the current situation where it handles variables of named composite t

Re: [HACKERS] pow support for pgbench

2017-12-27 Thread Robert Haas
On Tue, Dec 26, 2017 at 4:45 PM, Raúl Marín Rodríguez wrote: > I've implemented the overflow checks and made some benchmarks and the ipow() > version became slower except with some specific inputs (base 0 for example). > It's true that the new auxiliary functions could be optimized, but I don't >

Re: How to Works with Centos

2017-12-27 Thread Robert Haas
On Mon, Dec 25, 2017 at 4:07 PM, Michael Paquier wrote: > 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 >>

Re: PathNameCreateTemporaryDir() vs concurrency

2017-12-27 Thread Robert Haas
On Tue, Dec 26, 2017 at 3:11 AM, Thomas Munro wrote: > While testing parallel hash join today, I saw a couple of errors like this: > > 2017-12-26 23:34:37.402 NZDT [13082] ERROR: cannot create temporary > subdirectory "base/pgsql_tmp/pgsql_tmp13080.0.sharedfileset": File > exists > > There is a t

Re: Comment typo in postgres_fdw.c

2017-12-27 Thread Robert Haas
On Wed, Dec 27, 2017 at 4:35 AM, Etsuro Fujita wrote: > Here is a small patch for fixing $Subject: s/it's/its/. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: AS OF queries

2017-12-27 Thread Peter van Hardenberg
On Wed, Dec 27, 2017 at 7:37 AM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > > > On 27.12.2017 00:52, Jeff Janes wrote: > > On Thu, Dec 21, 2017 at 6:00 AM, Konstantin Knizhnik < > k.knizh...@postgrespro.ru> wrote: > > >> There is still one significant difference of my prototype impl

Contributing with code

2017-12-27 Thread Antonio Belloni
Hi, This is my first post on the list. My name is Antonio. I am a CS grad student and my field of study is about databases and information retrieval. To get some practical knowledge, I've been studying Postgresql codebase for a while. Now I would like to contribute with some code and I've chosen

Contributing some code

2017-12-27 Thread Antonio Belloni
Hi, This is my first post on the list. My name is Antonio. I am a CS grad student and my field of study is about databases and information retrieval. To get some practical knowledge, I've been studying Postgresql codebase for a while. Now I would like to contribute with some code and I've chosen

plpgsql function startup-time improvements

2017-12-27 Thread Tom Lane
Attached are patches for two performance-improvement ideas that came to me while working on https://www.postgresql.org/message-id/8962.1514399...@sss.pgh.pa.us The three patches are logically independent and could be committed in any order. But they touch some overlapping code, so as presented, yo

Re: pgsql: Get rid of copy_partition_key

2017-12-27 Thread Alvaro Herrera
Pushed, thanks. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Unique indexes & constraints on partitioned tables

2017-12-27 Thread Alvaro Herrera
Thanks for the patch. Amit Langote wrote: > I mentioned this case at [1] and had a WIP patch to address that. Please > find it attached here. It is to be applied on top of both of your patches. In this bit: > + /* > + * When specific arbiter indexes requested, only ex

Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl

2017-12-27 Thread Tom Lane
Peter Eisentraut writes: > On 12/21/17 08:13, Andrew Dunstan wrote: >> Looks reasonable. Regarding the change to TestLib.pm, we should make >> sure that the tests have unique names. There is a small amount of >> duplication currently: >> >> ./src/bin/pg_dump/t/001_basic.pl >> ./src/bin/pg_rewind/

Re: [HACKERS] [PATCH] Lockable views

2017-12-27 Thread Tatsuo Ishii
> I didn't want to change the interface of view_query_is_auto_updatable() > because this might be called from other third-patry software, so I renamed > this function to view_query_is_auto_updatable_or_lockable() and added the flag > to this. I created view_query_is_auto_updatable() as a wrapper of

Re: [HACKERS] taking stdbool.h into use

2017-12-27 Thread Michael Paquier
On Wed, Dec 27, 2017 at 12:52:55PM -0500, Peter Eisentraut wrote: > On 12/26/17 23:10, Michael Paquier wrote: > > It would be nice to do something like that for GinTernaryValue in > > tsginidx.c by mapping directly to GIN_FALSE and GIN_TRUE depending on > > the input coming in gin_tsquery_consisten

MCV lists for highly skewed distributions

2017-12-27 Thread Jeff Janes
I want to revive a patch I sent couple years ago to the performance list, as I have seen the issue pop up repeatedly since then. Original thread is here: https://www.postgresql.org/message-id/CAK_s-G2tc8r0N3AqPr8fW5QsRQMbZNurgAQ%3D_ME1aaf4vOmnnA%40mail.gmail.com The problem is that if you have a

Re: [HACKERS] path toward faster partition pruning

2017-12-27 Thread David Rowley
On 22 December 2017 at 17:25, Amit Langote wrote: > Please find attached updated patches. Hi Amit, I've just completed a pass over the v17 patch set. I've found a number of things that need to be addressed. Some might seem a bit nit-picky, sorry about that. However, many of the others genuinely

RE: [HACKERS] Transactions involving multiple postgres foreign servers

2017-12-27 Thread Tsunakawa, Takayuki
From: Masahiko Sawada [mailto:sawada.m...@gmail.com] > I've updated documentation of patches, and fixed some bugs. I did some > failure tests of this feature using a fault simulation tool[1] for > PostgreSQL that I created. > > 0001 patch adds a mechanism to track of writes on local server. This i

Re: Contributing some code

2017-12-27 Thread Craig Ringer
On 28 December 2017 at 01:40, Antonio Belloni wrote: > Hi, > > This is my first post on the list. My name is Antonio. I am a CS grad > student and my field of study is about databases and information retrieval. > To get some practical knowledge, I've been studying Postgresql codebase for > a whil

  1   2   >