Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save prepared statements to be able to use them with connetion pooling #281

Open
wants to merge 46 commits into
base: REL_15_STABLE_neon
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f341594
Neon rebased to REL_15_STABLE (up to 0a9045c9ff)
lubennikovaav Jul 22, 2022
290ba8c
fix regression tests
lubennikovaav Aug 10, 2022
259ee69
rebase to the latest origin and resolve conflicts
lubennikovaav Aug 16, 2022
0e44ead
Remove contrib neon and neon_test_utils.
lubennikovaav Aug 24, 2022
7cca665
Prevent access to uninitalized shaerd memory in InstallXLogFileSegmen…
lubennikovaav Aug 24, 2022
8dccc09
Remove Dockerfile, it's now in the neon repo
lubennikovaav Aug 29, 2022
de43d1f
Move backpressure throttling implementation to neon extension (#203)
knizhnik Sep 2, 2022
a661533
Merge last written cache lsn with new main branch (#201)
knizhnik Sep 4, 2022
216c6d1
Local prefetch implementation for Postgres 15
hlinnaka Sep 13, 2022
681dc96
Set last written LSN for the created relation (#212)
hlinnaka Sep 16, 2022
3a9fec1
Use normal install program to install server headers.
hlinnaka Sep 12, 2022
125fe69
Update expected output for sysviews test because of changed default v…
knizhnik Sep 12, 2022
51fda47
Undo diasming VM check warning in vacuumlazy.c (#214)
knizhnik Sep 20, 2022
13fb90c
Set Neon-specific FMGR_ABI_EXTRA
lubennikovaav Sep 21, 2022
c6a30fb
Don't use newline in PG_VERSION file.
lubennikovaav Sep 21, 2022
00c68fe
Unset ArchiveRecoveryRequested for Neon code path.
lubennikovaav Sep 21, 2022
748e9a4
Fix memory leak in ApplyRecord
knizhnik Sep 21, 2022
3af5dc6
Rebase to Stamp 15.0
lubennikovaav Oct 5, 2022
6e4d997
Pin pages with speculative insert tuples to prevent their reconstruct…
knizhnik Oct 20, 2022
448bafa
Fix shared memory initialization for last written LSN cache (#226)
knizhnik Oct 24, 2022
b1ef4ab
Fix upper boundary caculation in the chunks loop in SetLastWrittenLSN…
knizhnik Oct 28, 2022
a81e2b6
Stamp XLP_FIRST_IS_CONTRECORD only if we start writing with page offset.
arssher Oct 28, 2022
d509e1b
Move walredo process code under pgxn in the main 'neon' repository.
hlinnaka Oct 31, 2022
d53d568
Misc cleanup, mostly to reduce unnecessary differences with upstream.
hlinnaka Oct 31, 2022
99947e8
Optimize prefetch patterns in both heap seqscan and vacuum scans. (#228)
MMeent Nov 7, 2022
d71a77c
Fix prefetch issues in parallel scans and vacuum's cleanup scan (#235)
MMeent Nov 11, 2022
cb8971d
Fix expected results for regression tests (#238)
bayandin Nov 15, 2022
a3b5c0d
Use prefetch in pg_prewarm extension (#237)
knizhnik Nov 17, 2022
59220f1
PG15: Prefetch cleanup (#241)
MMeent Nov 23, 2022
285cd13
Drop unlogged table in regress test to avoid noise in tests
lubennikovaav Nov 21, 2022
46c44e8
Do not produce open file error for unlogged relations (#240)
knizhnik Nov 24, 2022
6ac694c
Maintain last written LSN for each page to enable prefetch on vacuum,…
knizhnik Nov 24, 2022
d3188f2
Prefetch cleanup: (#246)
MMeent Dec 5, 2022
c772b48
Set lsn fix v15 (#252)
knizhnik Dec 8, 2022
f538627
Show prefetch statistic in EXPLAIN (#249)
knizhnik Jan 12, 2023
ba841dd
Implement efficient prefetch for parallel bitmap heap scan (#258)
knizhnik Feb 14, 2023
ad5e789
Unlogged index fix v15 (#262)
knizhnik Feb 22, 2023
9a20933
Fix bitmap scan prefetch (#261)
knizhnik Feb 23, 2023
919851e
Revert handling of UNLOGGED tables on compute side v15.
arssher Feb 24, 2023
1af2632
Allow external main functions to skip config load and make last
kelvich Feb 23, 2023
257aaef
Remove walredo-related hacks from InternalIpcMemoryCreate()
kelvich Mar 6, 2023
f8a650e
Adjust prefetch target for parallel bitmap scan (#274)
knizhnik Mar 27, 2023
03505eb
Copy iterator result in BitmapHeapNext (#276)
knizhnik Apr 7, 2023
4ad87b0
Prefetch for index and index-only scans (#271)
knizhnik Apr 7, 2023
aee72b7
[PG15] Feature/replicas (#279)
MMeent Apr 13, 2023
52ef300
Save prepared statements to be able to use them with connetion pooling
knizhnik Apr 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rebase to the latest origin and resolve conflicts
  • Loading branch information
lubennikovaav authored and MMeent committed Feb 10, 2023
commit 259ee69326c10671e0b592f266f10789f5bdd813
2 changes: 1 addition & 1 deletion src/backend/access/transam/xlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -7984,7 +7984,7 @@ xlog_redo(XLogReaderState *record)
* return BLK_DONE. Accept that.
*/
}
else if (XLogReadBufferForRedo(record, block_id, &buffer) != BLK_RESTORED)
else if (result != BLK_RESTORED)
elog(ERROR, "unexpected XLogReadBufferForRedo result when restoring backup block");

if (buffer != InvalidBuffer)
Expand Down
2 changes: 1 addition & 1 deletion src/backend/commands/dbcommands.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ ScanSourceDatabasePgClass(Oid tbid, Oid dbid, char *srcpath)
rnode.dbNode = dbid;
rnode.relNode = relfilenode;

smgr = smgropen(rnode, InvalidBackendId);
smgr = smgropen(rnode, InvalidBackendId, RELPERSISTENCE_PERMANENT);
nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
smgrclose(smgr);

Expand Down
14 changes: 9 additions & 5 deletions src/backend/storage/buffer/bufmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,9 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
{
bool hit;

SMgrRelation smgr = smgropen(rnode, InvalidBackendId, RELPERSISTENCE_PERMANENT);
SMgrRelation smgr = smgropen(rnode, InvalidBackendId,
permanent ? RELPERSISTENCE_PERMANENT :
RELPERSISTENCE_UNLOGGED);

return ReadBuffer_common(smgr, permanent ? RELPERSISTENCE_PERMANENT :
RELPERSISTENCE_UNLOGGED, forkNum, blockNum,
Expand All @@ -827,7 +829,7 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
bool found;
bool isExtend;
/*
* wal_redo postgres is working in single user mode, we do not need to synchronize access to shared buffer,
* wal_redo postgres is working in single user mode, we do not need to synchronize access to shared buffer,
* so let's use local buffers instead
*/
bool isLocalBuf = SmgrIsTemp(smgr) || am_wal_redo_postgres;
Expand Down Expand Up @@ -3760,7 +3762,9 @@ RelationCopyStorageUsingBuffer(RelFileNode srcnode,
use_wal = XLogIsNeeded() && (permanent || forkNum == INIT_FORKNUM);

/* Get number of blocks in the source relation. */
nblocks = smgrnblocks(smgropen(srcnode, InvalidBackendId),
nblocks = smgrnblocks(smgropen(srcnode, InvalidBackendId,
permanent ? RELPERSISTENCE_PERMANENT
:RELPERSISTENCE_UNLOGGED),
forkNum);

/* Nothing to copy; just return. */
Expand Down Expand Up @@ -3853,9 +3857,9 @@ CreateAndCopyRelationData(RelFileNode src_rnode, RelFileNode dst_rnode,
for (ForkNumber forkNum = MAIN_FORKNUM + 1;
forkNum <= MAX_FORKNUM; forkNum++)
{
if (smgrexists(smgropen(src_rnode, InvalidBackendId), forkNum))
if (smgrexists(smgropen(src_rnode, InvalidBackendId, relpersistence), forkNum))
{
smgrcreate(smgropen(dst_rnode, InvalidBackendId), forkNum, false);
smgrcreate(smgropen(dst_rnode, InvalidBackendId, relpersistence), forkNum, false);

/*
* WAL log creation if the relation is persistent, or this is the
Expand Down
2 changes: 1 addition & 1 deletion src/backend/utils/cache/relcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -3795,7 +3795,7 @@ RelationSetNewRelfilenode(Relation relation, char persistence)
* fails at this stage, the new cluster will need to be recreated
* anyway.
*/
srel = smgropen(relation->rd_node, relation->rd_backend);
srel = smgropen(relation->rd_node, relation->rd_backend, persistence);
smgrdounlinkall(&srel, 1, false);
smgrclose(srel);
}
Expand Down