Re: [HACKERS] Logical replication existing data copy

2017-01-19 Thread Erik Rijkers
On 2017-01-18 20:45, Petr Jelinek wrote: AFAICS you should always get error from that test after you enable the Ah tes, you were right, of course; I had assumed the earlier mentioned CREATE SUBSCRIPTION ... [ WITH (COPY DATA | NOCOPY DATA) ] but that syntax wasn't implemented, I now

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-01-19 Thread Masahiko Sawada
On Thu, Jan 19, 2017 at 4:04 PM, vinayak wrote: > > On 2017/01/16 17:35, Masahiko Sawada wrote: >> >> On Fri, Jan 13, 2017 at 3:48 PM, Masahiko Sawada >> wrote: >>> >>> On Fri, Jan 13, 2017 at 3:20 PM, Ashutosh Bapat >>>

Re: [HACKERS] Parallel Index Scans

2017-01-19 Thread Amit Kapila
On Tue, Jan 17, 2017 at 11:27 PM, Robert Haas wrote: > On Mon, Jan 16, 2017 at 7:11 AM, Amit Kapila wrote: >> Fixed. > > Thanks for the update. Some more comments: > > It shouldn't be necessary for MultiExecBitmapIndexScan to modify the >

Re: [HACKERS] parallelize queries containing subplans

2017-01-19 Thread Kuntal Ghosh
On Thu, Jan 19, 2017 at 3:05 PM, Dilip Kumar wrote: > @@ -1213,6 +1216,7 @@ SS_process_ctes(PlannerInfo *root) > >firstColCollation); > splan->useHashTable = false; > splan->unknownEqFalse = false; > + splan->parallel_safe = best_path->parallel_safe; > > I noticed

Re: [HACKERS] RustgreSQL

2017-01-19 Thread Ewan Higgs
> It seems someone tried (perhaps ran out of steam, unfortunately): > * Postgres extensions written in Rust * > https://github.com/thehydroimpulse/postgres-extension.rs There is another effort which looks active and promising: (R)ust (P)ost(g)res FFI https://github.com/posix4e/rpgffi This is

Re: [HACKERS] parallelize queries containing subplans

2017-01-19 Thread Dilip Kumar
On Mon, Jan 16, 2017 at 9:13 PM, Amit Kapila wrote: > > After commit-ab1f0c8, this patch needs a rebase. Attached find > rebased version of the patch. > > Thanks to Kuntal for informing me offlist that this patch needs rebase. In this patch, I have observed some changes

Re: [HACKERS] parallelize queries containing subplans

2017-01-19 Thread Dilip Kumar
On Thu, Jan 19, 2017 at 3:05 PM, Dilip Kumar wrote: > During debugging I found that subplan created for below part of the > query is parallel_unsafe, Is it a problem or there is some explanation > of why it's not parallel_safe, Okay, so basically we don't have any

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2017-01-19 Thread Anastasia Lubennikova
28.12.2016 23:43, Claudio Freire: Attached v4 patches with the requested fixes. Sorry for being late, but the tests took a lot of time. create table t1 as select i, md5(random()::text) from generate_series(0,4) as i; create index md5_idx ON t1(md5); update t1 set md5 = md5((random()

Re: [HACKERS] Declarative partitioning - another take

2017-01-19 Thread Amit Langote
On 2017/01/19 14:15, Amit Langote wrote: > So, here are all the patches I posted to date (and one new at the bottom) > for reported and unreported bugs, excluding the one involving > BulkInsertState for which you replied in a new thread. > > I'll describe the attached patches in brief: Sorry, I

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2017-01-19 Thread Claudio Freire
On Thu, Jan 19, 2017 at 6:33 AM, Anastasia Lubennikova wrote: > 28.12.2016 23:43, Claudio Freire: > > Attached v4 patches with the requested fixes. > > > Sorry for being late, but the tests took a lot of time. I know. Takes me several days to run my test scripts

Re: [HACKERS] Parallel Index Scans

2017-01-19 Thread Amit Kapila
On Thu, Jan 19, 2017 at 12:28 AM, Robert Haas wrote: > On Mon, Jan 16, 2017 at 7:11 AM, Amit Kapila wrote: >> Fixed. > > With respect to the second patch > (parallel_index_opt_exec_support_v4.patch), I'm hoping it can use the > new function from

Re: [HACKERS] Parallel Index Scans

2017-01-19 Thread Amit Kapila
On Wed, Jan 18, 2017 at 6:25 AM, Haribabu Kommi wrote: > > > On Mon, Jan 16, 2017 at 11:11 PM, Amit Kapila > wrote: >> >> >> Changed as per suggestion. >> >> >> I have also rebased the optimizer/executor support patch >>

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-01-19 Thread Kyotaro HORIGUCHI
Hello, At Wed, 18 Jan 2017 12:34:51 +0900, Michael Paquier wrote in > On Tue, Jan 17, 2017 at 7:36 PM, Kyotaro HORIGUCHI > wrote: > > I managed to reproduce this. A

Re: [HACKERS] PoC: Grouped base relation

2017-01-19 Thread Antonin Houska
Tomas Vondra wrote: > On 01/17/2017 08:05 PM, Antonin Houska wrote: > > Tomas Vondra wrote: > > > > > >> Another thing is that in my experience most queries do joins on foreign > >> keys > >> (so the PK side is unique by definition),

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2017-01-19 Thread Simon Riggs
On 19 January 2017 at 06:32, Noah Misch wrote: > On Wed, Jan 18, 2017 at 02:30:38PM +0900, Michael Paquier wrote: >> On Wed, Jan 18, 2017 at 2:23 PM, Noah Misch wrote: >> > The latest versions document this precisely, but I agree with Peter's >> > concern

Re: [HACKERS] parallelize queries containing subplans

2017-01-19 Thread Kuntal Ghosh
On Thu, Jan 19, 2017 at 3:19 PM, Kuntal Ghosh wrote: > Since Param is not parallel_safe till now, the SubPlan is also not > parallel_safe. This is why CTE subplans will not be pushed under > Gather. Specifically, Params which are generated using generate_new_param()

Re: [HACKERS] pageinspect: Hash index support

2017-01-19 Thread Ashutosh Sharma
Hi, I got some 'trailing whitespace' error (shown below) when git applying v7 patch attached upthread. I have corrected the same and also ran pgindent on a new file 'hashfuncs.c' added as a part of this project. Attached is the updated v8 patch.

Re: [HACKERS] Parallel Index-only scan

2017-01-19 Thread Rafia Sabih
On Fri, Jan 13, 2017 at 2:19 PM, Rafia Sabih wrote: > On Thu, Jan 12, 2017 at 5:39 PM, Rahila Syed wrote: >> Hello, >> >> On applying the patch on latest master branch and running regression tests >> following failure occurs. >> I applied it

Re: [HACKERS] parallelize queries containing subplans

2017-01-19 Thread Kuntal Ghosh
On Thu, Jan 19, 2017 at 4:51 PM, Dilip Kumar wrote: > On Thu, Jan 19, 2017 at 3:05 PM, Dilip Kumar wrote: >> During debugging I found that subplan created for below part of the >> query is parallel_unsafe, Is it a problem or there is some explanation

Re: [HACKERS] PoC: Grouped base relation

2017-01-19 Thread Antonin Houska
Antonin Houska wrote: Well, the following one does not seem to be a typical example. I could generate the plan, but now I think that the aggregation push down does not in general decrease the number of groups the final aggregation has to process. Maybe I just hit planner

Re: [HACKERS] Causal reads take II

2017-01-19 Thread Thomas Munro
On Thu, Jan 19, 2017 at 8:11 PM, Ants Aasma wrote: > On Tue, Jan 3, 2017 at 3:43 AM, Thomas Munro > wrote: >> Long term, I think it would be pretty cool if we could develop a set >> of features that give you distributed sequential consistency

[HACKERS] How to extract bytes from a bit/bit(n) Datum pointer?

2017-01-19 Thread valeriof
Hi, This may come from my lack of experience with Postgres, but I'm trying to extract the byte portion of a Datum that is of type VarBit - bit/bit(n). I see that the Datum pointer contains the value content of the bytes (after a few bytes for the header) but I would need to point to the actual

Re: [HACKERS] pg_hba_file_settings view patch

2017-01-19 Thread Michael Paquier
On Thu, Jan 19, 2017 at 9:28 PM, Ashutosh Bapat wrote: > On Thu, Jan 19, 2017 at 1:26 PM, Michael Paquier > wrote: >> On Thu, Jan 19, 2017 at 4:25 PM, Haribabu Kommi >> wrote: >>> Added the cleanup mechanism.

Re: [HACKERS] Review: GIN non-intrusive vacuum of posting tree

2017-01-19 Thread Andrew Borodin
Hi, Jeff! Thanks for review! Here's a patch corrected according to your suggestions. 2017-01-19 11:48 GMT+05:00 Jeff Davis : > https://www.postgresql.org/message-id/CAJEAwVE4UAmm8fr%2BNW8XTnKV6M--ACoNhL3ES8yoKL2sKhbaiw%40mail.gmail.com > > Let me re-summarize what's been done

Re: [HACKERS] pg_hba_file_settings view patch

2017-01-19 Thread Ashutosh Bapat
On Thu, Jan 19, 2017 at 1:26 PM, Michael Paquier wrote: > On Thu, Jan 19, 2017 at 4:25 PM, Haribabu Kommi > wrote: >> Added the cleanup mechanism. But the tokenize_file() function call >> present in many places, But in one flow still it is

Re: [HACKERS] patch: function xmltable

2017-01-19 Thread Pavel Stehule
2017-01-19 13:35 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > Hi > > > > New update - rebase after yesterday changes. > > > > What you want to change? > > I think the problem might come from the still pending patch on that > series, which Andres posted in >

Re: [HACKERS] PoC: Grouped base relation

2017-01-19 Thread Antonin Houska
Ashutosh Bapat wrote: > >> 1. Pushing down aggregates/groups down join tree, so that the number of > >> rows > >> to be joined decreases. This might be a good optimization to have. However > >> there are problems in the current patch. Every path built for a

Re: [HACKERS] patch: function xmltable

2017-01-19 Thread Alvaro Herrera
Pavel Stehule wrote: > Hi > > New update - rebase after yesterday changes. > > What you want to change? I think the problem might come from the still pending patch on that series, which Andres posted in https://www.postgresql.org/message-id/20170118221154.aldebi7yyjvds...@alap3.anarazel.de As

Re: [HACKERS] How to extract bytes from a bit/bit(n) Datum pointer?

2017-01-19 Thread Ashutosh Bapat
On Thu, Jan 19, 2017 at 5:53 PM, valeriof wrote: > Hi, > > This may come from my lack of experience with Postgres, but I'm trying to > extract the byte portion of a Datum that is of type VarBit - bit/bit(n). I > see that the Datum pointer contains the value content

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-01-19 Thread Pavan Deolasee
Hi Alvaro, On Tue, Jan 17, 2017 at 8:41 PM, Alvaro Herrera wrote: > Reading through the track_root_lp patch now. > > Thanks for the review. > > + /* > > + * For HOT (or WARM) updated tuples, we store the offset > of the root > > +

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-19 Thread Karl O. Pinc
On Thu, 19 Jan 2017 16:59:10 +0900 Michael Paquier wrote: > On Thu, Jan 19, 2017 at 7:27 AM, Alvaro Herrera > wrote: > > I don't think the "abstract names" stuff is an improvement (just > > look at the quoting mess in ConfigureNamesString).

[HACKERS] Fix documentation typo

2017-01-19 Thread Ishii Ayumi
Hi, Here is a patch that adds temporary column's description to pg_replication_slots document. Regards, -- Ayumi Ishii fix_document_typo.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Causal reads take II

2017-01-19 Thread Ants Aasma
On Thu, Jan 19, 2017 at 2:22 PM, Thomas Munro wrote: > On Thu, Jan 19, 2017 at 8:11 PM, Ants Aasma wrote: >> On Tue, Jan 3, 2017 at 3:43 AM, Thomas Munro >> wrote: >>> Long term, I think it would be pretty cool

Re: [HACKERS] How to extract bytes from a bit/bit(n) Datum pointer?

2017-01-19 Thread valeriof
Thank you Ashutosh! I've been looking everywhere for this info -- View this message in context: http://postgresql.nabble.com/How-to-extract-bytes-from-a-bit-bit-n-Datum-pointer-tp5939776p5939811.html Sent from the PostgreSQL - hackers mailing list archive at Nabble.com. -- Sent via

[HACKERS] SEGFAULT in HEAD with replication

2017-01-19 Thread Dave Cramer
The travis job https://travis-ci.org/pgjdbc/pgjdbc/jobs/192517342 is seeing a segfault when we are testing against HEAD with REPLICATION turned on. Logs can be found here https://drive.google.com/drive/folders/0B-Heg5ZYCWbreEE4Uk5LdnJ5eWM?usp=sharing Regards, Dave Cramer

[HACKERS] comment ends in the middle of a

2017-01-19 Thread Robert Haas
ProcessStartupPacket() in src/backend/postmaster/postmaster.c contains the following comment: /* * Due to backward compatibility concerns the replication * parameter is a hybrid beast which allows

Re: [HACKERS] Microvacuum support for Hash Index

2017-01-19 Thread Jesper Pedersen
Hi Ashutosh, On 01/10/2017 08:40 AM, Jesper Pedersen wrote: On 01/10/2017 05:24 AM, Ashutosh Sharma wrote: Thanks for reporting this problem. It is basically coming because i forgot to unpin the bucketbuf in hash_xlog_vacuum_one_page(). Please find the attached v5 patch that fixes the issue.

Re: [HACKERS] PoC: Grouped base relation

2017-01-19 Thread Ashutosh Bapat
> >> Yes, it's hard, but I think without having a separate RelOptInfo the >> design won't be complete. Is there a subset of problem that can be >> solved by using a separate RelOptInfo e.g. pushing aggregates down >> child relations or anything else. > > I'm still not convinced that all the fields

Re: [HACKERS] [COMMITTERS] pgsql: Generate fmgr prototypes automatically

2017-01-19 Thread Peter Eisentraut
On 1/17/17 3:07 PM, Tom Lane wrote: > Alternatively ... is there a specific reason why you chose to make > builtins.h the key inclusion file for this change, rather than having > callers include fmgrprotos.h directly? It seems like the stuff remaining > in builtins.h is just a laundry list of

Re: [HACKERS] [JDBC] SEGFAULT in HEAD with replication

2017-01-19 Thread Vladimir Gordiychuk
Last success build from postgresql HEAD was 20 days ago https://travis-ci.org/pgjdbc/pgjdbc/builds/187764274 We detect this problem 3 days ago. 2017-01-19 17:22 GMT+03:00 Dave Cramer : > The travis job https://travis-ci.org/pgjdbc/pgjdbc/jobs/192517342 is > seeing a

Re: [HACKERS] [JDBC] SEGFAULT in HEAD with replication

2017-01-19 Thread Vladimir Gordiychuk
Core dump was extracted from this build https://travis-ci.org/Gordiychuk/pgjdbc/builds/193318018 2017-01-19 17:38 GMT+03:00 Vladimir Gordiychuk : > Last success build from postgresql HEAD was 20 days ago > https://travis-ci.org/pgjdbc/pgjdbc/builds/187764274 > We detect this

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Peter Eisentraut
On 1/19/17 9:53 AM, Stephen Frost wrote: > Sure, but we're talking about replaying WAL vs. doing a checkpoint, not > about writing WAL vs. replaying WAL. Replaying WAL and doing a > checkpoint both require writing to lots of different places across the > filesystem, of course. Yeah, but they are

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 1/18/17 3:12 PM, Stephen Frost wrote: > > I don't understand what I'm missing when it comes to checkpoint_timeout > > and the time required to recover from a crash. You aren't the first > > person to question that

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Peter Eisentraut
On 1/18/17 3:47 PM, Robert Haas wrote: > Anybody who has got a script that runs pg_ctl unattended mode likely > now has to go update that script to add --no-wait. The state of init scripts and other start scripts out there is such a mess, it's hard to make general statements like this. Many

Re: [HACKERS] ISO/IEC 9075-2:2016 for postgres community

2017-01-19 Thread Wolfgang Wilhelm
Hi, are you looking for something like this: jtc1sc32.org/doc/N2301-2350/32N2311T-text_for_ballot-CD_9075-2.pdf ? Kind Regards, Wolfgang Oleg Bartunov schrieb am 16:39 Dienstag, 17.Januar 2017: On Tue, Jan 17, 2017 at 6:26 PM, Alvaro Herrera

Re: [HACKERS] [PATCH] Fix minor race in commit_ts SLRU truncation vs lookups

2017-01-19 Thread Alvaro Herrera
Peter Eisentraut wrote: > Also, I wonder whether we should not in vacuum.c change the order of the > calls of SetTransactionIdLimit() and SetMultiXactIdLimit() as well, just > to keep everything consistent. I am wary of doing that. The current coding is well battle-tested by now, but doing

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 1/19/17 9:53 AM, Stephen Frost wrote: > > Sure, but we're talking about replaying WAL vs. doing a checkpoint, not > > about writing WAL vs. replaying WAL. Replaying WAL and doing a > > checkpoint both require writing to lots of

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Peter Eisentraut
On 1/18/17 3:12 PM, Stephen Frost wrote: > I don't understand what I'm missing when it comes to checkpoint_timeout > and the time required to recover from a crash. You aren't the first > person to question that association, but it seems pretty clear to me. > > When doing recovery, we have to

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 1/18/17 3:47 PM, Robert Haas wrote: > > Anybody who has got a script that runs pg_ctl unattended mode likely > > now has to go update that script to add --no-wait. > > The state of init scripts and other start scripts out there is

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-19 Thread Karl O. Pinc
On Wed, 18 Jan 2017 19:27:40 -0300 Alvaro Herrera wrote: > Karl O. Pinc wrote: > > > @@ -511,10 +519,16 @@ int > > SysLogger_Start(void) > > { > > pid_t sysloggerPid; > > - char *filename; > > > > + /* > > +* Logging collector is not

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-19 Thread Alvaro Herrera
Karl O. Pinc wrote: > On Wed, 18 Jan 2017 19:27:40 -0300 > Alvaro Herrera wrote: > > I thought this part was odd -- I mean, why is SysLogger_Start() being > > called if the collector is not enabled? Turns out we do it and return > > early if not enabled. But not in

Re: [HACKERS] ISO/IEC 9075-2:2016 for postgres community

2017-01-19 Thread Peter Eisentraut
On 1/19/17 10:03 AM, Wolfgang Wilhelm wrote: > are you looking for something like this: > jtc1sc32.org/doc/N2301-2350/32N2311T-text_for_ballot-CD_9075-2.pdf ? That's not very recent. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA,

Re: [HACKERS] ISO/IEC 9075-2:2016 for postgres community

2017-01-19 Thread Albe Laurenz
Wolfgang Wilhelm wrote: > are you looking for something like this: > jtc1sc32.org/doc/N2301-2350/32N2311T-text_for_ballot-CD_9075-2.pdf ? That looks like it is from 2013... Yours, Laurenz Albe -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Too many autovacuum workers spawned during forced auto-vacuum

2017-01-19 Thread Robert Haas
On Tue, Jan 17, 2017 at 4:02 PM, Robert Haas wrote: > Amit's chosen yet another possible place to insert the guard: teach > autovacuum that if a worker skips at least one table due to concurrent > autovacuum activity AND ends up vacuuming no tables, don't call >

Re: [HACKERS] postgres_fdw bug in 9.6

2017-01-19 Thread Robert Haas
On Wed, Jan 18, 2017 at 10:26 PM, Ashutosh Bapat wrote: >> Yes, I think that's broadly the approach Tom was recommending. > > I don't have problem with that approach, but the latest patch has > following problems. > 1. We are copying chunks of path creation logic,

Re: [HACKERS] [JDBC] SEGFAULT in HEAD with replication

2017-01-19 Thread Tom Lane
=?UTF-8?Q?Jorge_Sol=C3=B3rzano?= writes: > After many tries I get this: > #0 0x00836950 in exec_bind_message (input_message=0x7ffce81048a0) > at postgres.c:1562 Hmm ... that line was last touched by ab1f0c822, so I'm betting that I broke it somehow, but I'm not sure

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-19 Thread Tom Lane
Andres Freund writes: > Maybe we ought to remove the paranoia bit about retset > though - it's not paranoia if it has an effect. Exactly, and I already did that in my version. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Parallel Index Scans

2017-01-19 Thread Robert Haas
On Wed, Jan 18, 2017 at 8:03 AM, Amit Kapila wrote: >> Why do we need separate AM support for index_parallelrescan()? Why >> can't index_rescan() cover that case? > > The reason is that sometime index_rescan is called when we have to > just update runtime scankeys in

Re: [HACKERS] Causal reads take II

2017-01-19 Thread Thomas Munro
On Fri, Jan 20, 2017 at 3:01 AM, Ants Aasma wrote: > Yes there is a race even with all transactions having the same > synchronization level. But nobody will mind if we some day fix that > race. :) We really should fix that! > With different synchronization levels it is much

Re: [HACKERS] Improving RLS planning

2017-01-19 Thread Tom Lane
Andreas Seltenreich writes: > sqlsmith doesn't seem to like 215b43cdc: > select 1 from information_schema.usage_privileges > where information_schema._pg_keysequal( >(select null::smallint[]), >'{16,25,23}'); > -- TRAP: FailedAssertion("!(!and_clause((Node *)

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-19 Thread Andres Freund
On 2017-01-19 13:06:20 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2017-01-18 16:56:46 -0500, Tom Lane wrote: > >> Andres Freund writes: > >> I have not actually looked at 0003 at all yet. So yeah, please post > >> for review after you're done

Re: [HACKERS] delta relations in AFTER triggers

2017-01-19 Thread Nico Williams
On Sat, Dec 17, 2016 at 08:15:49PM -0600, Kevin Grittner wrote: > On Sun, Dec 4, 2016 at 11:35 PM, Haribabu Kommi > wrote: > > Moved to next CF with "waiting on author" status. > > [...] I hope what I've done about delta relations will be mostly irrelevant given your

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-19 Thread Tom Lane
Andres Freund writes: > On 2017-01-18 16:56:46 -0500, Tom Lane wrote: >> Andres Freund writes: >> I have not actually looked at 0003 at all yet. So yeah, please post >> for review after you're done rebasing. > Here's a rebased and lightly massaged

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-19 Thread Karl O. Pinc
On Thu, 19 Jan 2017 12:12:18 -0300 Alvaro Herrera wrote: > Karl O. Pinc wrote: > > On Wed, 18 Jan 2017 19:27:40 -0300 > > Alvaro Herrera wrote: > > > > I thought this part was odd -- I mean, why is SysLogger_Start() > > > being called if

Re: [HACKERS] Declarative partitioning - another take

2017-01-19 Thread Robert Haas
On Thu, Jan 19, 2017 at 12:15 AM, Amit Langote wrote: > 0001-Fix-a-bug-of-insertion-into-an-internal-partition.patch > > Since implicit partition constraints are not inherited, an internal > partition's constraint was not being enforced when targeted directly. > So,

Re: [HACKERS] Too many autovacuum workers spawned during forced auto-vacuum

2017-01-19 Thread Alvaro Herrera
Robert Haas wrote: > After sleeping on this, I'm inclined to go with Amit's fix for now. > It seems less likely to break anything in the back-branches than any > other option I can think up. Yeah, no objections here. Note typo "imporatant" in the comment. -- Álvaro Herrera

Re: [HACKERS] [PATCH] Fix minor race in commit_ts SLRU truncation vs lookups

2017-01-19 Thread Peter Eisentraut
On 1/19/17 10:06 AM, Alvaro Herrera wrote: >> Also, I wonder whether we should not in vacuum.c change the order of the >> calls of SetTransactionIdLimit() and SetMultiXactIdLimit() as well, just >> to keep everything consistent. > > I am wary of doing that. The current coding is well

Re: [HACKERS] [PATCH] Fix minor race in commit_ts SLRU truncation vs lookups

2017-01-19 Thread Alvaro Herrera
Robert Haas wrote: > On Thu, Jan 19, 2017 at 10:06 AM, Alvaro Herrera > wrote: > > Peter Eisentraut wrote: > > > >> Also, I wonder whether we should not in vacuum.c change the order of the > >> calls of SetTransactionIdLimit() and SetMultiXactIdLimit() as well, just > >>

Re: [HACKERS] Parallel Index Scans

2017-01-19 Thread Robert Haas
On Thu, Jan 19, 2017 at 4:26 AM, Amit Kapila wrote: > Fixed. I think that the whole idea of GatherSupportsBackwardScan is wrong. Gather doesn't support a backwards scan under any circumstances, whether the underlying node does or not. You can read the tuples once, in

Re: [HACKERS] Logical Replication WIP - FailedAssertion, File: "array_typanalyze.c", Line: 340

2017-01-19 Thread Petr Jelinek
On 19/01/17 18:44, Erik Rijkers wrote: > > Could probably be whittled down to something shorter but I hope it's > still easily reproduced. > Just analyze on the pg_subscription is enough. Looks like it's the name[] type, when I change it to text[] like in the attached patch it works fine for

Re: [HACKERS] [JDBC] SEGFAULT in HEAD with replication

2017-01-19 Thread Jorge Solórzano
After many tries I get this: #0 0x00836950 in exec_bind_message (input_message=0x7ffce81048a0) at postgres.c:1562 #1 0x0083a23d in PostgresMain (argc=1, argv=0x2bd93d8, dbname=0x2bd9130 "test", username=0x2bd9110 "test") at postgres.c:4113 #2 0x007aacd4 in BackendRun

[HACKERS] [PATCH] Change missleading comment for tm_mon field of pg_tm structure

2017-01-19 Thread Dmitry Fedin
According to usages, tm_mon (month) field has origin 1, not 0. This is difference from C-library version of struct tm, which has origin 0 for real. For example: ```C if (DateOrder == DATEORDER_DMY) sprintf(str, "%02d/%02d", tm->tm_mday, tm->tm_mon); else sprintf(str, "%02d/%02d",

Re: [HACKERS] [JDBC] SEGFAULT in HEAD with replication

2017-01-19 Thread Craig Ringer
On 20 Jan. 2017 04:13, "Robert Haas" wrote: On Thu, Jan 19, 2017 at 12:09 PM, Dave Cramer wrote: > I would have expected more, but this is what I have > > bt full > #0 InitPredicateLocks () at predicate.c:1250 > i = > info =

Re: [HACKERS] [JDBC] SEGFAULT in HEAD with replication

2017-01-19 Thread Dave Cramer
Not sure you can get the exec. We are working on producing the BT from Travis-CI or I will build and run the test locally and get the trace Dave Cramer On 19 January 2017 at 15:31, Craig Ringer wrote: > > > On 20 Jan. 2017 04:13, "Robert Haas"

Re: [HACKERS] pgbench - allow backslash continuations in \set expressions

2017-01-19 Thread Tom Lane
Rafia Sabih writes: > Okay, I am marking it as 'Ready for committer' with the following note > to committer, > I am getting whitespace errors in v3 of patch, which I corrected in > v4, however, Fabien is of the opinion that v3 is clean and is showing > whitespace

Re: [HACKERS] SERIALIZABLE on standby servers

2017-01-19 Thread Thomas Munro
On Wed, Nov 16, 2016 at 9:26 AM, Thomas Munro wrote: > On Tue, Nov 8, 2016 at 5:56 PM, Thomas Munro > wrote: > [..] Another solution > could be to have recovery on the standby detect tokens (CSNs > incremented by

Re: [HACKERS] delta relations in AFTER triggers

2017-01-19 Thread Kevin Grittner
Attached is v9 which fixes bitrot from v8. No other changes. Still needs review. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company transition-v9.diff.gz Description: GNU Zip compressed data -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Improving RLS planning

2017-01-19 Thread Andreas Seltenreich
Tom Lane writes: > Thanks for reviewing --- I'll do something with that test case and > push it. sqlsmith doesn't seem to like 215b43cdc: select 1 from information_schema.usage_privileges where information_schema._pg_keysequal( (select null::smallint[]), '{16,25,23}'); -- TRAP:

Re: [HACKERS] [PATCH] Fix minor race in commit_ts SLRU truncation vs lookups

2017-01-19 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 12/29/16 4:28 AM, Craig Ringer wrote: > > On 29 December 2016 at 16:51, Craig Ringer wrote: > >> On 28 December 2016 at 22:16, Petr Jelinek > >> wrote: > >> > >>> About the patch, it looks good to me for master

Re: [HACKERS] [JDBC] SEGFAULT in HEAD with replication

2017-01-19 Thread Jorge Solórzano
Yes, in fact it's a totally empty string: https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/jdbc/PgConnection.java#L1317 Jorge Solórzano me.jorsol.com On Thu, Jan 19, 2017 at 3:57 PM, Tom Lane wrote: > =?UTF-8?Q?Jorge_Sol=C3=B3rzano?=

Re: [HACKERS] [JDBC] SEGFAULT in HEAD with replication

2017-01-19 Thread Tom Lane
I wrote: > Hmm ... that line was last touched by ab1f0c822, so I'm betting that > I broke it somehow, but I'm not sure how. > It looks like S_3 might have been parsed from a totally empty source > string? But if that's the trigger, I'd think it'd be entirely trivial > to reproduce. Oh, duh: the

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Michael Paquier
On Fri, Jan 20, 2017 at 12:06 AM, Stephen Frost wrote: > We did make the WAL checksum routines a lot > faster with 9.6, as I recall, so perhaps there's been some change there > too. 9.5, commit 5028f22f with Abhijit's and Heikki's work on CRC-32 computations. -- Michael --

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: > On 2017-01-19 10:06:09 -0500, Stephen Frost wrote: > > WAL replay does do more work, generally speaking (the WAL has to be > > read, the checksum validated on it, and then the write has to go out, > > while the checkpointer just writes the page out

[HACKERS] Possible issue with expanded object infrastructure on Postgres 9.6.1

2017-01-19 Thread Peter Geoghegan
A customer is on 9.6.1, and complains of a segfault observed at least 3 times. In all cases, the logs look like this: Jan 11 16:11:07 ip-10-0-118-82 kernel: [41913.530453] traps: postgres[6561] general protection ip:55fcf08b0491 sp:7ffc17dfa650 error:0 in postgres[55fcf0557000+638000] Jan 11

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Andres Freund
On 2017-01-19 20:45:57 -0500, Stephen Frost wrote: > * Andres Freund (and...@anarazel.de) wrote: > > On 2017-01-19 10:06:09 -0500, Stephen Frost wrote: > > > WAL replay does do more work, generally speaking (the WAL has to be > > > read, the checksum validated on it, and then the write has to go

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-19 Thread Michael Paquier
On Fri, Jan 20, 2017 at 12:08 AM, Karl O. Pinc wrote: > Is this an argument for having the current_logfiles always exist > and be empty when there is no in-filesystem logfile? It always felt > to me that the code would be simpler that way. Well, you'll need to do something in any

Re: [HACKERS] pg_hba_file_settings view patch

2017-01-19 Thread Haribabu Kommi
On Thu, Jan 19, 2017 at 11:28 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Thu, Jan 19, 2017 at 1:26 PM, Michael Paquier > wrote: > > On Thu, Jan 19, 2017 at 4:25 PM, Haribabu Kommi > > wrote: > >> Added the cleanup

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Andres Freund
On 2017-01-19 10:06:09 -0500, Stephen Frost wrote: > WAL replay does do more work, generally speaking (the WAL has to be > read, the checksum validated on it, and then the write has to go out, > while the checkpointer just writes the page out from memory), but it's > also dealing with less

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Fri, Jan 20, 2017 at 12:06 AM, Stephen Frost wrote: > > We did make the WAL checksum routines a lot > > faster with 9.6, as I recall, so perhaps there's been some change there > > too. > > 9.5, commit 5028f22f with

[HACKERS] Failure on sittella

2017-01-19 Thread Andres Freund
Hi Andrew, All, There's a buildfarm failure (just on sittella so far) that I can't quite interpret from here. Timing wise it looks like it might be correlated with ea15e18677fc2eff3135023e27f69ed8821554ed - "Remove obsoleted code relating to targetlist SRF evaluation." but I'm not quite seeing

[HACKERS] SearchSysCache, SysCacheGetAttr, and heap_getattr()

2017-01-19 Thread Stephen Frost
Greetings, There's some inconsistency when it comes to if we actually use SysCacheGetAttr() when pulling an attribute for a tuple we got via SearchSysCache(), or if we use heap_getattr(). Maybe I'm missing something, but that seems less than ideal. I've generally been under the belief that

Re: [HACKERS] postgres_fdw bug in 9.6

2017-01-19 Thread Etsuro Fujita
On 2017/01/19 12:26, Ashutosh Bapat wrote: On Thu, Jan 19, 2017 at 2:14 AM, Robert Haas wrote: On Fri, Jan 13, 2017 at 6:22 AM, Etsuro Fujita wrote: My biggest concern about GetExistingLocalJoinPath is that might not be extendable to the

Re: [HACKERS] New SQL counter statistics view (pg_stat_sql)

2017-01-19 Thread vinayak
On 2017/01/18 14:15, Haribabu Kommi wrote: On Sat, Jan 14, 2017 at 2:58 AM, Dilip Kumar > wrote: On Wed, Jan 11, 2017 at 7:47 PM, Dilip Kumar > wrote: > +void >

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: > On 2017-01-19 20:45:57 -0500, Stephen Frost wrote: > > * Andres Freund (and...@anarazel.de) wrote: > > > On 2017-01-19 10:06:09 -0500, Stephen Frost wrote: > > > > WAL replay does do more work, generally speaking (the WAL has to be > > > > read, the

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-01-19 Thread Kyotaro HORIGUCHI
Hello, At Thu, 19 Jan 2017 18:37:31 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170119.183731.223893446.horiguchi.kyot...@lab.ntt.co.jp> > > > - Delaying recycling a segment until the last partial record on it > > > completes. This seems doable

Re: [HACKERS] [WIP]Vertical Clustered Index (columnar store extension)

2017-01-19 Thread Haribabu Kommi
On Wed, Jan 18, 2017 at 2:25 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 12/29/16 10:55 PM, Haribabu Kommi wrote: > > Fujitsu was interested in developing a columnar storage extension with > > minimal > > changes the server backend. > > > > The columnar store is

Re: [HACKERS] Declarative partitioning - another take

2017-01-19 Thread Amit Langote
On 2017/01/20 4:18, Robert Haas wrote: > On Thu, Jan 19, 2017 at 12:15 AM, Amit Langote wrote: >> 0002-Set-ecxt_scantuple-correctly-for-tuple-routing.patch >> >> In 2ac3ef7a01df859c62d0a02333b646d65eaec5ff, we changed things so that >> it's possible for a different TupleTableSlot to be used for

Re: [HACKERS] Declarative partitioning - another take

2017-01-19 Thread Keith Fiske
So testing things out in pg_partman for native sub-partitioning and ran into what is a bug for me that I know I have to fix, but I'm curious if this can be prevented in the first place within the native partitioning code itself. The below shows a sub-partitioning set where the sub-partition has a

Re: [HACKERS] Parallel Index Scans

2017-01-19 Thread Haribabu Kommi
On Thu, Jan 19, 2017 at 1:18 AM, Amit Kapila wrote: > On Wed, Jan 18, 2017 at 6:25 AM, Haribabu Kommi > wrote: > > > > > > On Mon, Jan 16, 2017 at 11:11 PM, Amit Kapila > > wrote: > >> > > > > + *

Re: [HACKERS] Possible issue with expanded object infrastructure on Postgres 9.6.1

2017-01-19 Thread Tom Lane
Peter Geoghegan writes: > A customer is on 9.6.1, and complains of a segfault observed at least > 3 times. In all cases, the logs look like this: > ... > I can use GDB to get details of the instruction pointer that appeared > in the kernel trap error, which shows a function from

  1   2   >