Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit48169ce

Browse files
committed
Fix merge conflict in the start.sgml
2 parents1a4134a +815a31c commit48169ce

File tree

12 files changed

+93
-14
lines changed

12 files changed

+93
-14
lines changed

‎doc/src/sgml/start.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ mydb=>
340340
mydb=#
341341
</screen>
342342
That would mean you are a database superuser, which is most likely
343-
the case if you installed <productname>&productname;</productname>
344-
yourself. Being a superuser means that you are not subject to
343+
the case if you installedthe<productname>&productname;</productname>
344+
instanceyourself. Being a superuser means that you are not subject to
345345
access controls. For the purposes of this tutorial that is not
346346
important.
347347
</para>

‎src/backend/storage/buffer/bufmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2145,7 +2145,7 @@ InitBufferPoolAccess(void)
21452145

21462146
MemSet(&hash_ctl,0,sizeof(hash_ctl));
21472147
hash_ctl.keysize=sizeof(int32);
2148-
hash_ctl.entrysize=sizeof(PrivateRefCountArray);
2148+
hash_ctl.entrysize=sizeof(PrivateRefCountEntry);
21492149

21502150
PrivateRefCountHash=hash_create("PrivateRefCount",100,&hash_ctl,
21512151
HASH_ELEM |HASH_BLOBS);

‎src/backend/utils/adt/jsonb.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ jsonb_object_two_arg(PG_FUNCTION_ARGS)
14551455
errmsg("wrong number of array subscripts")));
14561456

14571457
if (nkdims==0)
1458-
PG_RETURN_DATUM(CStringGetTextDatum("{}"));
1458+
gotoclose_object;
14591459

14601460
deconstruct_array(key_array,
14611461
TEXTOID,-1, false,'i',
@@ -1509,13 +1509,14 @@ jsonb_object_two_arg(PG_FUNCTION_ARGS)
15091509
(void)pushJsonbValue(&result.parseState,WJB_VALUE,&v);
15101510
}
15111511

1512-
result.res=pushJsonbValue(&result.parseState,WJB_END_OBJECT,NULL);
1513-
15141512
pfree(key_datums);
15151513
pfree(key_nulls);
15161514
pfree(val_datums);
15171515
pfree(val_nulls);
15181516

1517+
close_object:
1518+
result.res=pushJsonbValue(&result.parseState,WJB_END_OBJECT,NULL);
1519+
15191520
PG_RETURN_POINTER(JsonbValueToJsonb(result.res));
15201521
}
15211522

‎src/bin/pgbench/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/exprparse.c
22
/exprscan.c
33
/pgbench
4+
/tmp_check/

‎src/bin/pgbench/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ clean distclean:
4040

4141
maintainer-clean: distclean
4242
rm -f exprparse.c exprscan.c
43+
44+
check:
45+
$(prove_check)
46+
47+
installcheck:
48+
$(prove_installcheck)

‎src/bin/pgbench/t/001_pgbench.pl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
use strict;
2+
use warnings;
3+
4+
use TestLib;
5+
use Test::Moretests=> 3;
6+
7+
# Test concurrent insertion into table with UNIQUE oid column. DDL expects
8+
# GetNewOidWithIndex() to successfully avoid violating uniqueness for indexes
9+
# like pg_class_oid_index and pg_proc_oid_index. This indirectly exercises
10+
# LWLock and spinlock concurrency. This test makes a 5-MiB table.
11+
my$tempdir = tempdir;
12+
start_test_server$tempdir;
13+
psql('postgres',
14+
'CREATE UNLOGGED TABLE oid_tbl () WITH OIDS;'
15+
.'ALTER TABLE oid_tbl ADD UNIQUE (oid);');
16+
my$script ="$tempdir/pgbench_script";
17+
openmy$fh,">",$scriptordie"could not open file$script";
18+
print$fh'INSERT INTO oid_tbl SELECT FROM generate_series(1,1000);';
19+
close$fh;
20+
command_like(
21+
[qw(pgbench --no-vacuum --client=5 --protocol=prepared
22+
--transactions=25 --file),$script,'postgres' ],
23+
qr{processed: 125/125},
24+
'concurrent OID generation');

‎src/include/port/atomics/generic-xlc.h

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,23 @@ static inline bool
4646
pg_atomic_compare_exchange_u32_impl(volatilepg_atomic_uint32*ptr,
4747
uint32*expected,uint32newval)
4848
{
49+
/*
50+
* XXX: __compare_and_swap is defined to take signed parameters, but that
51+
* shouldn't matter since we don't perform any arithmetic operations.
52+
*/
53+
boolret=__compare_and_swap((volatileint*)&ptr->value,
54+
(int*)expected, (int)newval);
55+
4956
/*
5057
* xlc's documentation tells us:
5158
* "If __compare_and_swap is used as a locking primitive, insert a call to
5259
* the __isync built-in function at the start of any critical sections."
60+
*
61+
* The critical section begins immediately after __compare_and_swap().
5362
*/
5463
__isync();
5564

56-
/*
57-
* XXX: __compare_and_swap is defined to take signed parameters, but that
58-
* shouldn't matter since we don't perform any arithmetic operations.
59-
*/
60-
return__compare_and_swap((volatileint*)&ptr->value,
61-
(int*)expected, (int)newval);
65+
returnret;
6266
}
6367

6468
#definePG_HAVE_ATOMIC_FETCH_ADD_U32
@@ -75,10 +79,12 @@ static inline bool
7579
pg_atomic_compare_exchange_u64_impl(volatilepg_atomic_uint64*ptr,
7680
uint64*expected,uint64newval)
7781
{
82+
boolret=__compare_and_swaplp((volatilelong*)&ptr->value,
83+
(long*)expected, (long)newval);
84+
7885
__isync();
7986

80-
return__compare_and_swaplp((volatilelong*)&ptr->value,
81-
(long*)expected, (long)newval);;
87+
returnret;
8288
}
8389

8490
#definePG_HAVE_ATOMIC_FETCH_ADD_U64

‎src/test/regress/expected/json.out

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,6 +1510,20 @@ INSERT INTO foo VALUES (999999, NULL, 'bar');
15101510
SELECT json_object_agg(name, type) FROM foo;
15111511
ERROR: field name must not be null
15121512
-- json_object
1513+
-- empty object, one dimension
1514+
SELECT json_object('{}');
1515+
json_object
1516+
-------------
1517+
{}
1518+
(1 row)
1519+
1520+
-- empty object, two dimensions
1521+
SELECT json_object('{}', '{}');
1522+
json_object
1523+
-------------
1524+
{}
1525+
(1 row)
1526+
15131527
-- one dimension
15141528
SELECT json_object('{a,1,b,2,3,NULL,"d e f","a b c"}');
15151529
json_object

‎src/test/regress/expected/jsonb.out

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,20 @@ INSERT INTO foo VALUES (999999, NULL, 'bar');
14101410
SELECT jsonb_object_agg(name, type) FROM foo;
14111411
ERROR: field name must not be null
14121412
-- jsonb_object
1413+
-- empty object, one dimension
1414+
SELECT jsonb_object('{}');
1415+
jsonb_object
1416+
--------------
1417+
{}
1418+
(1 row)
1419+
1420+
-- empty object, two dimensions
1421+
SELECT jsonb_object('{}', '{}');
1422+
jsonb_object
1423+
--------------
1424+
{}
1425+
(1 row)
1426+
14131427
-- one dimension
14141428
SELECT jsonb_object('{a,1,b,2,3,NULL,"d e f","a b c"}');
14151429
jsonb_object

‎src/test/regress/sql/json.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,12 @@ SELECT json_object_agg(name, type) FROM foo;
462462

463463
-- json_object
464464

465+
-- empty object, one dimension
466+
SELECT json_object('{}');
467+
468+
-- empty object, two dimensions
469+
SELECT json_object('{}','{}');
470+
465471
-- one dimension
466472
SELECT json_object('{a,1,b,2,3,NULL,"d e f","a b c"}');
467473

‎src/test/regress/sql/jsonb.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,12 @@ SELECT jsonb_object_agg(name, type) FROM foo;
352352

353353
-- jsonb_object
354354

355+
-- empty object, one dimension
356+
SELECT jsonb_object('{}');
357+
358+
-- empty object, two dimensions
359+
SELECT jsonb_object('{}','{}');
360+
355361
-- one dimension
356362
SELECT jsonb_object('{a,1,b,2,3,NULL,"d e f","a b c"}');
357363

‎src/tools/msvc/clean.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ if exist src\bin\pg_basebackup\tmp_check rd /s /q src\bin\pg_basebackup\tmp_chec
9494
ifexist src\bin\pg_config\tmp_checkrd /s /q src\bin\pg_config\tmp_check
9595
ifexist src\bin\pg_ctl\tmp_checkrd /s /q src\bin\pg_ctl\tmp_check
9696
ifexist src\bin\pg_rewind\tmp_checkrd /s /q src\bin\pg_rewind\tmp_check
97+
ifexist src\bin\pgbench\tmp_checkrd /s /q src\bin\pgbench\tmp_check
9798
ifexist src\bin\scripts\tmp_checkrd /s /q src\bin\scripts\tmp_check
9899

99100
REM Clean up datafiles built with contrib

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp