Re: Avoiding Tablespace path collision for primary and standby

2018-05-25 Thread Michael Paquier
On Sat, May 26, 2018 at 02:10:52PM +1200, Thomas Munro wrote: > I also wondered about this when trying to figure out how to write a > TAP test for recovery testing with tablespaces, for my undo proposal. > I was starting to wonder about either allowing relative paths or > supporting some kind of va

Re: Avoiding Tablespace path collision for primary and standby

2018-05-25 Thread Thomas Munro
On Sat, May 26, 2018 at 9:17 AM, Ashwin Agrawal wrote: > To generate uniqueness for the path between primary and standby need to use > something which is not represented within database. So will be random to > some degree. Like one can use PORT number of postmaster. As only need to > generate uniq

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-25 Thread Chapman Flack
On 05/25/18 21:16, Andrew Gierth wrote: >> "Tom" == Tom Lane writes: > Tom> about that for v11, but I'd favor trying to improve the situation > Tom> in v12. > > Yeah. Another issue I ran into is that if you use SPI_prepare_params, > then you have to use SPI_execute_plan_with_paramlist, it's

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-25 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >>> /* >>> * GAH. To do parameter type checking properly, we have to install our >>> * own global post-parse hook transiently. >>> */ >> Gah, indeed. Thanks for the heads up. I would never have guessed it'd >> be that fiddly. Tom> Yikes. That seems pretty

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-25 Thread Tom Lane
Chapman Flack writes: > On 05/25/18 20:07, Andrew Gierth wrote: >> /* >> * GAH. To do parameter type checking properly, we have to install our >> * own global post-parse hook transiently. >> */ >> ... >> PG_TRY(); >> { >> pllua_spi_prev_parse_hook = post_parse_analyze_hook; >> post_parse_analyze_h

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-25 Thread Chapman Flack
On 05/25/18 20:07, Andrew Gierth wrote: > >> with writing a ParserSetupHook that's just a thin wrapper around > >> parse_variable_parameters ? > > That's what I did in pllua-ng. The tricky bit was in arranging to also > call check_variable_parameters; I considered skipping that part, but > that

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-25 Thread Andrew Gierth
> "Tom" == Tom Lane writes: > Chapman Flack writes: >> As for bringing it along to the modern API, am I on the right track >> with writing a ParserSetupHook that's just a thin wrapper around >> parse_variable_parameters ? Tom> Seems reasonable from here. That's what I did in pllua-ng.

Re: Timetz comparison

2018-05-25 Thread Tom Lane
"David G. Johnston" writes: > On Fri, May 25, 2018 at 3:33 PM, Tom Lane wrote: >> Even if you'd made a case why we should consider them equal, >> those would be very good reasons not to change behavior that's >> stood for 17 years. > This is true, and the alternative doesn't have the supporting

jsonb iterator not fully initialized

2018-05-25 Thread Peter Eisentraut
I got this error message via -fsanitized=undefined: jsonfuncs.c:5169:12: runtime error: load of value 127, which is not a valid value for type '_Bool' The query was select ts_headline('{}'::jsonb, tsquery('aaa & bbb')); This calls the C function ts_headline_jsonb_byid_opt(), which calls transfo

Re: SCRAM with channel binding downgrade attack

2018-05-25 Thread Michael Paquier
On Fri, May 25, 2018 at 06:24:07PM +0300, Heikki Linnakangas wrote: > On 25 May 2018 17:44:16 EEST, Robert Haas wrote: >> It seems to me that this is really another sort of thing altogether. >> Whether or not you want to insist on channel binding is a completely >> separate thing from which channe

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-25 Thread Tom Lane
Chapman Flack writes: > As for bringing it along to the modern API, am I on the right track > with writing a ParserSetupHook that's just a thin wrapper around > parse_variable_parameters ? Seems reasonable from here. regards, tom lane

Re: Timetz comparison

2018-05-25 Thread David G. Johnston
On Fri, May 25, 2018 at 3:33 PM, Tom Lane wrote: > Alexey Bashtanov writes: > > Comparison of timetz values looks a bit weird to me, as > > '22:00+02'::timetz > '21:00+01'::timetz. > > Perhaps, but I don't think there's a reasonable case for considering > them equal, either. In the other places

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-25 Thread Chapman Flack
On 05/25/2018 06:01 PM, Tom Lane wrote: > Offhand I don't believe SPI exposed a way to do that before 9bedd128d. > Does it matter? Pre-9.0 releases are long out of support by now, > which means they're full of known data-loss hazards and security bugs. Well, my exploration arose from discovering

Re: Timetz comparison

2018-05-25 Thread Tom Lane
Alexey Bashtanov writes: > Comparison of timetz values looks a bit weird to me, as > '22:00+02'::timetz > '21:00+01'::timetz. Perhaps, but I don't think there's a reasonable case for considering them equal, either. In the other places where obviously-different values compare equal, such as zero

Timetz comparison

2018-05-25 Thread Alexey Bashtanov
Hello, Comparison of timetz values looks a bit weird to me, as '22:00+02'::timetz > '21:00+01'::timetz. I can see this behavior introduced by commit 2792374c in 2001 with the comment "timetz was just plain broken (some possible pairs of values were neither < nor = nor >)". The in-code commen

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-05-25 Thread Andres Freund
On 2018-05-25 17:47:37 -0400, Tom Lane wrote: > Andres Freund writes: > > Moving discussion to -hackers. Tom, I think you worked most with this > > code, your input would be appreciated. > > Yeah, the assumption in the relcache is that the only part of a nailed > catalog's relcache entry that re

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-25 Thread Tom Lane
Chapman Flack writes: > Am I on the right track here? Is what I'm looking to do something > that became possible in SPI in 9.0 and wasn't before, or did I overlook > a way it could have been done pre-9.0 ? Offhand I don't believe SPI exposed a way to do that before 9bedd128d. Does it matter? Pre

Re: Performance regression with PostgreSQL 11 and partitioning

2018-05-25 Thread Justin Pryzby
On Fri, May 25, 2018 at 05:17:12PM -0400, Tom Lane wrote: > Robert Haas writes: > > On Fri, May 25, 2018 at 1:53 PM, Amit Langote > > wrote: > >> Seems here that we call find_appinfos_by_relids here for *all* > >> partitions, even if all but one partition may have been pruned. I > >> haven't st

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-05-25 Thread Tom Lane
Andres Freund writes: > Moving discussion to -hackers. Tom, I think you worked most with this > code, your input would be appreciated. Yeah, the assumption in the relcache is that the only part of a nailed catalog's relcache entry that really needs to be updated intrasession is the relfilenode m

Re: assert in nested SQL procedure call in current HEAD

2018-05-25 Thread Andrew Gierth
> "Joe" == Joe Conway writes: Joe> My colleague Yogesh Sharma discovered an assert in nested SQL Joe> procedure calls after ROLLBACK is used. Minimal test case and Joe> backtrace below. I have not yet tried to figure out exactly what Joe> is going on beyond seeing that it occurs in pg_pla

Re: Performance regression with PostgreSQL 11 and partitioning

2018-05-25 Thread Jonathan S. Katz
> On May 25, 2018, at 5:17 PM, Tom Lane wrote: > > Maybe it's all right to decide that this rejiggering can be left > for v12 ... did we promise anyone that it's now sane to use thousands > of partitions? Per beta release, we’ve only said “improved SELECT query performance due to enhanced parti

Re: Redesigning the executor (async, JIT, memory efficiency)

2018-05-25 Thread Joe Conway
On 05/24/2018 11:26 PM, Heikki Linnakangas wrote: > Cool stuff! > > On 25/05/18 06:35, Andres Freund wrote: >> For example, this converts this converts TPCH's Q01: +1 Wicked cool! -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open So

Re: Avoiding Tablespace path collision for primary and standby

2018-05-25 Thread Ashwin Agrawal
On Fri, May 25, 2018 at 7:33 AM, Tom Lane wrote: > Ashwin Agrawal writes: > > Proposing to create directory with timestamp at time of creating > tablespace > > and create symbolic link to it instead. > > I'm skeptical that this solves your problem. What happens when the CREATE > TABLESPACE comm

Re: Performance regression with PostgreSQL 11 and partitioning

2018-05-25 Thread Tom Lane
Robert Haas writes: > On Fri, May 25, 2018 at 1:53 PM, Amit Langote wrote: >> Seems here that we call find_appinfos_by_relids here for *all* >> partitions, even if all but one partition may have been pruned. I >> haven't studied this code in detail, but I suspect it might be >> unnecessary, alth

assert in nested SQL procedure call in current HEAD

2018-05-25 Thread Joe Conway
My colleague Yogesh Sharma discovered an assert in nested SQL procedure calls after ROLLBACK is used. Minimal test case and backtrace below. I have not yet tried to figure out exactly what is going on beyond seeing that it occurs in pg_plan_query() where the comment says "Planner must have a snapsh

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-05-25 Thread Andres Freund
Hi, Moving discussion to -hackers. Tom, I think you worked most with this code, your input would be appreciated. Original discussion is around: http://archives.postgresql.org/message-id/20180524211311.tnswfnjwnii54htx%40alvherre.pgsql On 2018-05-24 17:13:11 -0400, Alvaro Herrera wrote: > On 201

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-25 Thread Chapman Flack
On 05/24/2018 02:30 AM, Chapman Flack wrote: > In 9.0, there's SPI_prepare_params, which seems promising; it accepts > an arbitrary ParserSetupHook "to control the parsing of external parameter > references." But its documentation doesn't suggest what to use as the > ParserSetupHook to say "please

Re: Performance regression with PostgreSQL 11 and partitioning

2018-05-25 Thread Robert Haas
On Fri, May 25, 2018 at 1:53 PM, Amit Langote wrote: > Seems here that we call find_appinfos_by_relids here for *all* > partitions, even if all but one partition may have been pruned. I > haven't studied this code in detail, but I suspect it might be > unnecessary, although I might be wrong. Ugg

Re: perlcritic and perltidy

2018-05-25 Thread Bruce Momjian
On Sun, May 6, 2018 at 11:53:34AM -0400, Tom Lane wrote: > What sort of changes do we get if we remove those two flags as you prefer? > It'd help to see some examples. > > Since we just went to a new perltidy version, and made some other > policy changes for it, in HEAD, it'd make sense to make a

Re: [PATCH v16] GSSAPI encryption support

2018-05-25 Thread Robbie Harwood
Robbie Harwood writes: > Thomas Munro writes: > >> On Thu, May 24, 2018 at 8:00 AM, Robbie Harwood wrote: >> >>> Zombie patch is back from the dead. >> >> Hi Robbie, >> >> Robots[1] vs zombies: >> >> + $postgres->RemoveFile('src/backennd/libpq/be-gssapi-common.c'); >> >> Typo, breaks on Windows

Re: contrib/sepgsql fails on Fedora 28

2018-05-25 Thread Tom Lane
Mike Palmiotto writes: > On 05/24/2018 03:30 PM, Tom Lane wrote: >> I tried to run the regression test for sepgsql on F28 (so I could >> fix the now-obsolete expected-file therein). It fails at this >> preparatory step: >> $ sudo semodule -u sepgsql-regtest.pp > This error appears to be due to a

Re: Performance regression with PostgreSQL 11 and partitioning

2018-05-25 Thread Amit Langote
On Fri, May 25, 2018 at 11:49 PM, Robert Haas wrote: > On Fri, May 25, 2018 at 10:30 AM, Thomas Reiss > wrote: >> Then I used the following to compare the planning time : >> explain (analyze) SELECT * FROM t1 WHERE dt = '2018-05-25'; >> >> With PostgreSQL 10, planning time is 66ms, in v11, plann

Re: Performance regression with PostgreSQL 11 and partitioning

2018-05-25 Thread Thomas Reiss
Le 25/05/2018 à 16:49, Robert Haas a écrit : > On Fri, May 25, 2018 at 10:30 AM, Thomas Reiss > wrote: >> Then I used the following to compare the planning time : >> explain (analyze) SELECT * FROM t1 WHERE dt = '2018-05-25'; >> >> With PostgreSQL 10, planning time is 66ms, in v11, planning ris

Re: Enhancement Idea - Expose the active value of a parameter in pg_settings

2018-05-25 Thread Robert Haas
On Fri, May 25, 2018 at 12:14 PM, Greg Clough wrote: > Many thanks for the quick consideration, even if it's ultimately a rejection. > Figuring out some SQL that will work across all platforms, versions, and > compile-time options will be "fun", but I'm up for a challenge. Why would you need d

We still claim "cannot begin/end transactions in PL/pgSQL"

2018-05-25 Thread Tom Lane
I notice there are still several places in pl_exec.c like this: case SPI_ERROR_TRANSACTION: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot begin/end transactions in PL/pgSQL"), errhint("Use a

RE: Enhancement Idea - Expose the active value of a parameter in pg_settings

2018-05-25 Thread Greg Clough
>> On Fri, May 25, 2018 at 10:11 AM, Andrew Dunstan >> wrote: >>> He's proposing an extra column to show the actual value used, so >>> distinguishing them should be a problem. > >> For most settings, that column would just be a duplicate. For a >> handful, it would pull in the value of some other

Re: rule-related crash in v11

2018-05-25 Thread Tom Lane
Robert Haas writes: > On Fri, May 25, 2018 at 11:21 AM, Tom Lane wrote: >> Looking at what mod_stmt is used for, we've got >> (1) the Assert that's crashing, and its siblings, which are just meant >> to cross-check that mod_stmt is consistent with the SPI return code. >> (2) two places that decid

Re: rule-related crash in v11

2018-05-25 Thread Robert Haas
On Fri, May 25, 2018 at 11:21 AM, Tom Lane wrote: > Robert Haas writes: >> For reasons that I'm not quite sure about, the following test case >> crashes in v11, but not earlier versions: > > Crashes just fine in prior versions for me, at least as far back as 9.3, > but probably much further. Not

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-05-25 Thread Robert Haas
On Fri, May 18, 2018 at 11:21 AM, Masahiko Sawada wrote: > Regarding to API design, should we use 2PC for a distributed > transaction if both two or more 2PC-capable foreign servers and > 2PC-non-capable foreign server are involved with it? Or should we end > up with an error? the 2PC-non-capable

Re: SCRAM with channel binding downgrade attack

2018-05-25 Thread Heikki Linnakangas
On 25 May 2018 17:44:16 EEST, Robert Haas wrote: >On Wed, May 23, 2018 at 2:46 AM, Heikki Linnakangas >wrote: >> We could provide "tls-unique" and "tls-server-end-point" in addition >to >> those, but I'd consider those to be developer only settings, useful >only for >> testing the protocol. > >

Re: rule-related crash in v11

2018-05-25 Thread Tom Lane
Robert Haas writes: > For reasons that I'm not quite sure about, the following test case > crashes in v11, but not earlier versions: Crashes just fine in prior versions for me, at least as far back as 9.3, but probably much further. Note that I was doing an extra select fun() right after creatin

Re: [GSoC] github repo and initial work

2018-05-25 Thread Charles Cui
Got it, will go for second method. Will let you guys know the progress. 2018-05-25 4:05 GMT-07:00 Aleksander Alekseev : > Hello Charles, > > I suggest to begin with the second approach and add to_jsonb/from_jsonb > later. Both approaches are fine but it seems to me that most users would > expect

Re: [GSoC] github repo and initial work

2018-05-25 Thread Charles Cui
Thanks for correcting me, will definitely study citext and see how a new type is registered in plugin. 2018-05-24 23:23 GMT-07:00 Aleksandr Parfenov : > On Thu, 24 May 2018 18:25:28 -0700 > Charles Cui wrote: > > The second is to provide thrift type just like json or jsonb. When you > > create

Re: Performance regression with PostgreSQL 11 and partitioning

2018-05-25 Thread Robert Haas
On Fri, May 25, 2018 at 10:30 AM, Thomas Reiss wrote: > Then I used the following to compare the planning time : > explain (analyze) SELECT * FROM t1 WHERE dt = '2018-05-25'; > > With PostgreSQL 10, planning time is 66ms, in v11, planning rise to > 143ms. I also did a little test with more than 20

Re: SCRAM with channel binding downgrade attack

2018-05-25 Thread Robert Haas
On Wed, May 23, 2018 at 2:46 AM, Heikki Linnakangas wrote: > "tls-unique" and "tls-server-end-point" are overly technical to users. They > don't care which one is used, there's no difference in security. > Furthermore, if we add another channel binding type in the future, perhaps > because someone

Re: Unexpected casts while using date_trunc()

2018-05-25 Thread Tom Lane
Chris Bandy writes: > On 5/24/18 2:31 PM, Tom Lane wrote: >> Andrew Gierth writes: >>> There's also the option of adding an explicit function >>> date_trunc(text,date) returns date, which is a workaround that I (and >>> probably quite a few other people) have used. > Are we in agreement that the

Re: Avoiding Tablespace path collision for primary and standby

2018-05-25 Thread Tom Lane
Ashwin Agrawal writes: > Proposing to create directory with timestamp at time of creating tablespace > and create symbolic link to it instead. I'm skeptical that this solves your problem. What happens when the CREATE TABLESPACE command is replicated to the standby with sub-second delay? Clock sk

Re: Enhancement Idea - Expose the active value of a parameter in pg_settings

2018-05-25 Thread Robert Haas
On Fri, May 25, 2018 at 10:22 AM, Tom Lane wrote: > Personally, what I'd rather do is try to get rid of GUC behaviors like > "the effective value depends on something else". But convenience and > backwards compatibility may be arguments against that. Yeah. The dependency between various GUCs is

Re: Unexpected casts while using date_trunc()

2018-05-25 Thread Chris Bandy
On 5/24/18 2:31 PM, Tom Lane wrote: Andrew Gierth writes: "Tom" == Tom Lane writes: Tom> Yeah. There are two relevant variants of date_trunc(): [...] Tom> So we probably ought to change the docs here. There's also the option of adding an explicit function date_trunc(text,date) return

Performance regression with PostgreSQL 11 and partitioning

2018-05-25 Thread Thomas Reiss
Hello, I spent some time to test the new features on partitioning with the beta1. I noticed a potentially huge performance regression with plan-time partition pruning. To show the issue, I used this DO statement to generate some partitions, one per day : DO $$ DECLARE part_date date; ddl text

Re: Subplan result caching

2018-05-25 Thread Robert Haas
On Wed, May 23, 2018 at 6:03 AM, Laurenz Albe wrote: > I think the cache should be limited in size, perhaps by work_mem. > Also, there probably should be a GUC for this, defaulting to "off". Eh, why? Generally we want performance optimizations turned on by default; otherwise only highly-knowledg

Re: Subplan result caching

2018-05-25 Thread Robert Haas
On Wed, May 23, 2018 at 12:51 PM, Tom Lane wrote: > Ah. That would work, though it'd make the number of subquery executions > even less predictable (since some logically-equal values would compare > as physically unequal). In most cases that seems fine. It might not be fine with the subquery co

Re: Enhancement Idea - Expose the active value of a parameter in pg_settings

2018-05-25 Thread Tom Lane
Robert Haas writes: > On Fri, May 25, 2018 at 10:11 AM, Andrew Dunstan > wrote: >> He's proposing an extra column to show the actual value used, so >> distinguishing them should be a problem. > For most settings, that column would just be a duplicate. For a > handful, it would pull in the value

Re: Enhancement Idea - Expose the active value of a parameter in pg_settings

2018-05-25 Thread Robert Haas
On Fri, May 25, 2018 at 10:11 AM, Andrew Dunstan wrote: > He's proposing an extra column to show the actual value used, so > distinguishing them should be a problem. For most settings, that column would just be a duplicate. For a handful, it would pull in the value of some other GUC. If somebod

Re: Enhancement Idea - Expose the active value of a parameter in pg_settings

2018-05-25 Thread Andrew Dunstan
On Fri, May 25, 2018 at 9:58 AM, Tom Lane wrote: > Greg Clough writes: >> I would like to propose that we expose the "active" value of parameters in >> pg_settings, instead of "-1". In this example below, when it's set to "-1" >> I need to know that autovacuum_work_mem is related to the settin

Re: In what range of the code can we read debug_query_string?

2018-05-25 Thread Tom Lane
Kyotaro HORIGUCHI writes: > It is set for other kinds of message, (parse, bind, execute). I > think fastpath, close, flush and sync don't need that. If it is > reasonable to assume that we can see debug_query_string in the > DESCRIBE path, the attached patch would work. I think this patch is a ba

rule-related crash in v11

2018-05-25 Thread Robert Haas
For reasons that I'm not quite sure about, the following test case crashes in v11, but not earlier versions: create table abc(n int); create table xyz(n int); create function fun() returns int as $$begin insert into abc values (1); return 1; end$$ language plpgsql; create or replace rule rule1 a

Re: Enhancement Idea - Expose the active value of a parameter in pg_settings

2018-05-25 Thread Tom Lane
Greg Clough writes: > I would like to propose that we expose the "active" value of parameters in > pg_settings, instead of "-1". In this example below, when it's set to "-1" I > need to know that autovacuum_work_mem is related to the setting of > maintenance_work_mem, so that I can determine t

Enhancement Idea - Expose the active value of a parameter in pg_settings

2018-05-25 Thread Greg Clough
Hi Hackers, I would like to propose that we expose the "active" value of parameters in pg_settings, instead of "-1". In this example below, when it's set to "-1" I need to know that autovacuum_work_mem is related to the setting of maintenance_work_mem, so that I can determine that the actual s

Re: pg_replication_slot_advance to return NULL instead of 0/0 if slot not advanced

2018-05-25 Thread Simon Riggs
On 25 May 2018 at 13:12, Magnus Hagander wrote: > > > On Fri, May 25, 2018 at 7:28 AM, Michael Paquier > wrote: >> >> Hi all, >> >> When attempting to use multiple times pg_replication_slot_advance on a >> slot, then the caller gets back directly InvalidXLogRecPtr as result, >> for example: >> =#

Re: pg_replication_slot_advance to return NULL instead of 0/0 if slot not advanced

2018-05-25 Thread Magnus Hagander
On Fri, May 25, 2018 at 7:28 AM, Michael Paquier wrote: > Hi all, > > When attempting to use multiple times pg_replication_slot_advance on a > slot, then the caller gets back directly InvalidXLogRecPtr as result, > for example: > =# select * from pg_replication_slot_advance('popo', 'FF/0'); > sl

[Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)

2018-05-25 Thread Moon, Insung
Hello Hackers, This propose a way to develop "Table-level" Transparent Data Encryption (TDE) and Key Management Service (KMS) support in PostgreSQL. Issues on data encryption of PostgreSQL == Currently, in PostgreSQL, data encryption can be using pgcrypto Tool. However, it is inconvenie

Re: [GSoC] github repo and initial work

2018-05-25 Thread Aleksander Alekseev
Hello Charles, I suggest to begin with the second approach and add to_jsonb/from_jsonb later. Both approaches are fine but it seems to me that most users would expect a separate type thus it's more important. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Avoiding Tablespace path collision for primary and standby

2018-05-25 Thread Ashwin Agrawal
Currently, if primary and standby are setup on same machine (which is always the case for development), CREATE TABLESPACE xyz LOCATION '/abc', primary and mirror both write to "/abc/TABLESPACE_VERSION_DIRECTORY" directory. Collision is certainly not an issue in any production deployment but seems s

Re: XLogWrite uses palloc within a critical section

2018-05-25 Thread Kyotaro HORIGUCHI
Thank you for the comment. At Fri, 25 May 2018 09:05:21 +0300, Heikki Linnakangas wrote in <466a3c6d-7986-8cb1-d908-e85aa6a09...@iki.fi> > On 25/05/18 07:45, Kyotaro HORIGUCHI wrote: > > Hello. > > I happened to see the following in XLogWrite. > > > >> ereport(PANIC, > >> (errcode_for_f

Re: Keeping temporary tables in shared buffers

2018-05-25 Thread Ashwin Agrawal
On Thu, May 24, 2018 at 11:50 PM, Andres Freund wrote: > On 2018-05-25 09:40:10 +0300, Heikki Linnakangas wrote: > > On 25/05/18 09:25, Asim Praveen wrote: > > > My parochial vision of the overhead is restricted to 4 * NBuffers of > > > additional shared memory, as 4 bytes are being added to Buff

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-05-25 Thread Arseny Sher
Michael Paquier writes: > but for now I would recommend to register this patch to the next > commit fest under the category "Bug Fixes" so as it does not fall into > the cracks: https://commitfest.postgresql.org/18/ > > I have added an entry to the open items in the section for older bugs: > htt

Re: Fix some error handling for read() and errno

2018-05-25 Thread Michael Paquier
On Fri, May 25, 2018 at 01:19:58PM +0900, Kyotaro HORIGUCHI wrote: > The case is not of an empty file. read() reads 0 bytes without > error while lseek have told that the file has *more* data. I > don't think that can happen. How about just commenting with > something like the following? Actually