Re: SQL statement PREPARE does not work in ECPG

2019-02-20 Thread Michael Meskes
Takahashi-san, > I tried as follows. > ... > Unfortunately, this does not work. > ECPGst_execute seems good, but prepare statement is the same as my > first post. Ah right, my bad. The workaround should have been: EXEC SQL PREPARE test_prep from "SELECT id from test_table where id = $1"; EXEC SQ

Re: [HACKERS] Time to change pg_regress diffs to unified by default?

2019-02-20 Thread Christoph Berg
Re: Peter Eisentraut 2019-02-20 <40c5c12f-adad-fc86-7d43-ff7c53535...@2ndquadrant.com> > > By the same argument, it should always print which variant file was > > used so determining which _N.out files are still in use is possible. > > I would rather not overload the test output even more. A tes

Re: SQL statement PREPARE does not work in ECPG

2019-02-20 Thread Michael Meskes
Matsumura-san, > Maybe, there is no work-around. Did you analyze the bug? Do you know where it comes from? > For supporting it, there are two steps. Could you please start with explaining where you see the problem? I'm actually not sure what you are trying to do here. Michael -- Michael Meske

Re: Referential Integrity Checks with Statement-level Triggers

2019-02-20 Thread Antonin Houska
Corey Huinker wrote: > Attached is a patch that refactors DELETE triggers to fire at the statement > level. > > I chose delete triggers partly out of simplicity, and partly because there > some before/after row linkage in the ON UPDATE CASCADE cases where statement > level triggers might not be

Re: WIP: Avoid creation of the free space map for small tables

2019-02-20 Thread John Naylor
On Wed, Feb 20, 2019 at 6:09 PM Amit Kapila wrote: > I have modified the patch for the above observations and added a > commit message as well, see if it looks okay to you. Looks good to me, thanks. -- John Naylorhttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support,

Re: WIP: Avoid creation of the free space map for small tables

2019-02-20 Thread Amit Kapila
On Mon, Feb 11, 2019 at 10:48 PM John Naylor wrote: > > On 2/9/19, Amit Kapila wrote: > > > Shall we add a note to the docs of pg_freespacemap and > > pgstattuple_approx indicating that for small relations, FSM won't be > > created, so these functions won't give appropriate value? > > I've given

bgwriter_lru_maxpages limits in PG 10 sample conf

2019-02-20 Thread Sergei Kornilov
Hello We increased bgwriter_lru_maxpages limit in 10 release [1]. Docs now are changed correctly but in REL_10_STABLE postgresql.conf.sample we still have comment "0-1000 max buffers written/round". Master (and REL_11_STABLE) was updated later in 611fe7d4793ba6516e839dc50b5319b990283f4f, but n

Re: restrict pg_stat_ssl to superuser?

2019-02-20 Thread Peter Eisentraut
On 2019-02-19 16:57, Peter Eisentraut wrote: > On 2019-02-18 04:58, Michael Paquier wrote: >> On Fri, Feb 15, 2019 at 02:04:59PM +0100, Peter Eisentraut wrote: >>> We could remove default privileges from pg_stat_get_activity(). Would >>> that be a problem? >> >> I don't think so, still I am wonder

Re: Another way to fix inherited UPDATE/DELETE

2019-02-20 Thread Etsuro Fujita
(2019/02/20 6:48), Tom Lane wrote: In the case of a standard inheritance or partition tree, this seems to go through really easily, since all the children could share the same returned CTID column (I guess you'd also need a TABLEOID column so you could figure out which table to direct the update

Re: Prepared transaction releasing locks before deregistering its GID

2019-02-20 Thread Oleksii Kliukin
Michael Paquier wrote: > > Attached is an updated patch. Thanks for the feedback. @@ -1755,7 +1755,7 @@ void multixact_twophase_recover(TransactionId xid, uint16 info, void *recdata, uint32 len) { - BackendId dummyBackendId = TwoPhaseGetDummyBackendId(xid); +

RE: SQL statement PREPARE does not work in ECPG

2019-02-20 Thread Matsumura, Ryo
Hi, Maybe, there is no work-around. For supporting it, there are two steps. step1. fix for PREPARE. step2. fix for EXECUTE. About step1, there are two way. I want to choose Idea-2. Idea-1. ecpglib prepares Oids of type listed in PREPARE statement for 5th argument of PQprepare(). But it's dif

Re: [HACKERS] Time to change pg_regress diffs to unified by default?

2019-02-20 Thread Peter Eisentraut
On 2019-02-15 16:05, Christoph Berg wrote: > Re: Andrew Gierth 2019-02-15 <874l95m8w7@news-spur.riddles.org.uk> >> Also while we're tweaking regression test output, would it be possible >> to have some indicator of whether a test passed because a variant file >> in the resultmap was ignored in

Re: [HACKERS] Time to change pg_regress diffs to unified by default?

2019-02-20 Thread Peter Eisentraut
On 2019-01-03 12:16, Peter Eisentraut wrote: > On 03/01/2019 10:39, Christoph Berg wrote: >> It will especially say which _alternate.out file was used, which seems >> like a big win. So +1. > > It already shows that in the existing diff output header. > > Although if you have a really long absolu

Re: [PATCH v20] GSSAPI encryption support

2019-02-20 Thread Peter Eisentraut
On 2019-02-18 16:32, Stephen Frost wrote: > Considering this is only the second encryption protocol in the project's > lifetime, I agree that using callbacks would be overkill here. What > other encryption protocols are you thinking we would be adding here? I > think most would be quite hard-pres

Re: Ltree syntax improvement

2019-02-20 Thread Nikolay Shaplov
В письме от вторник, 29 января 2019 г. 20:43:07 MSK пользователь Dmitry Belyavsky написал: > Dear all, > > Please find attached the patch extending the sets of symbols allowed in > ltree labels. The patch introduces 2 variants of escaping symbols, via > backslashing separate symbols and via quoti

Re: pg_basebackup ignores the existing data directory permissions

2019-02-20 Thread Magnus Hagander
On Wed, Feb 20, 2019 at 5:17 AM Haribabu Kommi wrote: > > On Fri, Feb 15, 2019 at 10:15 AM Michael Paquier > wrote: > >> On Thu, Feb 14, 2019 at 11:21:19PM +1100, Haribabu Kommi wrote: >> > On Thu, Feb 14, 2019 at 8:57 PM Magnus Hagander >> wrote: >> >> I think it could be argued that neither i

Re: Compressed TOAST Slicing

2019-02-20 Thread Simon Riggs
On Tue, 19 Feb 2019 at 23:09, Paul Ramsey wrote: > On Sat, Feb 16, 2019 at 7:25 AM Simon Riggs wrote: > > > Could we get an similarly optimized implementation of -> operator for > JSONB as well? > > Are there any other potential uses? Best to fix em all up at once and > then move on to other thi

Re: Prepared transaction releasing locks before deregistering its GID

2019-02-20 Thread Michael Paquier
On Wed, Feb 20, 2019 at 03:14:07PM +0900, Masahiko Sawada wrote: > @@ -811,6 +811,9 @@ TwoPhaseGetGXact(TransactionId xid) > static TransactionId cached_xid = InvalidTransactionId; > static GlobalTransaction cached_gxact = NULL; > > + Assert(!lock_held || > +

<    1   2