Re: ResourceOwner refactoring - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: ResourceOwner refactoring
Date
Msg-id CAJ7c6TM1kTOi4jBuMFR4Okd8VthnsT=q6jhgGiuPQ3fD2jXKCA@mail.gmail.com
Whole thread Raw
In response to Re: ResourceOwner refactoring  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: ResourceOwner refactoring  (Aleksander Alekseev <aleksander@timescale.com>)
List pgsql-hackers
Hi Heikki,

> Rebased version attached. Given that Aleksander marked this as Ready for
> Committer earlier, I'll add this to the next commitfest in that state,
> and will commit in the next few days, barring any new objections.

Thanks for resurrecting this patch.

While taking a fresh look at the code I noticed a few things.

In 0002 we have:

```
+    .name = "buffer"
...
+    .name = "File",
```

Not sure why "File" starts with an uppercase letter while "buffer"
starts with a lowercase one. This is naturally not a big deal but
could be worth changing for consistency.

In 0003:

```
+#if SIZEOF_DATUM == 8
+    return hash_combine64(murmurhash64((uint64) value), (uint64) kind);
+#else
+    return hash_combine(murmurhash32((uint32) value), (uint32) kind);
+#endif
```

Maybe it's worth using PointerGetDatum() + DatumGetInt32() /
DatumGetInt64() inline functions instead of casting Datums and
pointers directly.

These are arguably nitpicks though and shouldn't stop you from merging
the patches as is.

-- 
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Proposal to use JSON for Postgres Parser format
Next
From: Ashutosh Bapat
Date:
Subject: Re: Limit of WAL LSN value of type pg_lsn