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

Commit39a6772

Browse files
committed
Use DatumGetInt32() to extract 32-bit integer value from a datum.
Previously DatumGetObjectId() was wrongly used for that.Author: Masahiko SawadaReviewed-by: Kyotaro HoriguchiReported-by: Fujii MasaoDiscussion:http://postgr.es/m/CAHGQGwFDWh_Qr-q_GEMpD+qH=vYPMdVqw=ZOSY3kX_Pna9R9SA@mail.gmail.com
1 parentb977780 commit39a6772

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/backend/replication/logical/launcher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid,
306306

307307
bgw.bgw_restart_time=BGW_NEVER_RESTART;
308308
bgw.bgw_notify_pid=MyProcPid;
309-
bgw.bgw_main_arg=slot;
309+
bgw.bgw_main_arg=Int32GetDatum(slot);
310310

311311
if (!RegisterDynamicBackgroundWorker(&bgw,&bgw_handle))
312312
{

‎src/backend/replication/logical/worker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ subscription_change_cb(Datum arg, int cacheid, uint32 hashvalue)
14411441
void
14421442
ApplyWorkerMain(Datummain_arg)
14431443
{
1444-
intworker_slot=DatumGetObjectId(main_arg);
1444+
intworker_slot=DatumGetInt32(main_arg);
14451445
MemoryContextoldctx;
14461446
charoriginname[NAMEDATALEN];
14471447
XLogRecPtrorigin_startpos;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp