Re: 2022-11-10 release announcement draft

2022-11-07 Thread Erikjan Rijkers

Op 07-11-2022 om 16:51 schreef Jonathan S. Katz:

Hi,

Attached is a draft of the release announcement for the 2022-11-10 release.

Please provide feedback no later than 2022-11-10 0:00 AoE[1].


'now exists'  should be (I think)
'now exits'


Erik



Thanks,

Jonathan

[1] https://en.wikipedia.org/wiki/Anywhere_on_Earth





Re: [doc] fix a potential grammer mistake

2022-08-03 Thread Erikjan Rijkers

Op 03-08-2022 om 10:10 schreef Junwang Zhao:

I think in the following sentence, were should be replaced with have,
what do you think?

```
 /*
-* We were just issued a SAVEPOINT inside a
transaction block.
+* We have just issued a SAVEPOINT inside a
transaction block.
  * Start a subtransaction.  (DefineSavepoint already 
did
  * PushTransaction, so as to have someplace to
put the SUBBEGIN
  * state.)
```


I don't think these  "were"s  are wrong but arguably changing them to 
"have" helps non-native speakers (like myself), as it doesn't change the 
meaning significantly as far as I can see.


'we were issued' does reflect the perspective of the receiving code a 
bit better.



Erik





Re: TRAP: FailedAssertion("tabstat->trans == trans", File: "pgstat_relation.c", Line: 508

2022-04-18 Thread Erikjan Rijkers

Op 18-04-2022 om 09:13 schreef Kyotaro Horiguchi:

At Sat, 16 Apr 2022 11:23:23 -0700, Andres Freund  wrote in

Hi,

On 2022-04-16 09:37:55 +0200, Erik Rijkers wrote:

I get this crash running the attached test program. On my slow-disked and
old desktop it occurs once in 20 or so runs (it is yet another installment
of an old test that runs pgbench with logical replication).

15devel compiled from d3609dd25.

(The bash deletes stuff, and without my environment it will need some
tweaking)


Any chance for a backtrace? I'll otherwise try to adjust the script, but ...


FWIW, the script keep succussfully running more than 140 times for me.
(on master, Cent8) And I haven't find a hypothesis for the cause of
the symptom.


Hm.  Just now I've recompiled and retried and after 5 runs got the same 
crash.  Then tried on another machine (also old, I'm afraid),
and built 1a8b11053 and ran the same thing.  That failed on the first 
try, and made core dump from which I extracted:



gdb ~/pg_stuff/pg_installations/pgsql.HEAD/bin/postgres 
core-postgres-6-500-500-8289-1650269886  -ex bt -ex q



GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 


This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from 
/home/aardvark/pg_stuff/pg_installations/pgsql.HEAD/bin/postgres...done.

[New LWP 8289]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `postgres: logical replication worker for 
subscription 16411   '.

Program terminated with signal 6, Aborted.
#0  0x00357d6324f5 in raise () from /lib64/libc.so.6
#0  0x00357d6324f5 in raise () from /lib64/libc.so.6
#1  0x00357d633cd5 in abort () from /lib64/libc.so.6
#2  0x00973fcb in ExceptionalCondition 
(conditionName=conditionName@entry=0xb20d76 "tabstat->trans == trans", 
errorType=errorType@entry=0x9c7c2b "FailedAssertion",
fileName=fileName@entry=0xb20d0b "pgstat_relation.c", 
lineNumber=lineNumber@entry=508) at assert.c:69
#3  0x0086b77f in AtEOXact_PgStat_Relations 
(xact_state=xact_state@entry=0x26f0b50, isCommit=isCommit@entry=true) at 
pgstat_relation.c:508
#4  0x0086ec0f in AtEOXact_PgStat (isCommit=isCommit@entry=true, 
parallel=parallel@entry=false) at pgstat_xact.c:54

#5  0x005bd2a3 in CommitTransaction () at xact.c:2360
#6  0x005be5d5 in CommitTransactionCommand () at xact.c:3048
#7  0x007ee72b in apply_handle_commit_internal 
(commit_data=commit_data@entry=0x7ffe4606a7a0) at worker.c:1532
#8  0x007efac9 in apply_handle_commit (s=0x7ffe4606a940) at 
worker.c:845

#9  apply_dispatch () at worker.c:2473
#10 0x007f11a7 in LogicalRepApplyLoop (last_received=74454600) 
at worker.c:2757

#11 start_apply () at worker.c:3526
#12 0x007f175f in ApplyWorkerMain () at worker.c:3782
#13 0x007bdba3 in StartBackgroundWorker () at bgworker.c:858
#14 0x007c3241 in do_start_bgworker (rw=) at 
postmaster.c:5802

#15 maybe_start_bgworkers () at postmaster.c:6026
#16 0x007c3b65 in sigusr1_handler 
(postgres_signal_arg=) at postmaster.c:5191

#17 
#18 0x00357d6e1683 in __select_nocancel () from /lib64/libc.so.6
#19 0x007c41d6 in ServerLoop () at postmaster.c:1757
#20 0x007c5c3b in PostmasterMain () at postmaster.c:1465
#21 0x00720cfe in main (argc=11, argv=0x2615590) at main.c:202


I'm not sure that helps.




regards.






Re: SQL/JSON: JSON_TABLE

2022-03-04 Thread Erikjan Rijkers

Op 04-03-2022 om 17:33 schreef Andrew Dunstan:





This set of patches deals with items 1..7 above, but not yet the ERROR
ON ERROR issue. It also makes some message cleanups, but there is more
to come in that area.

It is based on the latest SQL/JSON Functions patch set, which does not
include the sql_json GUC patch.


> [0001-SQL-JSON-functions-without-sql_json-GUC-v56.patch]
> [0002-JSON_TABLE-v56.patch]
> [0003-JSON_TABLE-PLAN-DEFAULT-clause-v56.patch]
> [0004-JSON_TABLE-PLAN-clause-v56.patch]

Hi,

I quickly tried the tests I already had and there are two statements 
that stopped working:


testdb=# SELECT JSON('{"a": 123, "b": [true, "foo"], "a2": "bar"}' 
RETURNING jsonb);

ERROR:  syntax error at or near "RETURNING"
LINE 1: ...SON('{"a": 123, "b": [true, "foo"], "a2": "bar"}' RETURNING ...

testdb=# select JSON_SCALAR(123.45 returning jsonb);
ERROR:  syntax error at or near "returning"
LINE 1: select JSON_SCALAR(123.45 returning jsonb)

  (the '^' pointer in both cases underneath 'RETURNING'


thanks,

Erik Rijkers







cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com





Re: Schema variables - new implementation for Postgres 15

2021-12-18 Thread Erikjan Rijkers

Op 19-12-2021 om 08:13 schreef Pavel Stehule:



ne 19. 12. 2021 v 8:09 odesílatel Erik Rijkers  >


  > [0001-schema-variables-20211219.patch]
  > [0002-schema-variables-20211219.patch]

Hi Pavel,

I get an error during test 'session_variables'.

(on the upside, my own little testsuite runs without error)

thanks,


please, can you send me regress diff?



I did attach it but if you did not receive it, see also cfbot, especially

https://ci.appveyor.com/project/postgresql-cfbot/postgresql/build/1.0.156992


Erik





Re: Split copy.c

2020-11-03 Thread Erikjan Rijkers

On 2020-11-03 08:38, Heikki Linnakangas wrote:


[v3-0001-Split-copy.c-into-copyto.c-and-copyfrom.c.patch]
[v3-0002-Split-copyfrom.c-further-into-copyfrom.c-and-copy.patch]


The patches apply ok, but I get these errors:

In file included from ../../../src/include/postgres.h:46,
 from copyto.c:15:
copyto.c: In function ‘BeginCopyTo’:
copyto.c:477:11: error: ‘is_from’ undeclared (first use in this 
function); did you mean ‘is_program’?

   Assert(!is_from);
   ^~~
../../../src/include/c.h:790:9: note: in definition of macro ‘Assert’
   if (!(condition)) \
 ^
copyto.c:477:11: note: each undeclared identifier is reported only once 
for each function it appears in

   Assert(!is_from);
   ^~~
../../../src/include/c.h:790:9: note: in definition of macro ‘Assert’
   if (!(condition)) \
 ^




documentation pdf build fail (HEAD)

2020-03-24 Thread Erikjan Rijkers

Hello,

I build the pdf (for HEAD) almost daily without problems, but at the 
moment I get the error below.


I am not sure whether to blame my particular setup (debian stretch), or 
whether there might be an error in the .sgml.  The html files still 
build OK.


If anyone has a suggestion on how to tackle this I'd be grateful.

thanks,

Erik Rijkers



[...]
[INFO] FOUserAgent - Rendered page #526.
[INFO] FOUserAgent - Rendered page #527.
[INFO] FOUserAgent - Rendered page #528.
[INFO] FOUserAgent - Rendered page #529.
[[ERROR] FOP - Exception org.apache.fop.fo.ValidationException: The column-number or number of 
cells in the row overflows the number of fo:table-columns specified for 
the table. (See position 47337:52207)
javax.xml.transform.TransformerException: 
org.apache.fop.fo.ValidationException: The column-number or number of 
cells in the row overflows the number of fo:table-columns specified for 
the table. (See position 47337:52207)>org.apache.fop.apps.FOPException: 
org.apache.fop.fo.ValidationException: The column-number or number of 
cells in the row overflows the number of fo:table-columns specified for 
the table. (See position 47337:52207)
javax.xml.transform.TransformerException: 
org.apache.fop.fo.ValidationException: The column-number or number of 
cells in the row overflows the number of fo:table-columns specified for 
the table. (See position 47337:52207)
at 
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:289)
at 
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)

at org.apache.fop.cli.Main.startFOP(Main.java:186)
at org.apache.fop.cli.Main.main(Main.java:217)
Caused by: javax.xml.transform.TransformerException: 
org.apache.fop.fo.ValidationException: The column-number or number of 
cells in the row overflows the number of fo:table-columns specified for 
the table. (See position 47337:52207)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
at 
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:286)

... 3 more
Caused by: org.apache.fop.fo.ValidationException: The column-number or 
number of cells in the row overflows the number of fo:table-columns 
specified for the table. (See position 47337:52207)
at 
org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at 
org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58)
at 
org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)

at com.sun.proxy.$Proxy4.tooManyCells(Unknown Source)
at 
org.apache.fop.fo.flow.table.TableCellContainer.addTableCellChild(TableCellContainer.java:75)
at 
org.apache.fop.fo.flow.table.TableRow.addChildNode(TableRow.java:95)
at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:324)
at 
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at 
org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
at 
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)

... 4 more





Re: PostgreSQL 12 RC1 Press Release Draft

2019-09-25 Thread Erikjan Rijkers

On 2019-09-25 13:08, Jonathan S. Katz wrote:

On 9/25/19 6:50 AM, Sehrope Sarkuni wrote:

The "Upgrading to PostgreSQL 12 RC 1" references v11 rather than v12:

"To upgrade to PostgreSQL 11 RC 1 from Beta 4 or an earlier version of
PostgreSQL 11, ..."


A small typo (or processing hickup):

'pattern\_ops'  should be
'pattern_ops'





Thanks! Fixed attached,

Jonathan





Re: pgbench - allow to create partitioned tables

2019-09-17 Thread Erikjan Rijkers

On 2019-09-17 20:49, Fabien COELHO wrote:

Attached v9:

[pgbench-init-partitioned-9.patch]


Turns out this patch needed a dos2unix treatment.

It's easy to do but it takes time to figure it out (I'm dumb).  I for 
one would be happy to receive patches not so encumbered :)



thanks,

Erik Rijkers




Re: Commit message / hash in commitfest page.

2019-04-11 Thread Erikjan Rijkers

On 2019-04-11 11:36, Ibrar Ahmed wrote:

Hi,

Is it possible to have commit-message or at least git hash in
commitfest. It will be very easy to track commit against commitfest
item.



Commitfest items always point to discussion threads. These threads often 
end with a message that says that the patch is pushed.  IMHO, that 
message would be the place to include the commithash.   It would also be 
easily findable via the commitfest application.


Erik Rijkers



--
Ibrar Ahmed





Re: [HACKERS] generated columns

2018-10-31 Thread Erikjan Rijkers

On 2018-10-30 16:14, Sergei Kornilov wrote:

Hi

I applied this patch on top 2fe42baf7c1ad96b5f9eb898161e258315298351
commit and found a bug while adding STORED column:

postgres=# create table test(i int);
CREATE TABLE
postgres=# insert into test values (1),(2);
INSERT 0 2
postgres=# alter table test add column gen_stored integer GENERATED
ALWAYS AS ((i * 2)) STORED;
ALTER TABLE
postgres=# alter table test add column gen_virt integer GENERATED
ALWAYS AS ((i * 2));
ALTER TABLE
postgres=# table test;
 i | gen_stored | gen_virt
---++--
 1 ||2
 2 ||4

Virtual columns was calculated on table read and its ok, but stored
column does not update table data.


This workaround is possible:

update test set i = i where gen_stored is null returning *;
 i | gen_stored | gen_virt
---++--
 1 |  2 |2
 2 |  4 |4
(2 rows)

table test ;
 i | gen_stored | gen_virt
---++--
 3 |  6 |6
 4 |  8 |8
 1 |  2 |2
 2 |  4 |4
(4 rows)


Hm, well, I suppose it's still a bug...


I have also noticed that logical replication isn't possible on tables 
with a generated column.  That's a shame but I suppsoe that is as 
expected.



Erik Rijkers



regards, Sergei




Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2017-12-23 Thread Erikjan Rijkers

On 2017-12-23 05:57, Tomas Vondra wrote:

Hi all,

Attached is a patch series that implements two features to the logical
replication - ability to define a memory limit for the reorderbuffer
(responsible for building the decoded transactions), and ability to
stream large in-progress transactions (exceeding the memory limit).



logical replication of 2 instances is OK but 3 and up fail with:

TRAP: FailedAssertion("!(last_lsn < change->lsn)", File: 
"reorderbuffer.c", Line: 1773)


I can cobble up a script but I hope you have enough from the assertion 
to see what's going wrong...




Re: Add RANGE with values and exclusions clauses to the Window Functions

2017-11-24 Thread Erikjan Rijkers

On 2017-11-24 15:11, Oliver Ford wrote:

Adds RANGE BETWEEN with a start and end value, as well as an
exclusions clause, to the window functions. This partially resolves
TODO list item "Implement full support for window framing clauses".


[0001-window-frame-v1.patch]

(debian 8)

make check fails:

 foreign_data ... ok
 window   ... FAILED
 xmlmap   ... ok

The diff is:

$ ( cd  
/var/data1/pg_stuff/pg_sandbox/pgsql.frame_range/src/test/regress && cat 
regression.diffs )
*** 
/var/data1/pg_stuff/pg_sandbox/pgsql.frame_range/src/test/regress/expected/window.out 
  2017-11-24 15:36:15.387573714 +0100
--- 
/var/data1/pg_stuff/pg_sandbox/pgsql.frame_range/src/test/regress/results/window.out 
   2017-11-24 15:38:35.290553157 +0100

***
*** 1034,1043 
  (10 rows)

  SELECT pg_get_viewdef('v_window');
! pg_get_viewdef
! --
!   SELECT i.i,+
!  sum(i.i) OVER (ORDER BY i.i) AS sum_rows+
  FROM generate_series(1, 10) i(i);
  (1 row)

--- 1034,1043 
  (10 rows)

  SELECT pg_get_viewdef('v_window');
! pg_get_viewdef
! 
---
!   SELECT i.i,  
   +
!  sum(i.i) OVER (ORDER BY i.i ROWS BETWEEN 1 PRECEDING AND 1 
FOLLOWING) AS sum_rows+

  FROM generate_series(1, 10) i(i);
  (1 row)


This small hickup didn't prevent building an instance but obviously I 
haven't done any real tests yet.



thanks,


Erik Rijkers