Re: Postgres 11 release notes

2018-09-19 Thread Adrien Nayrat
On 8/25/18 11:24 PM, Peter Geoghegan wrote: > On Sat, Aug 25, 2018 at 2:18 PM, Bruce Momjian wrote: >>> I think that's less "our" logic and more yours, that has become >>> established because you've done most of the major release notes for a >>> long time. I'm not trying to say that that's wrong o

Size and size_t in dsa API

2018-09-19 Thread Ideriha, Takeshi
Hi, I'm trying to use DSA API and confused a little bit about $subject. Some type of return value or arguments are defined as size_t but others are as Size. Example: - dsa_area *dsa_create_in_place(void *place, size_t size, int tranche_id, dsm_segment *segment) - Size dsa_

Re: Connection slots reserved for replication

2018-09-19 Thread Kyotaro HORIGUCHI
Hello. I agree to the objective. At Mon, 17 Sep 2018 14:25:56 +0200, Alexander Kukushkin wrote in > Hi, > > 2018-09-14 12:23 GMT+02:00 Masahiko Sawada : > > >> 2. If we know that this is neither superuser nor replication connection, we > >> should check that there are at least (superuser_res

Function to promote standby servers

2018-09-19 Thread Laurenz Albe
Providing SQL access for administrative tasks seems to be a good thing, see ALTER SYSTEM and pg_reload_conf(). In that vein, I propose a function pg_promote() to promote physical standby servers. If there are no fundamental objections, I'll add it to the next commitfest. Yours, Laurenz Albe From

Re: View to get all the extension control file details

2018-09-19 Thread Kyotaro HORIGUCHI
Hello. At Mon, 17 Sep 2018 16:49:41 +1000, Haribabu Kommi wrote in > Hi Hackers, > > Currently PostgreSQL provides following views to get the extension specific > details > > pg_available_extensions - Name, default_version, installed_version, comment > > pg_available_extension_versions - Nam

Re: PostgreSQL 11 {Beta 4, RC1} Release: 2018-09-20

2018-09-19 Thread Haroon
On Tue, 18 Sep 2018 at 21:15, Jonathan S. Katz wrote: > On 9/13/18 12:51 PM, Jonathan S. Katz wrote: > > Hi, > > > > We are planning to have another release of PostgreSQL 11, either Beta 4 > > or RC1, next week on Thursday, 2018-09-20. The version will be > > determined based on the state of the

Re: Code of Conduct plan

2018-09-19 Thread Chris Travers
On Thu, Sep 20, 2018 at 5:11 AM Craig Ringer wrote: > On Fri, 14 Sep 2018 at 23:11, James Keener wrote: > >> And if you believe strongly that a given statement you may have made is >>> not objectionable...you should be willing to defend it in an adjudication >>> investigation. >> >> >> So becaus

Re: Making all nbtree entries unique by having heap TIDs participate in comparisons

2018-09-19 Thread Andrey Lepikhov
I use the v5 version in quick vacuum strategy and in the heap&index cleaner (see new patches at corresponding thread a little bit later). It works fine and give quick vacuum 2-3% performance growup in comparison with version v3 at my 24-core test server. Note, that the interface of _bt_moveright

Re: vary read_only in SPI calls? or poke at the on-entry snapshot?

2018-09-19 Thread Tom Lane
Chapman Flack writes: > Would it be unprecedented / be unreasonable / break anything for the > install_jar function to simply force a CommandCounterIncrement > at the end of step 1 (after its temporary snapshot has been popped, > so the former/on-entry ActiveSnapshot gets the increment)? The risk

Re: infinite loop in parallel hash joins / DSA / get_best_segment

2018-09-19 Thread Thomas Munro
On Tue, Sep 18, 2018 at 11:35 AM Thomas Munro wrote: > On Mon, Sep 17, 2018 at 9:12 PM Thomas Munro > wrote: > > On Mon, Sep 17, 2018 at 10:42 AM Thomas Munro > > wrote: > > > On Mon, Sep 17, 2018 at 10:38 AM Tomas Vondra > > > wrote: > > > > While performing some benchmarks on REL_11_STABLE (a

Re: [WIP] [B-Tree] Retail IndexTuple deletion

2018-09-19 Thread Andrey Lepikhov
The next version of amtargetdelete() interface and its implementation for nbtree, devoted to the problem of retail indextuple deletion. Uses 'v5-0001-Make-nbtree-indexes-have-unique-keys-in-tuples' patch [1] to delete all logical duplicates by one tree descent. [1] https://www.postgresql.org/m

How to get active table within a transaction.

2018-09-19 Thread Hubert Zhang
Hi all, I have a requirement to get the active table list in a child postmaster process. We are able to get the active table list after corresponding transaction ends by using stat collector. Each postgres process will gather the table change information locally, but only send the stat info to co

Re: Query is over 2x slower with jit=on

2018-09-19 Thread Pavel Stehule
čt 20. 9. 2018 v 5:39 odesílatel Andres Freund napsal: > On 2018-09-19 23:26:52 -0400, Tom Lane wrote: > > Andres Freund writes: > > > On 2018-09-17 17:50:15 -0400, Tom Lane wrote: > > >> Just to throw a contrarian opinion into this: I find the current > EXPLAIN > > >> output for JIT to be insan

Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi

2018-09-19 Thread Laurenz Albe
Michael Paquier wrote: > Thanks, I have pushed the solution from Laurenz to maintain pure > compatibility. Thanks for all the work! Yours, Laurenz Albe

Re: Query is over 2x slower with jit=on

2018-09-19 Thread Andres Freund
On 2018-09-19 23:26:52 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2018-09-17 17:50:15 -0400, Tom Lane wrote: > >> Just to throw a contrarian opinion into this: I find the current EXPLAIN > >> output for JIT to be insanely verbose already. > > > Hm, it'd have been nice to get that feedb

Re: Query is over 2x slower with jit=on

2018-09-19 Thread Tom Lane
Andres Freund writes: > On 2018-09-17 17:50:15 -0400, Tom Lane wrote: >> Just to throw a contrarian opinion into this: I find the current EXPLAIN >> output for JIT to be insanely verbose already. > Hm, it'd have been nice to get that feedback a little bit earlier, I did > inquire... > Currently:

Re: Code of Conduct plan

2018-09-19 Thread Craig Ringer
On Fri, 14 Sep 2018 at 23:11, James Keener wrote: > And if you believe strongly that a given statement you may have made is >> not objectionable...you should be willing to defend it in an adjudication >> investigation. > > > So because someone doesn't like what I say in a venue 100% separate from

Re: [HACKERS] Bug in to_timestamp().

2018-09-19 Thread amul sul
On Thu, Sep 20, 2018, 3:22 AM Alexander Korotkov wrote: > On Wed, Sep 19, 2018 at 1:38 PM amul sul wrote: > > On Wed, Sep 19, 2018 at 3:51 PM amul sul wrote: > > > > > > On Wed, Sep 19, 2018 at 2:57 PM Alexander Korotkov > > [...] > > > > > > With this patch, to_date and to_timestamp behaving d

vary read_only in SPI calls? or poke at the on-entry snapshot?

2018-09-19 Thread Chapman Flack
SOME BACKGROUND: The code for PL/Java functions resides in 'class images'. These are made available, in advance, by loading them from 'jar files' into some tables in the database. When a PL/Java function is called, if the JVM hasn't loaded its class image yet, the JVM calls PL/Java's loader, whic

Re: heap_sync seems rather oblivious to partitioned tables (wal_level=minimal)

2018-09-19 Thread Michael Paquier
On Wed, Sep 19, 2018 at 02:48:58PM -0700, Andres Freund wrote: > On 2018-09-19 12:06:47 +0900, Michael Paquier wrote: >> Yeah, my gut is telling me that this would be the best approach for now, >> still I am not sure that this is the best move in the long term. > > ISTM heap_sync() would be the en

Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi

2018-09-19 Thread Michael Paquier
On Wed, Sep 19, 2018 at 11:55:01AM -0400, Tom Lane wrote: > I'm OK with this approach. I wonder though what happens if you take > away the "#ifdef FRONTEND" and just enforce that one or the other mode > is selected always. That would seem like a sensible solution rather > than a wart to me ... T

SIGDANGER and oomd

2018-09-19 Thread Thomas Munro
Hello hackers, On AIX, which I think might have been a pioneer in overcommitting memory (?), they have the wonderfully named signal SIGDANGER. It's delivered to every process on the system as a final courtesy some time before the OOM killer starts delivering SIGKILL. The theory is that you might

Re: Query is over 2x slower with jit=on

2018-09-19 Thread Andres Freund
Hi, On 2018-09-17 17:50:15 -0400, Tom Lane wrote: > Amit Khandekar writes: > > On 11 September 2018 at 14:50, Amit Khandekar > > wrote: > >> On 10 September 2018 at 21:39, Andres Freund wrote: > >>> On 2018-09-10 15:42:55 +0530, Amit Khandekar wrote: > I think we better show per-worker ji

Re: [patch] Support LLVM 7

2018-09-19 Thread Andres Freund
Hi, On 2018-09-16 09:48:34 +0200, Christoph Berg wrote: > Re: To Andres Freund 2018-09-12 <20180912210734.gb5...@msg.df7cb.de> > > I plan to switch postgresql-11.deb to LLVM 7 over the next days > > because of the support for non-x86 architectures > > I did an upload of postgresql-11 beta3 with l

Re: heap_sync seems rather oblivious to partitioned tables (wal_level=minimal)

2018-09-19 Thread Andres Freund
On 2018-09-19 12:06:47 +0900, Michael Paquier wrote: > On Wed, Sep 19, 2018 at 01:14:10PM +1200, David Rowley wrote: > > Wouldn't it be better to modify copy.c to just perform the heap_sync > > on just the partitions it touches? > > Yeah, my gut is telling me that this would be the best approach f

Re: Progress reporting for pg_verify_checksums

2018-09-19 Thread Thomas Munro
On Tue, Sep 4, 2018 at 2:21 AM Alvaro Herrera wrote: > On 2018-Sep-01, Fabien COELHO wrote: > > > If -P was forgotten and pg_verify_checksums operates on a large cluster, > > > the caller can send SIGUSR1 to pg_verify_checksums to turn progress > > > status reporting on during runtime. > > > > Hmm

Re: [HACKERS] Bug in to_timestamp().

2018-09-19 Thread Alexander Korotkov
On Wed, Sep 19, 2018 at 1:38 PM amul sul wrote: > On Wed, Sep 19, 2018 at 3:51 PM amul sul wrote: > > > > On Wed, Sep 19, 2018 at 2:57 PM Alexander Korotkov > [...] > > > > With this patch, to_date and to_timestamp behaving differently, see this: > > > > edb=# SELECT to_date('18 12 2011', 'xDDxMM

Re: [HACKERS] SERIALIZABLE with parallel query

2018-09-19 Thread Kevin Grittner
After reviewing the thread and the current two patches, I agree with Masahiko Sawada plus preferring one adjustment to the coding: I would prefer to break out the majority of the ReleasePredicateLocks function to a static ReleasePredicateLocksMain (or similar) function and eliminating the goto. Th

Re: PATCH: pgbench - option to build using ppoll() for larger connection counts

2018-09-19 Thread Tom Lane
"Rady, Doug" writes: > This patch enables building pgbench to use ppoll() instead of select() > to allow for more than (FD_SETSIZE - 10) connections. As implemented, > when using ppoll(), the only connection limitation is system resources. So ... why exactly is this patch insisting on ppoll() ra

Re: Progress reporting for pg_verify_checksums

2018-09-19 Thread Michael Banck
Hi, thanks for the review! On Wed, Sep 19, 2018 at 05:17:05PM +0200, Fabien COELHO wrote: > >>This optionally prints the progress of pg_verify_checksums via read > >>kilobytes to the terminal with the new command line argument -P. > >> > >>If -P was forgotten and pg_verify_checksums operates on a

Re: errmsg() ending with a period

2018-09-19 Thread Tom Lane
Daniel Gustafsson writes: > Happened to notice that two errmsg() strings end with a period, which IIUC is > against the Error Message Style Guide. Fixed in the attached patch. Yup. Pushed, thanks. regards, tom lane

Re: Code of Conduct

2018-09-19 Thread Andrew Dunstan
On 09/19/2018 04:27 PM, Kevin Grittner wrote: On Tue, Sep 18, 2018 at 5:28 AM Dave Page wrote: The PostgreSQL Core team are pleased to announce that following a long consultation process, the project’s Code of Conduct (CoC) has now been finalised and published at https://www.postgresql.org

Re: fast default vs triggers

2018-09-19 Thread Andrew Dunstan
On 09/18/2018 03:36 PM, Andrew Dunstan wrote: Tomas Vondra has pointed out to me that there's an issue with triggers not getting expanded tuples for columns with fast defaults. Here is an example that shows the issue:    andrew=# create table blurfl (id int);    CREATE TABLE    andrew=#

Re: Code of Conduct

2018-09-19 Thread Kevin Grittner
On Tue, Sep 18, 2018 at 5:28 AM Dave Page wrote: > > The PostgreSQL Core team are pleased to announce that following a long > consultation process, the project’s Code of Conduct (CoC) has now been > finalised and published at https://www.postgresql.org/about/policies/coc/. > > Please take time t

errmsg() ending with a period

2018-09-19 Thread Daniel Gustafsson
Happened to notice that two errmsg() strings end with a period, which IIUC is against the Error Message Style Guide. Fixed in the attached patch. cheers ./daniel errmsg_punctuation.patch Description: Binary data

Re: Code of Conduct

2018-09-19 Thread Stephen Frost
Greetings, * Francisco Olarte (fola...@peoplecall.com) wrote: > I will happily pardon brevity ( although I would not call a ten line > sig plus a huge bottom quote "breve", and AFAIK it means the same in > english as in spanish ) and/or typos, but the "I am not responsible" > feels nearly insultin

Re: PostgreSQL 11 {Beta 4, RC1} Release: 2018-09-20

2018-09-19 Thread Jonathan S. Katz
On 9/19/18 2:41 AM, Noah Misch wrote: > On Tue, Sep 18, 2018 at 12:15:45PM -0400, Jonathan S. Katz wrote: >> On 9/13/18 12:51 PM, Jonathan S. Katz wrote: >>> We are planning to have another release of PostgreSQL 11, either Beta 4 >>> or RC1, next week on Thursday, 2018-09-20. The version will be >>

Re: Code of Conduct

2018-09-19 Thread Fred Pratt
Sorry, I emailed using my company account and thus the long sig. In an effort to avoid further insulting Mr Olarte, I will delete it this time.See, Self-policing works ! Fred

Re: Code of Conduct

2018-09-19 Thread Francisco Olarte
On Wed, Sep 19, 2018 at 5:27 PM, Fred Pratt wrote: > Keep pg open and free. This smells of PC police. This community can > police itself No comment on this, just kept for context. > Sent from my mobile device. Please pardon my brevity and typos. I am not > responsible for changes made by

Re: doc - add missing documentation for "acldefault"

2018-09-19 Thread John Naylor
On 9/19/18, Tom Lane wrote: > However, I don't object to documenting any function that has its > own pg_description string. Speaking of, that description string seems to have been neglected. I've attached a remedy for that. -John Naylor diff --git a/src/include/catalog/pg_proc.dat b/src/include/

Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi

2018-09-19 Thread Tom Lane
Michael Paquier writes: > I have spent a large portion of my morning trying to test all the > solutions proposed, and a winner shows up. ... > - win32-open-laurenz.patch, which enforces to text mode only if binary > mode is not defined, which maps strictly to what pre-11 is doing when > calling

Re: Code of Conduct

2018-09-19 Thread Fred Pratt
Keep pg open and free. This smells of PC police. This community can police itself Sent from my mobile device. Please pardon my brevity and typos. I am not responsible for changes made by this device’s autocorrect feature. Fred Pratt AmerisourceBergen Manager – IT Infrastructure Micro Tech

Re: doc - add missing documentation for "acldefault"

2018-09-19 Thread Fabien COELHO
Hello, Our normal policy is that we do not document functions that are meant to be invoked through operators. The \df output saying that is sufficient: The output of \df is one thing, but I was looking at pg online documentation and hoping to find things as well. \dfS returns nearly 3000

Re: doc - add missing documentation for "acldefault"

2018-09-19 Thread Joe Conway
On 09/19/2018 10:54 AM, Tom Lane wrote: > Joe Conway writes: >> * I do believe aclitemeq() has utility outside internal purposes. > > Our normal policy is that we do not document functions that are meant to > be invoked through operators. The \df output saying that is sufficient: > I would st

Re: Progress reporting for pg_verify_checksums

2018-09-19 Thread Fabien COELHO
Hallo Michael, This optionally prints the progress of pg_verify_checksums via read kilobytes to the terminal with the new command line argument -P. If -P was forgotten and pg_verify_checksums operates on a large cluster, the caller can send SIGUSR1 to pg_verify_checksums to turn progress stat

Re: doc - add missing documentation for "acldefault"

2018-09-19 Thread Tom Lane
Joe Conway writes: > * I do believe aclitemeq() has utility outside internal purposes. Our normal policy is that we do not document functions that are meant to be invoked through operators. The \df output saying that is sufficient: # \df+ aclitemeq

Google Code-in 2018

2018-09-19 Thread Sarah Schnurr
Hello, all! Google has a global, online contest that invites teenagers (ages 13-17) to work with mentors from various pre-selected open source organizations. The idea is that these students are able to work on "bite-sized tasks" to become introduced to the technology and learn. Many of the tasks l

Re: [HACKERS] proposal: schema variables

2018-09-19 Thread Pavel Stehule
st 19. 9. 2018 v 14:53 odesílatel Arthur Zakirov napsal: > On Wed, Sep 19, 2018 at 02:08:04PM +0200, Pavel Stehule wrote: > > Unfortunately we cannot to use standard > > "SET" command, because it is used in Postgres for different purpose. > > READ|WRITE are totally clear, and for user it is anoth

Re: Code of Conduct

2018-09-19 Thread ERR ORR
I was never consulted. I was only Told that there was a CoC "to be". Not when, not how. A CoC will inevitably lead to the project taken over by leftists, political and technical decisions will be made by others. Most important from my PoV, the projects quality will decrease until its made unviable.

Re: Regarding Mentoring for GCI-18

2018-09-19 Thread Stephen Frost
Greetings, * The Coding Planet (sunveersing...@gmail.com) wrote: > I am Sunveer Singh, Google Code-in 2017 Grand Prize Winner with OSGeo. > > I am willing to be mentor for PostgreSQL. Last year I worked on almost 70 > tasks based on GIS world. A student an Grand Prize winner I will be able > to

Re: hostorder and failover_timeout for libpq

2018-09-19 Thread Ildar Musin
Hello Surafel, On Fri, Sep 14, 2018 at 2:03 PM Surafel Temesgen wrote: > Hey , > Here are a few comment. > + xreflabel="failover_timeout"> > Here's a typo: ="libpq-connect-falover-timeout" > + {"failover_timeout", NULL, NULL, NULL, > + "Failover Timeout", "", 10, > Word

Re: Online verification of checksums

2018-09-19 Thread Michael Banck
Hi, Am Dienstag, den 18.09.2018, 13:52 -0400 schrieb David Steele: > On 9/18/18 11:45 AM, Stephen Frost wrote: > > * Michael Banck (michael.ba...@credativ.de) wrote: > > > I have added a retry for this as well now, without a pg_sleep() as well. > > > This catches around 80% of the half-reads, but

Re: Code of Conduct plan

2018-09-19 Thread ERR ORR
I see a CoC as an infiltration of the PostgreSQL community which has worked OK since at least 10 years. The project owners have let their care slacken. I request that the project owners EXPEL/EXCOMMUNICATE ALL those who are advancing what can only be seen as an instrument for harassing members of a

Re: doc - add missing documentation for "acldefault"

2018-09-19 Thread Joe Conway
On 08/03/2018 09:04 AM, Fabien COELHO wrote: > Here is a version of the patch which documents briefly all aclitem-related > functions, in a separate table. I claimed this patch for review and commit. Comments: --- * There is a comment in src/backend/utils/adt/acl.c noting that acldefault is "no

Re: [HACKERS] proposal: schema variables

2018-09-19 Thread Arthur Zakirov
On Wed, Sep 19, 2018 at 02:08:04PM +0200, Pavel Stehule wrote: > Unfortunately we cannot to use standard > "SET" command, because it is used in Postgres for different purpose. > READ|WRITE are totally clear, and for user it is another signal so > variables are different than tables (so it is not on

Re: [HACKERS] proposal: schema variables

2018-09-19 Thread Pavel Stehule
Hi st 19. 9. 2018 v 13:23 odesílatel Arthur Zakirov napsal: > Hello, > > On Wed, Sep 19, 2018 at 10:30:31AM +0200, Pavel Stehule wrote: > > Hi > > > > new update: > > > > I fixed pg_restore, and I cleaned a code related to transaction > processing > > > > There should be a full functionality now.

Re: [HACKERS] proposal: schema variables

2018-09-19 Thread Arthur Zakirov
Hello, On Wed, Sep 19, 2018 at 10:30:31AM +0200, Pavel Stehule wrote: > Hi > > new update: > > I fixed pg_restore, and I cleaned a code related to transaction processing > > There should be a full functionality now. I reviewed a little bit the patch. I have a few comments. > pg_views Columns

Mentorship Initiative in Google Code-In

2018-09-19 Thread Neha Gupta
Hey all! I'm Neha and I participated in Google Summer of Code this year for Xwiki, since, xwiki is not participating in Google code-in this year, I would like to volunteer for mentorship for Drupal. Is there a vacancy for that? I’ve worked with CERN and a couple of startups in past and I’ve wo

Regarding Mentoring for GCI-18

2018-09-19 Thread The Coding Planet
Hello, I am Sunveer Singh, Google Code-in 2017 Grand Prize Winner with OSGeo. I am willing to be mentor for PostgreSQL. Last year I worked on almost 70 tasks based on GIS world. A student an Grand Prize winner I will be able to help you guys during the GCI period. And The programming languages a

Re: [HACKERS] Bug in to_timestamp().

2018-09-19 Thread amul sul
On Wed, Sep 19, 2018 at 3:51 PM amul sul wrote: > > On Wed, Sep 19, 2018 at 2:57 PM Alexander Korotkov [...] > > With this patch, to_date and to_timestamp behaving differently, see this: > > edb=# SELECT to_date('18 12 2011', 'xDDxMMx'); > to_date > > 18-DEC-11 00:0

Re: [HACKERS] Bug in to_timestamp().

2018-09-19 Thread amul sul
On Wed, Sep 19, 2018 at 2:57 PM Alexander Korotkov wrote: > > On Tue, Sep 18, 2018 at 4:42 PM Alexander Korotkov > wrote: > > But, I found related issue in cf9846724. Before it was: > > > > # select to_timestamp('2018 01 01', '9MM9DD'); > > to_timestamp > > > >

Re: [HACKERS] Bug in to_timestamp().

2018-09-19 Thread Alexander Korotkov
On Tue, Sep 18, 2018 at 4:42 PM Alexander Korotkov wrote: > But, I found related issue in cf9846724. Before it was: > > # select to_timestamp('2018 01 01', '9MM9DD'); > to_timestamp > > 2018-01-01 00:00:00+03 > (1 row) > > But after it becomes so. > > # select

Re: [HACKERS] proposal: schema variables

2018-09-19 Thread Pavel Stehule
Hi new update: I fixed pg_restore, and I cleaned a code related to transaction processing There should be a full functionality now. Regards Pavel schema-variables-20180919-01.patch.gz Description: application/gzip