mirror of
https://github.com/postgres/postgres.git
synced 2025-05-15 19:15:29 +03:00
Use DatumGetInt32() to extract 32-bit integer value from a datum.
Previously DatumGetObjectId() was wrongly used for that. Author: Masahiko Sawada Reviewed-by: Kyotaro Horiguchi Reported-by: Fujii Masao Discussion: http://postgr.es/m/CAHGQGwFDWh_Qr-q_GEMpD+qH=vYPMdVqw=ZOSY3kX_Pna9R9SA@mail.gmail.com
This commit is contained in:
parent
b977780a9b
commit
39a6772d04
src/backend/replication/logical
@ -306,7 +306,7 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid,
|
||||
|
||||
bgw.bgw_restart_time = BGW_NEVER_RESTART;
|
||||
bgw.bgw_notify_pid = MyProcPid;
|
||||
bgw.bgw_main_arg = slot;
|
||||
bgw.bgw_main_arg = Int32GetDatum(slot);
|
||||
|
||||
if (!RegisterDynamicBackgroundWorker(&bgw, &bgw_handle))
|
||||
{
|
||||
|
@ -1441,7 +1441,7 @@ subscription_change_cb(Datum arg, int cacheid, uint32 hashvalue)
|
||||
void
|
||||
ApplyWorkerMain(Datum main_arg)
|
||||
{
|
||||
int worker_slot = DatumGetObjectId(main_arg);
|
||||
int worker_slot = DatumGetInt32(main_arg);
|
||||
MemoryContext oldctx;
|
||||
char originname[NAMEDATALEN];
|
||||
XLogRecPtr origin_startpos;
|
||||
|
Loading…
x
Reference in New Issue
Block a user