Re: [HACKERS] Causal reads take II

2017-05-23 Thread Thomas Munro
On Mon, May 22, 2017 at 6:32 AM, Thomas Munro wrote: > On Mon, May 22, 2017 at 4:10 AM, Dmitry Dolgov <9erthali...@gmail.com> wrote: >> I'm wondering about status of this patch and how can I try it out? > > Hi Dmitry, thanks for your interest. > >>> On 3 January

Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-23 Thread Andres Freund
On 2017-05-23 22:47:07 -0400, Robert Haas wrote: > On Mon, May 22, 2017 at 11:42 AM, Andres Freund wrote: > > Ooops. > > > > Two issues: Firstly, we get a value smaller than seqmin, obviously > > that's not ok. But even if we'd error out, it'd imo still not be ok, > > because

[HACKERS] Shortened URLs for commit messages

2017-05-23 Thread Bruce Momjian
I have written the following sed script to convert regular Postgres email message URLs to their shorter form for commit messages: sed 's;http\(s\?\)://www\.postgresql\.org/message-id/;http\1://postgr.es/m/;gi' in case this is helpful to anyone. -- Bruce Momjian

Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-23 Thread Robert Haas
On Mon, May 22, 2017 at 11:42 AM, Andres Freund wrote: > Ooops. > > Two issues: Firstly, we get a value smaller than seqmin, obviously > that's not ok. But even if we'd error out, it'd imo still not be ok, > because we have a command that behaves partially transactionally >

Re: [HACKERS] Getting server crash after running sqlsmith

2017-05-23 Thread Robert Haas
On Tue, May 23, 2017 at 9:45 AM, Tom Lane wrote: > Robert Haas writes: >> Just out of curiosity, what happens if you try it with the attached patch? > > Surely that's pretty unsafe? Yes. I was just curious to see whether it would work. I think what

Re: [HACKERS] PG 10 release notes

2017-05-23 Thread Euler Taveira
2017-05-04 22:26 GMT-03:00 Andres Freund : > At least I was a bit more optimistic that we'd get a decent json plugin > into care soon-ish. While there was some initial work towards that, it > unfortunately stalled at some point. > > That was my initial idea but there wasn't

[HACKERS] FW: PGBuildfarm member peripatus Branch REL9_2_STABLE Status changed from PLCheck-C failure to OK

2017-05-23 Thread Larry Rosenman
Rebuilding Perl and all it’s related ports fixed it. Dealing with the FreeBSD folks on what all we (FreeBSD) need to put in /usr/ports/UPDATING and / or /usr/src/UPDATING -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail:

Re: [HACKERS] Tightening isspace() tests where behavior should match SQL parser

2017-05-23 Thread Tom Lane
Heikki Linnakangas writes: > On 05/20/2017 01:48 PM, Tom Lane wrote: >> Attached is a proposed patch. I'm vacillating on whether to >> back-patch this --- it will fix a reported bug, but it seems >> at least somewhat conceivable that it will also break cases >> that were working

Re: [HACKERS] Default Partition for Range

2017-05-23 Thread Beena Emerson
Hello, On Mon, May 22, 2017 at 11:29 AM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Mon, May 22, 2017 at 7:27 AM, Beena Emerson > wrote: > Would it be more readable if this reads as NOT > (constraint_for_partition_1 || constraint_for_partition_2 || >

Re: [HACKERS] pgbench more operators & functions

2017-05-23 Thread Pavel Stehule
Hi I am watching this patch - it looks so there are not problems. I found only issue in documentation - new CASE expression is not documented. Regards Pavel

[HACKERS] FW: PGBuildfarm member peripatus Branch REL9_2_STABLE Failed at Stage PLCheck-C

2017-05-23 Thread Larry Rosenman
Looks like the upgrade of this machine to the inode64 commit of FreeBSD busted stuff. I’m rebuilding perl and all the ports to see if that fixes it. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: l...@lerctr.org US Mail:

[HACKERS] unreachable code in partition.c

2017-05-23 Thread Jeevan Ladhe
Hi, Following code in function get_qual_for_list(partition.c) is not reachable. else result = list_make1(opexpr); Attached is the patch that removes this dead code. Regards, Jeevan Ladhe partition_remove_dead_code.patch Description: Binary data -- Sent via pgsql-hackers mailing list

Re: [HACKERS] walsender & parallelism

2017-05-23 Thread Petr Jelinek
On 23/05/17 19:45, Andres Freund wrote: > > > On May 23, 2017 1:42:41 PM EDT, Petr Jelinek > wrote: >> Hi, >> >> so this didn't really move anywhere AFAICS, do we think the approach >> I've chosen is good or do we want to do something else here? > > Can you add

Re: [HACKERS] Why does logical replication launcher set application_name?

2017-05-23 Thread Petr Jelinek
On 20/04/17 21:33, Peter Eisentraut wrote: > On 4/18/17 13:18, Tom Lane wrote: >> I think you're thinking about it wrong. To my mind the issue is that >> there should be some generic way to determine that a bgworker process >> is or is not laboring on behalf of an identifiable user. It's great

Re: [HACKERS] walsender & parallelism

2017-05-23 Thread Andres Freund
On May 23, 2017 1:42:41 PM EDT, Petr Jelinek wrote: >Hi, > >so this didn't really move anywhere AFAICS, do we think the approach >I've chosen is good or do we want to do something else here? Can you add it to the open items list? Andres -- Sent from my Android

Re: [HACKERS] walsender & parallelism

2017-05-23 Thread Petr Jelinek
Hi, so this didn't really move anywhere AFAICS, do we think the approach I've chosen is good or do we want to do something else here? -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing

[HACKERS] Broken hint bits (freeze)

2017-05-23 Thread Dmitriy Sarafannikov
Hi hackers, We have some problems on our production with hint bits and frozen tuples. More and more following errors began to appear on master after switchover: ERROR: 58P01: could not access status of transaction 1952523525 DETAIL: Could not open file "pg_clog/0746": No such file or directory.

[HACKERS] Seekable compressed TOAST [POC]

2017-05-23 Thread Sokolov Yura
Good day, everyone. It is just proposal. Main concern: allow compressed toast to be seekable. Since every chunk compressed separately, toast_fetch_datum_slice can fetch each slice separately as with EXTERNAL storage. Attached patch is couple of new column storage types: - EXTSEEKABLE - like

Re: [HACKERS] Getting server crash after running sqlsmith

2017-05-23 Thread Tom Lane
Robert Haas writes: > Just out of curiosity, what happens if you try it with the attached patch? Surely that's pretty unsafe? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-05-23 Thread Mithun Cy
Thanks, Andres, I have tried to fix all of your comments. One important change has happened with this patch is previously we used to read one block info structure at a time and load it. But now we read all of them together and load it into as DSA and then we distribute the block infos to the

Re: [HACKERS] Improve logical decoding error message (was wal_level > WAL_LEVEL_LOGICAL)

2017-05-23 Thread Andres Freund
On 2017-05-23 10:49:54 +, Neha Khatri wrote: > On Tue, 23 May 2017 at 10:55 am, Alvaro Herrera > wrote: > > > Neha Khatri wrote: > > > On Tue, May 23, 2017 at 10:26 AM, Michael Paquier < > > michael.paqu...@gmail.com > > > > > > There is no wal_level higher than

Re: [HACKERS] Getting server crash after running sqlsmith

2017-05-23 Thread tushar
On 05/23/2017 06:25 PM, Robert Haas wrote: Just out of curiosity, what happens if you try it with the attached patch? Thanks, issue seems to be fixed after applying your patch. -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company -- Sent via

Re: [HACKERS] Getting server crash after running sqlsmith

2017-05-23 Thread Robert Haas
On Tue, May 23, 2017 at 1:46 AM, tushar wrote: > On 03/29/2017 12:06 AM, Tom Lane wrote: >> >> Hm ... I don't see a crash here, but I wonder whether you have parameters >> set that would cause this query to be run as a parallel query? Because >> pg_rotate_logfile()

Re: [HACKERS] Regarding Postgres Dynamic Shared Memory (DSA)

2017-05-23 Thread Mahi Gurram
Hi Michael, Thanks for your response. All i'm building is In-Memory Index as an extension over Postgres. Postgres Indexes will get Insert calls and Read calls from various processes(typically client/connection process - forked processes to postmaster process). Hence i have to maintain my

retry shm attach for windows (WAS: Re: [HACKERS] OK, so culicidae is *still* broken)

2017-05-23 Thread Amit Kapila
On Sat, May 20, 2017 at 5:56 PM, Noah Misch wrote: > On Sat, Apr 15, 2017 at 02:30:18PM -0700, Andres Freund wrote: >> On 2017-04-15 17:24:54 -0400, Tom Lane wrote: >> > Andres Freund writes: >> > > On 2017-04-15 17:09:38 -0400, Tom Lane wrote: >> > >> Why

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-23 Thread Rafia Sabih
On Tue, May 23, 2017 at 4:41 PM, Amit Kapila wrote: > Isn't this point contradictory? Basically, on one side you are > suggesting to calculate additional workers (work_remaining) based on > selectivity and on another side you are saying that it will fix > estimation

Re: [HACKERS] Regarding Postgres Dynamic Shared Memory (DSA)

2017-05-23 Thread Michael Paquier
On Tue, May 23, 2017 at 6:42 AM, Mahi Gurram wrote: > I'm building In-Memory index extension for Postgres, for which i'm trying to > use DSA. But ended with some issues, as it is not allowing me to create > DSA(Dynamic Shared Area) in _PG_init function. > > Please refer

Re: [HACKERS] Error-like LOG when connecting with SSL for password authentication

2017-05-23 Thread Michael Paquier
On Tue, May 23, 2017 at 6:36 AM, Heikki Linnakangas wrote: > On 05/22/2017 10:11 PM, Vaishnavi Prabakaran wrote: >> >> On Mon, May 22, 2017 at 5:10 PM, Michael Paquier >> >> wrote: >> >>> If the protocol version is SSL >>> 3.0 or TLS 1.0, this result

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-23 Thread Amit Kapila
On Mon, May 22, 2017 at 2:54 PM, Rafia Sabih wrote: > On Wed, May 17, 2017 at 2:57 PM, Amit Kapila wrote: >> On Tue, May 16, 2017 at 2:14 PM, Ashutosh Bapat >> wrote: >>> On Mon, May 15, 2017 at 9:23 PM,

Re: [HACKERS] Regarding B-Tree Lookup

2017-05-23 Thread Mahi Gurram
Thank you all for your responses to help me out. The below code worked for me... pasting it here (May be helpful for someone) Relation heap; > ItemPointer ht_ctid; > heap = heap_open(50620, AccessShareLock); /* 50620 - Table/Relation Oid - > Hardcoded for better understanding */ ScanKeyInit(,

Re: [HACKERS] PROVE_FLAGS

2017-05-23 Thread Andrew Dunstan
On 17 May 2017 at 14:30, Robert Haas wrote: > On Tue, May 16, 2017 at 9:20 PM, Andrew Dunstan > wrote: >> Inheriting variables from the environment is a part of make by design. >> We have PG_PROVE_FLAGS for our own forced settings. > > I

Re: [HACKERS] Tightening isspace() tests where behavior should match SQL parser

2017-05-23 Thread Heikki Linnakangas
On 05/20/2017 01:48 PM, Tom Lane wrote: Attached is a proposed patch. I'm vacillating on whether to back-patch this --- it will fix a reported bug, but it seems at least somewhat conceivable that it will also break cases that were working acceptably before. Thoughts? +1 for back-patching. If

Re: [HACKERS] Improve logical decoding error message (was wal_level > WAL_LEVEL_LOGICAL)

2017-05-23 Thread Neha Khatri
On Tue, 23 May 2017 at 10:55 am, Alvaro Herrera wrote: > Neha Khatri wrote: > > On Tue, May 23, 2017 at 10:26 AM, Michael Paquier < > michael.paqu...@gmail.com > > > > There is no wal_level higher than logical, so the current sense looks > > > perfectly fine to me. > >

[HACKERS] Regarding Postgres Dynamic Shared Memory (DSA)

2017-05-23 Thread Mahi Gurram
Hello everyone, I'm building In-Memory index extension for Postgres, for which i'm trying to use DSA. But ended with some issues, as it is not allowing me to create DSA(Dynamic Shared Area) in _PG_init function. Please refer my_PG_init code below: > void > _PG_init(void) > { > area =

Re: [HACKERS] Error-like LOG when connecting with SSL for password authentication

2017-05-23 Thread Heikki Linnakangas
On 05/22/2017 10:11 PM, Vaishnavi Prabakaran wrote: On Mon, May 22, 2017 at 5:10 PM, Michael Paquier wrote: If the protocol version is SSL 3.0 or TLS 1.0, this result code is returned only if a closure alert has occurred in the protocol, i.e. if the connection has

Re: [HACKERS] Error-like LOG when connecting with SSL for password authentication

2017-05-23 Thread Heikki Linnakangas
On 05/22/2017 03:10 AM, Michael Paquier wrote: Hi all, When attempting to connect using password authentication through SSL, the backend will complain in its log with the following entry before calling sendAuthRequest(), which asks the client for a password: LOG: could not receive data from

[HACKERS] Index Only Scan support for cube

2017-05-23 Thread Andrew Borodin
Hi, hackers! Here's a small patch that implements fetch function necessary for Index Only Scans that use cube data type. I reuse function g_cube_decompress() instead of creating new function g_cube_fetch(). Essentially, they both have to detoast data. How do you think, is it better to create a

[HACKERS] ALTER SUBSCRIPTION ..SET PUBLICATION refresh is not throwing error.

2017-05-23 Thread tushar
Hi, ALTER SUBSCRIPTION ..SET PUBLICATION refresh is removing all the attached subscription('s). X Machine - s=# create table t(n int); CREATE TABLE s=# create table t1(n int); CREATE TABLE s=# create publication pub for table t,t1; CREATE PUBLICATION s=# Y Machine - s=# create table t(n

Re: [HACKERS] Create subscription with `create_slot=false` and incorrect slot name

2017-05-23 Thread Dmitry Dolgov
On 23 May 2017 at 07:26, Euler Taveira wrote: > > ReplicationSlotValidateName() should be called in parse_subscription_options() to avoid a pilot error. > IMHO we should prevent a future error (use of invalid slot name). Yes, I see now. I assume this little patch should be

Re: [HACKERS] ECPG: pg_type.h file is not synced

2017-05-23 Thread Michael Meskes
Hi, > I am looking at ECPG source code. In the "ecpg/ecpglib/pg_type.h" file I > have seen following comment: > > ** keep this in sync with src/include/catalog/pg_type.h* > > But I think the "ecpg/ecpglib/pg_type.h" file is currently not synced > with the above file. > > I have added the

Re: [HACKERS] Regression in join selectivity estimations when using foreign keys

2017-05-23 Thread David Rowley
On 22 May 2017 at 16:10, David Rowley wrote: > I also just noticed that I don't think I've got ANTI join cases > correct in the patch I sent. I'll look at that now. I've attached an updated patch. This one is much less invasive than my original attempt. There are

[HACKERS] ECPG: pg_type.h file is not synced

2017-05-23 Thread vinayak
Hello, I am looking at ECPG source code. In the "ecpg/ecpglib/pg_type.h" file I have seen following comment: ** keep this in sync with src/include/catalog/pg_type.h* But I think the "ecpg/ecpglib/pg_type.h" file is currently not synced with the above file. I have added the remaining types

Re: [HACKERS] Create subscription with `create_slot=false` and incorrect slot name

2017-05-23 Thread Kuntal Ghosh
On Tue, May 23, 2017 at 10:56 AM, Euler Taveira wrote: > 2017-05-22 17:52 GMT-03:00 Dmitry Dolgov <9erthali...@gmail.com>: >> >> Maybe this question was already raised before, but I couldn't find a >> discussion. When I'm creating a subscription with `create_slot=false` >>